Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-923

Aether class is not found using the "Deploy artifacts to Artifactory" post-build action


    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 2.9.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Disclaimer: I'm not completely sure but maybe this issue is related to HAP-900.

      I had a maven build which ran SUCCESSFULLY but after adding the "Deploy artifacts to Artifactory" post build action, it started to fail with this message

      [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.8:features-generate-descriptor (default-features-generate-descriptor) on project openhab-core: Execution default-features-generate-descriptor of goal org.apache.karaf.tooling:karaf-maven-plugin:4.0.8:features-generate-descriptor failed: A required class was missing while executing org.apache.karaf.tooling:karaf-maven-plugin:4.0.8:features-generate-descriptor: org/sonatype/aether/RepositorySystem
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
      [ERROR] -----------------------------------------------------: org.sonatype.aether.RepositorySystem
      [ERROR] -> [Help 1]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

      Originally I was running maven-plugin:2.15.1 and artifactory:2.9.2 (with latest artifactory plugin version it fails also) but after downgrading to artifactory:2.9.1 the problem didn't expose anymore.

      It seems that the bug was introduced after updating the maven version plugin without taking into account the dependencies changed (see https://www.jfrog.com/jira/browse/HAP-889) in lib-jenkins-maven-embedder.

      If you make a checkout of the plugin (master branch) and then mvn dependency:list | grep aether | sort you will see the mix of aether dependencies

      [INFO]    org.apache.maven:maven-aether-provider:jar:3.1.0:compile
      [INFO]    org.eclipse.aether:aether-api:jar:1.1.0:compile
      [INFO]    org.eclipse.aether:aether-connector-basic:jar:1.1.0:compile
      [INFO]    org.eclipse.aether:aether-impl:jar:1.1.0:compile
      [INFO]    org.eclipse.aether:aether-spi:jar:1.1.0:compile
      [INFO]    org.eclipse.aether:aether-transport-wagon:jar:1.1.0:compile
      [INFO]    org.eclipse.aether:aether-util:jar:1.1.0:compile
      [INFO]    org.sonatype.aether:aether-api:jar:1.13.1:compile
      [INFO]    org.sonatype.aether:aether-impl:jar:1.13.1:compile
      [INFO]    org.sonatype.aether:aether-spi:jar:1.13.1:compile
      [INFO]    org.sonatype.aether:aether-util:jar:1.13.1:compile

      To reproduce the issue you need the Maven plugin 2.15.1 and artifactory 2.9.2 and follow the next steps:

      • Create a maven project using the pom.xml copied at the end
      • Run the maven project in Jenkins using a maven job adding an Artifactory post build action

      By the way, these are the workarounds that worked for me:

      • Downgrading the artifactory plugin to 2.9.1
      • Downgrading the maven plugin to 2.14
      • Adding an exclusion in the artifactory pom.xml

      pom.xml to reproduce the issue

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">




            • Assignee:
              eyalb Eyal Ben Moshe
              dvilladiego Dario Villadiego
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: