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

Cannot use EnvInject in a Maven 2 Jenkins project

    Details

    • Similar Issues:
      Show 5 results

      Description

      Our Maven 2 build job in Jenkins was created using the "maven2/3 project" template provided by the Maven 2 Project plugin. After installing the EnvInject plugin & configuring the "Prepare an environment for the run" settings at the job level, the job fails every time with the following error;

      [EnvInject] - [ERROR] - SEVERE ERROR occurs: hudson.maven.MavenModuleSet cannot be cast to hudson.model.Project

      Does EnvInject assume that the job is an instance of hudson.model.Project, which is a class? Is there a common interface that MavenModuleSet & Project both implement which could be used instead? Or a common ancestor super-class, e.g. hudson.model.AbstractProject?

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Gregory Boissinot
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
            http://jenkins-ci.org/commit/envinject-plugin/bd3910e8513e6ebc8eadd13a3ff38463b5057637
            Log:
            Fix JENKINS-13167

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java http://jenkins-ci.org/commit/envinject-plugin/bd3910e8513e6ebc8eadd13a3ff38463b5057637 Log: Fix JENKINS-13167
            Hide
            gbois Gregory Boissinot added a comment -

            Sorry for the regression.
            Could you try version 1.40

            Show
            gbois Gregory Boissinot added a comment - Sorry for the regression. Could you try version 1.40
            Hide
            bsabell Brett Sabell added a comment -

            Awesome, thanks, v1.40 works a treat. Happy for you to close this off.

            Show
            bsabell Brett Sabell added a comment - Awesome, thanks, v1.40 works a treat. Happy for you to close this off.

              People

              • Assignee:
                gbois Gregory Boissinot
                Reporter:
                bsabell Brett Sabell
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: