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

maven pom analysis does not cover maven plugins' dependencies

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • maven-plugin
    • None

      Jenkins analyzes the maven pom.xml during execution of the maven build, which includes analyzing the dependencies. However, it does not seem to work for plugins' dependencies, namely "my.pkg:artId" in the following example:

                  <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>exec-maven-plugin</artifactId>
                      <executions>
                          <execution>
                              <phase>process-resources</phase>
                              <goals>
                                  <goal>java</goal>
                              </goals>
                          </execution>
                      </executions>
                      <configuration>
                          <includePluginDependencies>true</includePluginDependencies>
                          <executableDependency>
                              <groupId>my.pkg</groupId>
                              <artifactId>artId</artifactId>
                          </executableDependency>
                          <mainClass>my.pkg.bla.App</mainClass>
                      </configuration>
                      <dependencies>
                          <dependency>
                              <groupId>my.pkg</groupId>
                              <artifactId>artId</artifactId>
                              <version>1.0-SNAPSHOT</version>
                          </dependency>
                      </dependencies>
                  </plugin>
      

      Is there any way (except manually configuring the Jenkins jobs) to tell Jenkins to consider my.pkg:artId as one of the project's dependencies? I tried putting the dependency declaration into the build dependency list using the provided scope. That, however, has side-effects: for example, NetBeans will consider transitive dependencies of my.pkg:artId as present, thereby not indicating missing dependencies in the build etc:

          <dependencies>
              <dependency>
                  <groupId>my.pkg</groupId>
                  <artifactId>artId</artifactId>
                  <scope>provided</scope>
                  <exclusions>
                      <exclusion>
                          <groupId>*</groupId>
                          <artifactId>*</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
          ...
      

      The exclusions somewhat mitigate the problem introduced by mis-using the provided scope and reduce it to resources/classes contained in my.pkg:artId.

          [JENKINS-25633] maven pom analysis does not cover maven plugins' dependencies

          There are no comments yet on this issue.

            Unassigned Unassigned
            marc321 Mr Cinquero
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: