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

Jenkins plugin works at development but fails at installation

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      On development the Jenkins runs perfectly, when installing on the same version via Update Center the Jenkins crashes at version 1.642.4, at version 2.7.1 it shows errors but starts, at 2.107.3 it works.

      It seems like dependency issue that the Update Center installs different dependencies from the ones that start in the development mode.

      When you try to install it says that only one of the latest Jenkins versions support the plugin despite that nothing in our POM file could raise it to such Jenkins level.

      The dependencies is listed below:

      https://plugins.jenkins.io/hp-application-automation-tools-plugin

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html#getInstanceOrNull-- is available starting from 1.653.
          This method should not be available in Jenkins 1.642.4

          I am not sure why the code even compiles on you instance, there is no method in 1.642.: https://github.com/jenkinsci/jenkins/blame/jenkins-1.642.4/core/src/main/java/jenkins/model/Jenkins.java . Likely your development environment is somehow corrupted. pom.xml contains lots of extra dependencies and redundant Maven plugin declarations, I cannot say why the compilation passes. Generally it is recommended to add a Jenkinsfile to your repository so the plugin can be built on ci.jenkins.io.

          Note that your plugin requires Java 8, so practically it makes sense bumping the core requirement to 2.60.x

          Show
          oleg_nenashev Oleg Nenashev added a comment - http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html#getInstanceOrNull-- is available starting from 1.653. This method should not be available in Jenkins 1.642.4 I am not sure why the code even compiles on you instance, there is no method in 1.642.: https://github.com/jenkinsci/jenkins/blame/jenkins-1.642.4/core/src/main/java/jenkins/model/Jenkins.java . Likely your development environment is somehow corrupted. pom.xml contains lots of extra dependencies and redundant Maven plugin declarations, I cannot say why the compilation passes. Generally it is recommended to add a Jenkinsfile to your repository so the plugin can be built on ci.jenkins.io. Note that your plugin requires Java 8, so practically it makes sense bumping the core requirement to 2.60.x
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Not a defect IMHO. Plugin pom.xml and build flows should be cleaned up.

          The plugin has a hardcoded .NET path with a specific version, so it cannot reproduced locally anyway

          [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (clean HPToolsLauncher) on project hp-application-automation-tools-plugin: Command execution failed.: Cannot run program "C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe" (in directory "/Users/nenashev/Documents/jenkins/plugins/hpe-application-automation-tools-plugin/HpToolsLauncher"): error=2, No such file or directory -> [Help 1]
          
          Show
          oleg_nenashev Oleg Nenashev added a comment - Not a defect IMHO. Plugin pom.xml and build flows should be cleaned up. The plugin has a hardcoded .NET path with a specific version, so it cannot reproduced locally anyway [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (clean HPToolsLauncher) on project hp-application-automation-tools-plugin: Command execution failed.: Cannot run program "C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe" (in directory "/Users/nenashev/Documents/jenkins/plugins/hpe-application-automation-tools-plugin/HpToolsLauncher" ): error=2, No such file or directory -> [Help 1]
          Hide
          gront Daniel Gront added a comment -

          Oleg Nenashev Thank you for responding, As I understand that only the new versions of Jenkins requires specifying the level of java, am I correct?

          I tried to do the same on Jenkins 2.7.1 which is higher than 1.653 and there are still errors but the plugin doesn't crash.

          All our listed dependencies require a minimum of Jenkins 2.5 version, but how could in the installation for it to asks for 2.107.3 and higher?

           

          Show
          gront Daniel Gront added a comment - Oleg Nenashev Thank you for responding, As I understand that only the new versions of Jenkins requires specifying the level of java, am I correct? I tried to do the same on Jenkins 2.7.1 which is higher than 1.653 and there are still errors but the plugin doesn't crash. All our listed dependencies require a minimum of Jenkins 2.5 version, but how could in the installation for it to asks for 2.107.3 and higher?  
          Hide
          gront Daniel Gront added a comment -

          It is caused because Jenkins stopped supporting old versions update center. When you have an old version you are using the update center of the new versions and download incompatible packages that break the Jenkins/Plugin behavior.

          The solution is to change the versions we support to the last 5 LTS versions as Jenkins.

          Show
          gront Daniel Gront added a comment - It is caused because Jenkins stopped supporting old versions update center. When you have an old version you are using the update center of the new versions and download incompatible packages that break the Jenkins/Plugin behavior. The solution is to change the versions we support to the last 5 LTS versions as Jenkins.

            People

            Assignee:
            gront Daniel Gront
            Reporter:
            gront Daniel Gront
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: