inputs: def artifactory_generic(registry, xml_parent, data):
targets: """yaml: artifactory-generic
    Wrapper for non-Maven projects. Requires the
    :jenkins-wiki:`Artifactory Plugin <Artifactory+Plugin>`
    :arg str url: URL of the Artifactory server. e.g.
    https://www.jfrog.com/artifactory/ (default \\)
    :arg str name: Artifactory user with permissions use for
    connected to the selected Artifactory Server
    (default \\)
    :arg str repo-key: Release repository name (plugin < 2.3.0) (default \\)
    :arg str snapshot-repo-key: Snapshots repository name (plugin < 2.3.0)
    (default \\)
    :arg str key-from-select: Repository key to use (plugin >= 2.3.0)
    (default \\)
    :arg str key-from-text: Repository key to use that can be configured
    dynamically using Jenkins variables (plugin >= 2.3.0) (default \\)
    :arg list deploy-pattern: List of patterns for mappings
    build artifacts to published artifacts. Supports Ant-style wildcards
    mapping to target directories. E.g.: */*.zip=>dir (default [])
    :arg list resolve-pattern: List of references to other
    artifacts that this build should use as dependencies.
    :arg list matrix-params: List of properties to attach to all deployed
    artifacts in addition to the default ones: build.name, build.number,
    and vcs.revision (default [])
    :arg bool deploy-build-info: Deploy jenkins build metadata with
    artifacts to Artifactory (default false)
    :arg bool env-vars-include: Include environment variables accessible by
    the build process. Jenkins-specific env variables are always included.
    Use the env-vars-include-patterns and env-vars-exclude-patterns to
    filter the environment variables published to artifactory.
    (default false)
    :arg list env-vars-include-patterns: List of environment variable patterns
    for including env vars as part of the published build info. Environment
    variables may contain the * and the ? wildcards (default [])
    :arg list env-vars-exclude-patterns: List of environment variable patterns
    that determine the env vars excluded from the published..."""
    artifactory = XML.SubElement(xml_parent, 'org.jfrog.hudson.generic.ArtifactoryGenericConfigurator')
    details = XML.SubElement(artifactory, 'details')
    artifactory_common_details(details, data)
    info = registry.get_plugin_info('artifactory')
    version = pkg_resources.parse_version(info.get('version', '0'))
    if (version >= pkg_resources.parse_version('2.3.0')):
        deployReleaseRepo = XML.SubElement(details, 'deployReleaseRepository')
        XML.SubElement(deployReleaseRepo, 'keyFromText').text = data.get('key-from-text', '')
        XML.SubElement(deployReleaseRepo, 'keyFromSelect').text = data.get('key-from-select', '')
        XML.SubElement(deployReleaseRepo, 'dynamicMode').text = str(('key-from-text' in data.keys())).lower()
    else:
        XML.SubElement(details, 'repositoryKey').text = data.get('repo-key', '')
        XML.SubElement(details, 'snapshotsRepositoryKey').text = data.get('snapshot-repo-key', '')
    XML.SubElement(artifactory, 'deployPattern').text = ','.join(data.get('deploy-pattern', []))
    XML.SubElement(artifactory, 'resolvePattern').text = ','.join(data.get('resolve-pattern', []))
    XML.SubElement(artifactory, 'matrixParams').text = ','.join(data.get('matrix-params', []))
    XML.SubElement(artifactory, 'deployBuildInfo').text = str(data.get('deploy-build-info', False)).lower()
    XML.SubElement(artifactory, 'includeEnvVars').text = str(data.get('env-vars-include', False)).lower()
    XML.SubElement(artifactory, 'discardOldBuilds').text = str(data.get('discard-old-builds', False)).lower()
    XML.SubElement(artifactory, 'discardBuildArtifacts').text = str(data.get('discard-build-artifacts', True)).lower()
    artifactory_env_vars_patterns(artifactory, data)