You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "treilhes (via GitHub)" <gi...@apache.org> on 2025/11/18 21:01:24 UTC

[PR] Added ability to provide arbitrary dependencies to properties mojo [maven-dependency-plugin]

treilhes opened a new pull request, #1560:
URL: https://github.com/apache/maven-dependency-plugin/pull/1560

   This PR allows providing arbitrary dependencies to project properties through the plugin’s declared dependencies.
   My main use case for this feature is the ability to patch a Java module with a dependency that is outside of the project’s dependency tree (mainly to solve duplicate package name).
   
   See sample below
   ```
   
       <build>
           <plugins>
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-dependency-plugin</artifactId>
                   <executions>
                       <execution>
                           <id>resolve-jar-path</id>
                           <goals>
                               <goal>properties</goal>
                           </goals>
                       </execution>
                   </executions>
                   <dependencies>
                       <dependency>
                           <groupId>com.somegroup</groupId>
                           <artifactId>someartifact</artifactId>
                           <version>someversion</version>
                       </dependency>
                   </dependencies>
               </plugin>
   
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-compiler-plugin</artifactId>
                   <configuration>
                       <compilerArgs>
                           <arg>--patch-module</arg>
                           <arg>module.to.patch=${com.somegroup:someartifact:jar}</arg>
                       </compilerArgs>
                   </configuration>
               </plugin>
           </plugins>
       </build>
   
   ```
   - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Added ability to provide arbitrary dependencies to properties mojo [maven-dependency-plugin]

Posted by "treilhes (via GitHub)" <gi...@apache.org>.
treilhes closed pull request #1560: Added ability to provide arbitrary dependencies to properties mojo
URL: https://github.com/apache/maven-dependency-plugin/pull/1560


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org