Artifactory Plugin

Plugin Information

Plugin ID artifactory
Latest Release 1.0.7
Latest Release Date Mar 04, 2010
Changes via Fisheye In Latest Release
Since Latest Release
Maintainer(s) Yossi Shaul (id: yossis)
Issue Tracking Open Issues

This plugin allows deploying maven artifacts and build info to Artifactory.

Requirements

This plugin requires Artifactory version 2.1.3 or later and Hudson 1.336 or later.

Configuring Artifactory Server(s)

First we need to configure Artifactory server to deploy artifacts and build info to. We do it in the Hudson system configuration page (Manage Hudson -> Configure System).
Locate the Artifactory servers configuration section, click on the add button and fill the Artifactory url and optionally username and password that will be used to query Artifactory for a list of repositories (only required if Artifactory is configured not to allow anonymous access).

Configuring Deployment

Once Artifactory server is configured we can add the plugin as a post build step in a maven 2 build. To do that create or edit a maven 2 build project.

Changelog

1.0.7 (04 Mar 2010)

  1. Improved Artifactory client
  2. Another fix for duplicate pom deployments
  3. Sending parent (upstream) build information
  4. Displaying only local repositories when working with Artifactory 2.2.0+

1.0.6 (16 Feb 2010)

  1. Fixed a bug in the plugin that in some cases skipped deployment of attached artifacts
  2. In some cases, pom were deployed twice
  3. MD5 hash is now set on all files
  4. Dependency type is passed to the build info

1.0.5 (22 Jan 2010)

  1. Using Jackson as JSON generator for BuildInfo (will fix issues with Hudson version 1.340-1.341)

1.0.4 (15 Jan 2010)

  1. Accept Artifactory urls with slash at the end
  2. Fixed JSON object creation to work with Hudson 1.340

1.0.3 (07 Jan 2010)

  1. Using preemptive basic authentication

1.0.2 (22 Dec 2009)

  1. Configurable connection timeout

1.0.1 (16 Dec 2009)

  1. Fixed Artifactory plugin relative location (for images and help files)

1.0.0 (14 Dec 2009)

  1. First stable release

Labels:

plugin-upload plugin-upload Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Dec 19

    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:

    org.kohsuke.stapler.NoStaplerConstructorException: Unable to find org/jfrog/hudson/ArtifactoryBuilder.stapler. There's no @DataBoundConstructor on any constructor of class org.jfrog.hudson.ArtifactoryBuilder
    at org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:471)
    at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:329)
    at hudson.model.Descriptor.newInstance(Descriptor.java:351)
    at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:633)
    at hudson.util.DescribableList.rebuildHetero(DescribableList.java:164)
    at hudson.model.Project.submit(Project.java:194)
    at hudson.model.FreeStyleProject.submit(FreeStyleProject.java:97)
    at hudson.model.Job.doConfigSubmit(Job.java:967)
    at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:519)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
    at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
    at org.jvnet.hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:47)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
    at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
    at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
    at java.lang.Thread.run(Thread.java:619)

    Did I miss anything? (Hudson 1.337; Artifactory 2.1.2; Plugin 1.0.1)

    1. Dec 20

      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).

  2. Jan 19

    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.

    1. Jan 20

      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.

    2. Feb 11

      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

  3. Jan 22

    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)

    1. Jan 22

      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.

      1. Feb 04

        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!

        1. Feb 11

          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

  4. Feb 11

    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

  5. Feb 16

    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.

    1. 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?

      1. 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