Copy Artifact Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID copyartifact Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Feb 16, 2014
maven-plugin (version:1.509, optional)
Source Code
Issue Tracking
Open Issues
n/a (id: ikedam)
Usage Installations 2013-Apr 7640
2013-May 7926
2013-Jun 8179
2013-Jul 8658
2013-Aug 8805
2013-Sep 9194
2013-Oct 9662
2013-Nov 9859
2013-Dec 9855
2014-Jan 10365
2014-Feb 10885
2014-Mar 11510

Adds a build step to copy artifacts from another project. The plugin lets you specify which build to copy artifacts from (e.g. the last successful/stable build, by build number, or by a build parameter). You can also control the copying process by filtering the files being copied, specifying a destination directory within the target project, etc. Click the help icon on each field to learn the details, such as selecting Maven or multiconfiguration projects or using build parameters. You can also copy from the workspace of the latest completed build of the source project, instead of its artifacts. All artifacts copied are automatically fingerprinted for you.

Known Issues

  • Filesystem permissions of artifacts are only preserved in the copy when using the "flatten" option.

Configuration Notes

  • When using this plugin with a Windows slave node that is configured as a Windows service, the service should have permission to interact with desktop (select "Allow service to interact with desktop" from Jenkins Slave service properties). Otherwise you may see errors similar to this:
    ERROR: Failed to copy artifacts from ...
    hudson.util.IOException2: java.lang.IllegalAccessError: class hudson.remoting.Pipe$ConnectCommand cannot
      access its superclass hudson.remoting.Command
    at hudson.FilePath.copyRecursiveTo(
    at hudson.FilePath.copyRecursiveTo(
    at hudson.plugins.copyartifact.FilePathCopyMethod.copyAll(

Permissions to copy artifact

When you face a following message and fail to copy artifacts, this may be caused by permission to the project with artifacts. Please read this section once.

Unable to find project for artifact copy: YOUR_PROJECT_WITH_ARTIFACTS
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
Build step 'Copy artifacts from another project' marked build as failure

Specifying project statically (without variables)

  • This case:
  • In this case, you can copy artifacts if you have permission to read the project to copy from at configuration time.

Specifying project dynamically (with variables)

  • Those cases:

  • If your Jenkins is secured, it fails to copy artifacts without a proper configuration.
  • You need to allow projects copy artifacts in one of following ways:

Allow read from anonymous

  • Copyartifact plugin treats builds running as an anonymous.
  • Copying artifacts is allowed if the project with artifacts is readable from anonymous.
  • When you use Matrix-based security for authorization, it can be done as following in Manage Jenkins > Global Security Configuration:
  • When you use Project-based Matrix Authorization Strategy for authorization, it can be done as following in the configuration page of the project to copy artifacts from:

Specify projects who can copy artifacts

  • Available since Copyartifact 1.30
  • In the project configuration pages, you can specify projects to allow copy artifacts from that project:
  • You can specify multiple projects with separating with commas.
  • You can use wildcard character ('*') to specify name patterns.
In Copyartifact 1.30, there is a limitation "Permission to Copy Artifacts" accepts only relative project names.
If you use CloudBees Folders Plugin and the projects are located in different folders, you need to specify project names like "../folder/project".
This will be fixed in future releases (issue #22038).

Authorize builds as a user

  • Available since Jenkins 1.532
    • To be exact, the feature of Jenkins to authorize builds are available since 1.520, but who cares such details?
  • Authorize Project plugin enables you to run builds of a project as a specific user.
    • Copyartifact plugin treats builds running as an anonymous without authorization configurations.
  • You can resolve permission problems by running builds as a user with read permission to the project with artifacts

Change Log

Version 1.30 (Feb 16, 2014)
  • Added license information (MIT).
  • Fixed ClassNotFound when maven plugin not installed (issue #15977)
  • Allow to specify named builds in Specific Build Selector (issue #19693)
  • Job Property to define projects that can copy artifacts (issue #20398)
  • Fixed startup failure without maven-plugin (issue #21274)
Version 1.29 (Jan 29, 2014)
  • Support (mostly) absolute path for job name
    i.e. job name can be fully qualified but not start with "/"
    required for backward compatibility (issue #19833)
  • The authorization of builds are considered (when used with QueueItemAuthenticator). QueueItemAuthenticator is available from Jenkins 1.520. (issue #14999)
  • Make fingerprinting artifacts optional. By default the old behavior is preserved. (issue #12134 and this serves as a workaround for issue #17606).
Version 1.28 (Sep 23, 2013)
  • Supports ItemGroup (Cloudbees folders)
  • Added diagnostics log messages when using SpecificBuildSelector (related to issue #18220)
  • Migrates configuration when upgraded from version 1.25 or earlier. (issue #17680)
Version 1.27 (May 01, 2013)
  • NPE renaming job after 1.26 format change. (issue #17447)
  • Optional Copy Artifact build step fails if no specific build's build number is given. (issue #14266)
Version 1.26 (Mar 25, 2013)
  • Split filtering by build parameters into a separate configuration field, solving a security problem related to job configuration and upstream builds. Existing job configuration using this plugin will be rewritten if you run at least one build after the upgrade; if you immediately open the configuration page you will need to manually restore the upstream project field. (issue #13222)
  • Gets artifacts from jobs higher in the upstream chain. (pull request #18)
Version 1.25 (Nov 06, 2012)
Version 1.24 (Oct 03, 2012)
  • Continued fix for the case of a Windows slave with Unix master. (issue #13515)
Version 1.23 (Sep 21, 2012)
  • Failure on some Windows machines introduced in 1.22. (issue #13515)
Version 1.22 (Apr 16, 2012)
  • Hierarchical project support.
Version 1.21 (Jan 12, 2012)
  • Revisited issue #12134 implementation to hide the computation overhead to the actual copy operation.
Version 1.20 (Dec 16, 2011)
Version 1.19 (Nov 28, 2011)
  • Using "Upstream build which triggered" with "Last successfull" fallback uses last build as fallback and not last successful. (issue #11828)
  • Improve a misleading error message. (issue #10762)
  • Added hyperlinks to console output
  • Added german translation
Version 1.18 (Jul 24, 2011)
  • Copy only artifacts run for a particular matrix build (not those inherited from previous builds) in Jenkins 1.413+. (issue #10214)
Version 1.17 (Jul 24, 2011)
  • Add support for multiconfiguration(matrix) projects with upstream build selector. (issue #9729)
  • Add an option for upstream build selector to use last successful build when job is not triggered by upstream job. (issue #10225)
  • Partial fix for issue #9741 to preserve permissions on the copied artifacts when using the "flatten" option.
Version 1.16 (Apr 17, 2011)
  • Add build selector to select the upstream build that triggered this job. (issue #8999)
  • Avoid NullPointerException triggered by Build Pipeline Plugin. (issue #9359)
  • Allow filters in project name field to match all build variables, not just parameters. (issue #9327)
    Compatibility Note: More variables are now matched, but values for boolean parameters must now be specified as true and false (previously yes/no, on/off and 1/0 were also accepted).
  • Make text field for project name wider. (issue #9373)
  • Investigated permissions problem with using parameters to select a particular matrix configuration or maven module; this is fixed in Jenkins core 1.406. (issue #9293)
Version 1.15 (Apr 11, 2011)
  • Add note in "project not found" console message that error may be due to permission settings as well as invalid name.
  • Removed workaround code for issue #5977 now that minimum required Jenkins version for this plugin has that issue fixed.
  • Updates for Jenkins
Version 1.14 (Feb 24, 2011)
  • Rerelease 1.13 to properly set required Jenkins version.
Version 1.13 (Feb 10, 2011)
  • Prevent access to artifacts of private jobs. (issue #8727)
    • For a fixed project name, check at save-config time and disallow use of jobs the current user cannot see.
    • For parameterized names, check at build time that the source job is accessible to all authenticated users.
  • Record build number of selected build into environment for later build steps to reference. More detail in help text for build selector. (issue #8722)
  • Add support for filtering on build parameters, such as "latest stable build with parameter FOO=bar". More detail in help text for project name. (issue #8657)
Version 1.12 (Jan 30, 2011)
  • Restore ability to copy artifacts from a maven project that were archived with a post-build step (instead of maven automatic archiving). (issue #7752)
Version 1.11 (Nov 7, 2010)
  • Copy artifacts from all modules/configurations when a maven/matrix project is selected. (issue #7752)
  • Add extension point for how files are copied from source to target, allowing other plugins to override default implementation using Jenkins' FilePath class. (issue #7753)
  • Add note about limitation in copy-from-workspace feature. (issue #7751)
Version 1.10 (Oct 10, 2010)
  • Add option to copy from workspace of latest completed build. (issue #7130)
    Note: source and target jobs cannot both run on slave nodes; at least one must be on the master node.
  • Strip newlines in XML form of build selector parameters, to avoid breaking ant execution on windows. (issue #7680)
Version 1.9 (Sep 28, 2010)
  • Now supports selecting a build based on its permalink, which allows this plugin to work nicely with the promoted builds plugin.
Version 1.8 (Jul 18, 2010)
  • Add parameter expansion in selecting a specific build number. (issue #6972)
Version 1.7 (May 12, 2010)
  • Add support for using a build parameter to specify the BuildSelector used for copying artifacts.
Version 1.6 (May 8, 2010)
  • Make build environment available to BuildSelectors.
Version 1.5 (May 5, 2010)
  • Add Japanese localization.
Version 1.3 (May 2, 2010)
  • Add option to flatten directories when copying, so all artifacts from source project are copied directly into target directory. (issue #6345)
  • Add option to make the copy optional, so build doesn't fail if build, workspace, or matching artifact is not found. This release changes the default behavior when build is found but no artifacts were copied (now a build failure, previously just reported "0 files copied").
  • Add some help text about copying artifacts from Maven modules. (issue #6355)
Version 1.2 (Apr 17, 2010)
  • Add parameter expansion in name of project to copy from and add some help text about copying from matrix jobs. (issue #6242)
  • Add extension point for how to select which build to copy artifacts from. Includes selectors for latest successful/stable build or latest saved ("keep forever") build.
    Other plugins known to implement this extension: Promoted Builds Simple Plugin
Version 1.1 (Mar 18, 2010)
Version 1.0 (Mar 7, 2010)
  • Initial release.


To report a bug or request an enhancement to this plugin please create a ticket in JIRA.

JIRA Issues (69 issues)
Type Key Summary
New Feature JENKINS-22637 Cannot use "Copy Artifacts Plugin" in conjuction with the "Compress Artifacts Plugin", archive not found.
Bug JENKINS-22590 Promotion permalinks not offered when job name is parameterized
Bug JENKINS-22480 copyartifact plugin does not properly check files it has transferred
Bug JENKINS-22460 Support artifacts permission
Bug JENKINS-22453 Invalid symbolic links get archived but cannot be copied using Copy Artifacts
Improvement JENKINS-21544 Copy Artifact Plugin: support fallback to unstable builds when using "Upstream build that triggered this job"
Improvement JENKINS-21519 Copy Artifacts plugin should support build selector from Run Parameter
Bug JENKINS-20940 Project source of a multi-config project inside a folder not working
Bug JENKINS-20850 when using default workspace "default" folder is also copied
Improvement JENKINS-20814 Copy only the changes to (sync) the artifacts
Improvement JENKINS-20680 Remote triggering "Copy Artifact" build selector requires weird syntax
New Feature JENKINS-20546 Preserve symlinks when copying artifacts
New Feature JENKINS-20508 Select a build via SVN revision
Improvement JENKINS-20451 Add Copy Artefacts info to the xml Rest API
Improvement JENKINS-20370 CopyArtifact - get last artifact from self
Bug JENKINS-20259 Copy Artifact plugin incorrectly copies a non-latest build
Bug JENKINS-19057 ProjectName with variables in CopyArtifact < 1.26 is improperly upgraded.
Bug JENKINS-19007 copy artifacts via permalink for promoted builds shows wrong link
Bug JENKINS-18938 COPYARTIFACT_BUILD_NUMBER_ does not preserve numbers in job names
Bug JENKINS-18804 NPE TriggeredBuildSelector during CopyArtifact
Bug JENKINS-18762 Build number environment variable is not propagated when run inside a conditional build step
Improvement JENKINS-18662 Add a exclude file(s) field to CopyArtifact plugin
Bug JENKINS-18220 Unable to find a build for artifact copy
New Feature JENKINS-17950 Allow copying artifacts from last (even failed) build
Bug JENKINS-17880 Not all files are copied.
Bug JENKINS-17702 CopyArtifact with parameter selection fails when parameters changed
Bug JENKINS-17600 Unable to find build for artifact copy using specific build number and current slave.jar
New Feature JENKINS-17570 not copying artfacts from another job using specifc build number passed by environment variable.
Improvement JENKINS-17538 When artifact is copied, add an Action to track the build this artifact has been copied for
Bug JENKINS-17529 Broken symlinks during creating wrtifacts
Improvement JENKINS-17494 Copy Artifact fails when trying to copy artifact stored by ArtifactDeployer
Bug JENKINS-16987 Path of fingerprinted files not saved by CopyArtifacts
New Feature JENKINS-16847 Support for copying artifacts from other builds being part of the same MultiJob (previous phases)
Improvement JENKINS-16476 Add "Last Completed Build" to permalink list
New Feature JENKINS-16405 suppert basedir, The basedir configuration is similar to the ArtifactDeployer plug-in provides
Bug JENKINS-16139 Copy Artifacts of specific build number fails if build is triggered by upstream project.
New Feature JENKINS-16108 Option to use "last unstable" as fallback for "Upstream build which trigger" instead of only "last successful"
Bug JENKINS-16028 COPYARTIFACT_BUILD_NUMBER_ is not set when copyartifact plugin is ran as Maven pre-build
Bug JENKINS-16019 Copy Artifact Plugin isn't copying the "last successful" correctly
Bug JENKINS-15886 parameterized builds start default ant target in Ant-Task
Improvement JENKINS-15764 Name of COPYARTIFACT_BUILD_NUMER_ variable is incorrectly documented
Bug JENKINS-15595 XmlPullParserException when reading corrupted fingerprint file.
Bug JENKINS-14962 Failure to copy artifacts from Master job to slave job
Bug JENKINS-14900 Copying from workspace drops files matching Ant's default excludes
Bug JENKINS-14774 Failed to copy artifacts from another build job with timestamp exception
Bug JENKINS-14656 Jenkins cannot guarantee that it will push the exact same build through a build pipeline if some of the steps are triggered manually
Bug JENKINS-14653 Copy Artifacts plugin does not accept Maven module as Project Name with TriggeredBuildSelector
New Feature JENKINS-14650 Please add "specified by permalink:Latest promotion" to the "which build" option for MATRIX projects
Bug JENKINS-14636 Create Artifacts From an Wrong Build
New Feature JENKINS-14367 Copy Artifact / Archive Artifact: archive as root
Bug JENKINS-13551 Copy Artifact fails if selector class="hudson.plugins.copyartifact.StatusBuildSelector" is set
Bug JENKINS-13488 Copy Artifacts plugin's "Optional" not working
New Feature JENKINS-13388 Add option to delete existing artifacts before copy
Bug JENKINS-13074 when using "Latest successful build", viewing build parameters does not display build number
Improvement JENKINS-12974 Use hard links if possible, for local copies
Bug JENKINS-12732 Fingerprint failure in copy artifact 1.21, even though fingerprinting is turned off in my jobs
Bug JENKINS-12618 Copy Artifact plugin - Access is denied to copy content
Bug JENKINS-12412 copyartifact 1.21 fails in at least certain cross-platform copy scenarios
Improvement JENKINS-12379 Archive the artifacts should allow specifying the target artifacts path
Improvement JENKINS-12064 Disable copy artifact for modules
Bug JENKINS-11655 Upstream build points to wrong revision if there is more than one revision triggered the job
Improvement JENKINS-11629 Request ability to list project builds by description in dropdown.
Improvement JENKINS-11336 Copy artifacts task should should give more info in console before performing the action
Improvement JENKINS-11133 Copy artifacts from specific matrix configuration does not check stability of entire matrix
New Feature JENKINS-10861 Copy artifacts from downstream job run via synchronous Trigger Build step
Bug JENKINS-9741 Copy artifact loses file permissions
New Feature JENKINS-9709 Feature to copy artifact from different upstream projects
New Feature JENKINS-9622 Add build selector to parameterized trigger
Improvement JENKINS-9593 Copy artifact fails when slave is offline


plugin-builder plugin-builder Delete
plugin-parameter plugin-parameter Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment