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

Cannot use EnvInject in a Maven 2 Jenkins project

      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?

          [JENKINS-13167] Cannot use EnvInject in a Maven 2 Jenkins project

          Brett Sabell created issue -
          Gregory Boissinot made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-21285 [ JENKINS-21285 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 143631 ] New: JNJira + In-Review [ 190650 ]
          Jesse Glick made changes -
          Labels Original: envinronment-variables exception jenkins maven plugin windows New: envinronment-variables environment-variables exception jenkins maven plugin windows
          Jesse Glick made changes -
          Labels Original: envinronment-variables environment-variables exception jenkins maven plugin windows New: environment-variables exception jenkins maven plugin windows

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

              Created:
              Updated:
              Resolved: