Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31137

Dependency to Maven 2.12 is not optional

    Details

    • Similar Issues:

      Description

      Hello,

      In the plugin wiki page, it is mentioned that we need Jenkins 1.609 and and the docker-commons plugin 1.0 if we want to use the Docker Custom Build Env plugin.

      Two others dependencies are listed as optional: maven-plugin 2.12 & dockerhub-notification 1.0.

      I tried to install your plugin on Jenkins 1.609.3 with docker-commons installed and I get the following error at Jenkins startup :

      Warning: Failed to scout com.cloudbees.jenkins.plugins.docker_build_env.MavenPluginHelper
      java.lang.InstantiationException: java.lang.NoClassDefFoundError: hudson/maven/TcpSocketHostLocator
      

      Note that as I didn't explicitly installed the maven-plugin, Jenkins was using the one embedded in 1.609.3, maven-plugin 2.7.1.

      Then I installed the maven-plugin 2.12 and your plugin was working fine: I didn't get any error at Jenkins startup.

      So could you please update the wiki page of your plugin to specify that maven-plugin 2.12 is not and optional dependency ?

      Regards,
      Pierre

        Attachments

          Activity

          Hide
          ndeloof Nicolas De Loof added a comment -

          this is just a Warning.
          Blame Jenkins not to consider the optional annotation on Extensions.

          Show
          ndeloof Nicolas De Loof added a comment - this is just a Warning. Blame Jenkins not to consider the optional annotation on Extensions.
          Hide
          tnguyen1 Truc Nguyen added a comment -

          Hello,
          Just submitted this small pull request in case somebody's interested:
          https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/67

          Show
          tnguyen1 Truc Nguyen added a comment - Hello, Just submitted this small pull request in case somebody's interested: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/67
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Truc Nguyen
          Path:
          src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/MavenPluginHelper.java
          http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/93df66eea4d240b962b0295c2dac57d509e35ca0
          Log:
          JENKINS-31137 avoid TcpSocketHostLocator NoClassDefError with optional maven-plugin dependency

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Truc Nguyen Path: src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/MavenPluginHelper.java http://jenkins-ci.org/commit/docker-custom-build-environment-plugin/93df66eea4d240b962b0295c2dac57d509e35ca0 Log: JENKINS-31137 avoid TcpSocketHostLocator NoClassDefError with optional maven-plugin dependency
          Hide
          jonhermansen Jon Hermansen added a comment -

          I'll close this as done once I push a new version to the plugin repository.

          Show
          jonhermansen Jon Hermansen added a comment - I'll close this as done once I push a new version to the plugin repository.
          Hide
          jonhermansen Jon Hermansen added a comment -

          This is fixed in 1.7.3, which was released last night.

          Show
          jonhermansen Jon Hermansen added a comment - This is fixed in 1.7.3, which was released last night.

            People

            • Assignee:
              jonhermansen Jon Hermansen
              Reporter:
              pfrayer Pierre Frayer
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: