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

          Mr Cinquero created issue -
          Mr Cinquero made changes -
          Description Original: 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 provded scope and reduce it to resources/classes contained in my.pkg:artId.
          New: 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:
          {noformat}
                      <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>
          {noformat}
          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:
          {noformat}
              <dependencies>
                  <dependency>
                      <groupId>my.pkg</groupId>
                      <artifactId>artId</artifactId>
                      <scope>provided</scope>
                      <exclusions>
                          <exclusion>
                              <groupId>*</groupId>
                              <artifactId>*</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
              ...
          {noformat}
          The exclusions somewhat mitigate the problem introduced by mis-using the provded scope and reduce it to resources/classes contained in my.pkg:artId.
          Mr Cinquero made changes -
          Description Original: 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:
          {noformat}
                      <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>
          {noformat}
          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:
          {noformat}
              <dependencies>
                  <dependency>
                      <groupId>my.pkg</groupId>
                      <artifactId>artId</artifactId>
                      <scope>provided</scope>
                      <exclusions>
                          <exclusion>
                              <groupId>*</groupId>
                              <artifactId>*</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
              ...
          {noformat}
          The exclusions somewhat mitigate the problem introduced by mis-using the provded scope and reduce it to resources/classes contained in my.pkg:artId.
          New: 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:
          {noformat}
                      <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>
          {noformat}
          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:
          {noformat}
              <dependencies>
                  <dependency>
                      <groupId>my.pkg</groupId>
                      <artifactId>artId</artifactId>
                      <scope>provided</scope>
                      <exclusions>
                          <exclusion>
                              <groupId>*</groupId>
                              <artifactId>*</artifactId>
                          </exclusion>
                      </exclusions>
                  </dependency>
              ...
          {noformat}
          The exclusions somewhat mitigate the problem introduced by mis-using the provided scope and reduce it to resources/classes contained in my.pkg:artId.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 159607 ] New: JNJira + In-Review [ 180051 ]

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

              Created:
              Updated: