-
Bug
-
Resolution: Unresolved
-
Minor
-
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.