Plugin Information
This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
 | Reporting Issues Issues for this plugin are managed primarily on the plugin's project under the JFrog JIRA.
Managing independent release versions and having sub-components for each build technology requires the plugin to be a first-level JIRA project, which is currently not possible under the Hudson-provided JIRA. |
Introduction
The Hudson Artifactory Plugin brings Artifactory's Build Integration support to Hudson. This integration allows your build jobs to deploy artifacts automatically to Artifactory and have them linked to the build job that created them.
As part of deployment additional information is recorded by the plugin to give you full visibility of deployed artifacts, used dependencies and information about original build environment. As an important side affect the plugin also supports optimized end-of-build-only deployment.
To learn more about the Artifactory-side of the Hudson Artifactory Plugin, please read the documentation on the JFrog wiki.
Requirements
This plugin requires Artifactory 2.2.3 or later and Hudson 1.358 or later.
The plugin currently supports Maven 2, Maven 3 (Beta), Gradle and Ivy-Ant builds.
Configuring Artifactory Server(s)
First, we need to configure the Artifactory server(s) we will use to deploy artifacts and build info to. We do this on Hudson's system configuration page (Manage Hudson -> Configure System).
Locate the "Artifactory servers" configuration section, click on the "Add" button and fill-in the Artifactory url and optionally username and password that will be used to query Artifactory for a list of target repositories (this is only required if Artifactory is configured not to allow anonymous access).

Configuring Maven 2 Builds
Once at least one Artifactory server is configured we can add the plugin as a Post-build step in a Maven 2 build. To do this create or edit a Maven 2 build project.

Configuring Gradle Builds
You can use the Hudson Gradle Plugin (configured under a free-style job) in conjunction with the Hudson Artifactory Plugin and have your Gradle builds resolve artifacts from Artifactory and deploy artifacts and build information to Artifactory.

Configuring Ivy-Ant Builds
You can use the Hudson Ivy Plugin in conjunction with the Hudson Artifactory Plugin and have your Ivy builds deploy artifacts and build information to Artifactory whenever an ivy:publish task is executed.

Configuring Maven 3 (Beta) Builds
Once you've added a Maven 3 installation to the general Hudson configuration, you can use the Hudson Artifactory Maven 3 Builder (configured as a build step under a free-style job) in conjunction with the Hudson Artifactory Maven 3 Integration (configured in the build environment section under a free-style job) and have your Maven 3 builds deploy artifacts and build information to Artifactory.
 | The Maven 3 builder and Artifactory Integration are not coupled, so you may build Maven 3 projects with the Artifactory integration deactivated. |

Changelog
1.3.0 (26 Aug 2010)
- New support for Maven 3 Beta builds!
1.2.0 (26 Jul 2010)
- New support for Ivy builds! (many thanks to Timo Bingaman for adding the hooks to the the Hudson Ivy Plugin)
- Supporting incremental builds (HAP-52)
- Testing connection to Artifactory in the main configuration page
- Update Hudson dependency to version 1.358
- Fixed HAP-51 - tar.gz files were deployed as .gz files
1.1.0 (09 Jun 2010)
- Added support for gradle jobs, see: http://www.jfrog.org/confluence/x/tYK5
- Connection timeout setting changed from milliseconds to seconds.
- Allow bypassing the http proxy (HUDSON-5892)
1.0.7 (04 Mar 2010)
- Improved Artifactory client
- Another fix for duplicate pom deployments
- Sending parent (upstream) build information
- Displaying only local repositories when working with Artifactory 2.2.0+
1.0.6 (16 Feb 2010)
- Fixed a bug in the plugin that in some cases skipped deployment of attached artifacts
- In some cases, pom were deployed twice
- MD5 hash is now set on all files
- Dependency type is passed to the build info
1.0.5 (22 Jan 2010)
- Using Jackson as JSON generator for BuildInfo (will fix issues with Hudson version 1.340-1.341)
1.0.4 (15 Jan 2010)
- Accept Artifactory urls with slash at the end
- Fixed JSON object creation to work with Hudson 1.340
1.0.3 (07 Jan 2010)
- Using preemptive basic authentication
1.0.2 (22 Dec 2009)
- Configurable connection timeout
1.0.1 (16 Dec 2009)
- Fixed Artifactory plugin relative location (for images and help files)
1.0.0 (14 Dec 2009)
- First stable release
Comments (16)
Dec 19, 2009
Thomas Trepper says:
Hi all, after configuring the servers in the hudson system-configuration it add...Hi all,
after configuring the servers in the hudson system-configuration it added the artifactory-plugin as a build-step in a particulary job, but there is no other action I can check, especially a post-build-action as shown in the picture. If I try to apply with the plugin added as build-step, I get the following stack-trace:
Did I miss anything? (Hudson 1.337; Artifactory 2.1.2; Plugin 1.0.1)
Dec 20, 2009
Yossi Shaul says:
I tested the plugin with version 1.337 and it works fine. Did you restarted the ...I tested the plugin with version 1.337 and it works fine. Did you restarted the server after installation? Any exception during installation of the plugin or hudson startup?
And BTW, the plugin works with Artifactory version 2.1.3 which will be released soon (but it is not related to the problem you are experiencing).
Jan 19, 2010
David Cloutier says:
Hi, I've just installed the plugin, I've setup the artifactory URL from the "co...Hi,
I've just installed the plugin, I've setup the artifactory URL from the "configure hudson" page but in the "configure Job" page there are no "repositories".
How do I add them?
Thanks,
Dave.
Jan 20, 2010
Yossi Shaul says:
You'll only see the repositories list if you configured a good Artifactory URL a...You'll only see the repositories list if you configured a good Artifactory URL and used the right credentials. Please make sure you configured it correctly. You can contact me directly if still doesn't work.
Feb 11, 2010
developer says:
Hi, I had a similar issue and couldn't see any repositories. URL was correctly...Hi,
I had a similar issue and couldn't see any repositories.
URL was correctly, user and password was correctly and I also tried out to set everything to public and give anonymous full permissions,
nothing helped.
I have upgraded to the latest artifactory 2.2.0 then it worked fine.
Before it was using 2.1.1 and I didn't read the requirements 2.1.3
Cheers
Jan 22, 2010
mmorizot says:
hi, We're now using hudson 1.341, the artifactory plugin 1.04 and artifactory 2...hi,
We're now using hudson 1.341, the artifactory plugin 1.04 and artifactory 2.1.3.
When deploying the build infos to artifactory we constantly have (any idea where this can come from?):
If i deploy using a mix of "hudson maven repo deploy plugin" and "hudson artifactory deploy only build info" , i get :
[INFO] Retrieving previous build number from scm-repository-hudson
[INFO] Uploading project information for xml-configuration 2.1.2-SNAPSHOT
[INFO] Retrieving previous metadata from scm-repository-hudson
[INFO] Uploading repository metadata for: 'snapshot GID:xml-configuration:2.1.2-SNAPSHOT'
[INFO] Retrieving previous metadata from scm-repository-hudson
[INFO] Uploading repository metadata for: 'artifact GID:xml-configuration'
Deploying build info to: http://MYSERVER/artifactory/api/build
ERROR: Failed to send build info: OK
java.io.IOException: Failed to send build info: OK
at org.jfrog.hudson.BuildInfoDeployer.sendBuildInfo(BuildInfoDeployer.java:176)
at org.jfrog.hudson.BuildInfoDeployer.deploy(BuildInfoDeployer.java:53)
at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:534)
at hudson.model.Run.run(Run.java:1216)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
using artifacory to deploy and upload build info, we get :
Deploying build info to: http://MYSERVER/artifactory/api/build
ERROR: Failed to send build info: Internal Server Error
java.io.IOException: Failed to send build info: Internal Server Error
at org.jfrog.hudson.BuildInfoDeployer.sendBuildInfo(BuildInfoDeployer.java:176)
at org.jfrog.hudson.BuildInfoDeployer.deploy(BuildInfoDeployer.java:53)
at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:534)
at hudson.model.Run.run(Run.java:1216)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
Jan 22, 2010
Yossi Shaul says:
Update the plugin to version 1.0.5. That should fix it.Update the plugin to version 1.0.5. That should fix it.
Feb 04, 2010
Alexander Reelsen says:
Hi, I am using version 1.0.5 and also get this at a first test: Deploying arti...Hi,
I am using version 1.0.5 and also get this at a first test:
Deploying artifacts to http://192.168.120.65:40000/artifactory/XYZREPO
Deploying artifacts of module: com.XYZ.mp:mp-authorization
Deploying artifact: http://192.168.120.65:40000/artifactory/XYZREPO/com/XYZ/mp/mp-authorization/3.1.1-SNAPSHOT/mp-authorization-3.1.1-SNAPSHOT.pom;build.name=MP+authorization;build.number=15
Deploying artifact: http://192.168.120.65:40000/artifactory/XYZREPO/com/XYZ/mp/mp-authorization/3.1.1-SNAPSHOT/mp-authorization-3.1.1-SNAPSHOT.pom;build.name=MP+authorization;build.number=15
Deploying build info to: http://192.168.120.65:40000/artifactory/XYZREPO/api/build
ERROR: Failed to send build info: OK
java.io.IOException: Failed to send build info: OK
at org.jfrog.hudson.BuildInfoDeployer.sendBuildInfo(BuildInfoDeployer.java:179)
at org.jfrog.hudson.BuildInfoDeployer.deploy(BuildInfoDeployer.java:56)
at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:594)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
at hudson.model.Run.run(Run.java:1221)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
Finished: FAILURE
Any hints on configuration mistakes on my part?
Thanks a lot for helping!
Feb 11, 2010
developer says:
Hi, I had some similar issue but already using 1.0.5 saying Deploying build in...Hi,
I had some similar issue but already using 1.0.5 saying
Deploying build info to: http://vslpnms1.arvato-systems.de:8080/artifactory/libs-snapshots-local/api/build
ERROR: Failed to send build info: Forbidden
java.io.IOException: Failed to send build info: Forbidden
Everything was allowed to anonymous
I have upgraded to the latest artifactory 2.2.0 then it worked fine.
Before it was using 2.1.1 and I didn't read the requirements 2.1.3
Cheers
Feb 11, 2010
developer says:
Hi folks, I just tried out the latest artifactory plugin v1.05 joining the lates...Hi folks,
I just tried out the latest artifactory plugin v1.05 joining the latest hudson v1.345 and the latest artifactory v2.2.0
and saw that the artifactory plugin leaves out some artifacts that have been build!!
For instance javadoc.jar, sources.jar and several other artifacts like asseblies xxx.zip or xxx.exe types.
Only foo.jar, foo-test.jar and pom.xml is deployed.
Example: Hudson shows the full lists of build artifacts correctly:
Build Artifacts
bic_services_1.0.32.0-SNAPSHOT-javadoc.jar
bic_services_1.0.32.0-SNAPSHOT-sources.jar
bic_services_1.0.32.0-SNAPSHOT-tests.jar
bic_services_1.0.32.0-SNAPSHOT.jar
pom.xml
Now if the assebly plugin starts it looks like this:
Deploying artifacts of module: some:bic_services
Deploying artifact: http://foo/artifactory/libs-snapshots-local/foo/bic_services/1.0.32.0-SNAPSHOT/bic_services-1.0.32.0-SNAPSHOT.jar;build.name=FOO+%28daily%29;build.number=285
Deploying artifact: http://foo/artifactory/libs-snapshots-local/foo/bic_services/1.0.32.0-SNAPSHOT/bic_services-1.0.32.0-SNAPSHOT.pom;build.name=FOO+%28daily%29;build.number=285
Deploying artifact: http://foo/artifactory/libs-snapshots-local/foo/bic_services/1.0.32.0-SNAPSHOT/bic_services-1.0.32.0-SNAPSHOT-.jar;build.name=FOO+%28daily%29;build.number=285
Deploying artifact: http://foo/artifactory/libs-snapshots-local/foo/bic_services/1.0.32.0-SNAPSHOT/bic_services-1.0.32.0-SNAPSHOT-tests.jar;build.name=FOO+%28daily%29;build.number=285
Ass you can see in the output:
bic_services_1.0.32.0-SNAPSHOT-javadoc.jar
bic_services_1.0.32.0-SNAPSHOT-sources.jar
are missing.
Instead there is some unamed one stopping after the last hyphen called:
bic_services-1.0.32.0-SNAPSHOT-.jar;
If I use the maven deploy command everything works correctly.
If I use the artifactory plugin the artifacts from above are missing and are not updated in the artifactory.
Any help is welcome
developer
Feb 16, 2010
Paul Harris says:
Hi, Is there any chance you can add an option to ignore/bypass the Hudson proxy...Hi,
Is there any chance you can add an option to ignore/bypass the Hudson proxy (in the Hudson Update Center). It looks like all artifactory plugin requests all go via this proxy (if configured) and I cannot get a list of repositories unless I remove the proxy config.
My artifactory is located on our local network and our stupid proxy blocks requests to it for some reason. I will try asking our network guys but I have more confidence in you being able to provide a fix than them..
I seem to remember a similar problem with another plugin making use of the Hudson proxy config. Maybe Hudson should provide a noProxyHosts option to make this more viable for plugins to use.
Thanks a lot.
Mar 08
dfme says:
We have excactly the same issue. Alread when setting up Artifactory for a build ...We have excactly the same issue. Alread when setting up Artifactory for a build the 'Target repository' list is empty. We also have configured Hudson to use a proxy for updating over the Internet. However Artifactory and Hudson are running on the same machine so there is no need for the artifactory plugin to go over the proxy.
Could this be fixed?
Mar 10
Yossi Shaul says:
Sure, I'll add it to the next plugin release. You can track it at: http://issues...Sure, I'll add it to the next plugin release. You can track it at: http://issues.hudson-ci.org/browse/HUDSON-5892
Jun 17
Filip Blondeel says:
Hi all, Recently I upgraded Hudson to version 1.362 and the artifactory plugin ...Hi all,
Recently I upgraded Hudson to version 1.362 and the artifactory plugin to version 1.1.0, but now I get an error from the artifactory plugin when it's trying to deploy the build info to Artifactory:Deploying build info ...
ERROR: Invalid use of SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
java.lang.IllegalStateException: Invalid use of SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:199)
at org.apache.http.impl.conn.SingleClientConnManager$1.getConnection(SingleClientConnManager.java:173)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:356)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:75)
at org.jfrog.build.client.ArtifactoryBuildInfoClient.sendBuildInfo(ArtifactoryBuildInfoClient.java:209)
at org.jfrog.hudson.BuildInfoDeployer.deploy(BuildInfoDeployer.java:58)
at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:110)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:598)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
at hudson.model.Run.run(Run.java:1276)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:124)
Has anyone else encountered this problem ?
Jun 17
Filip Blondeel says:
Hi all, Recently I upgraded Hudson to version 1.362 and the artifactory plugin t...Hi all,
Recently I upgraded Hudson to version 1.362 and the artifactory plugin to version 1.1.0, but now I get an error from the artifactory plugin when it's trying to deploy the build info to Artifactory:
Deploying build info ...
ERROR: Invalid use of SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
java.lang.IllegalStateException: Invalid use of SingleClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
at org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:199)
at org.apache.http.impl.conn.SingleClientConnManager$1.getConnection(SingleClientConnManager.java:173)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:356)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
at org.jfrog.build.client.PreemptiveHttpClient.execute(PreemptiveHttpClient.java:75)
at org.jfrog.build.client.ArtifactoryBuildInfoClient.sendBuildInfo(ArtifactoryBuildInfoClient.java:209)
at org.jfrog.hudson.BuildInfoDeployer.deploy(BuildInfoDeployer.java:58)
at org.jfrog.hudson.ArtifactoryRedeployPublisher.perform(ArtifactoryRedeployPublisher.java:110)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:598)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
at hudson.model.Run.run(Run.java:1276)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:124)
Has anyone else encountered this problem ?
Jun 17
Yoav Landman says:
This is a known issue that affects BuildInfo deployment - http://issues.jfrog.or...This is a known issue that affects BuildInfo deployment - http://issues.jfrog.org/jira/browse/HAP-40.
The easiest workaround is to upgrade Artifactory (to 2.2.4 at time of writing).