You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/03/30 12:18:54 UTC

[GitHub] [maven-dependency-plugin] berlam opened a new pull request #130: [MDEP-82] - resolve plugin dependencies

berlam opened a new pull request #130:
URL: https://github.com/apache/maven-dependency-plugin/pull/130


   Resolve plugins does currently (master a0ac6fedf87dec9ec3ca93dd83d28ef2828cb544) not resolve plugin dependencies.
   With the POM below the artifact `surefire-junit47` will not be downloaded. After the change, it is downloaded as expected.
   
   This especially affects `dependency:go-offline` and its usage inside CI pipelines as stated in MDEP-82.
   
   I am not sure, how to test that properly using the current state of testing inside that plugin and would appreciate help in doing that. I would like to execute the Resolve-Plugin Mojo but did not get that to work.
   
   I am not sure, if this is the perfect solution, but it is borrowed from an other working maven plugin:
   https://github.com/qaware/go-offline-maven-plugin/blob/baa674897d3527a32bc781a54cff97dc0f1b4e4e/src/main/java/de/qaware/maven/plugin/offline/DependencyDownloader.java#L247.
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   
   <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
   
     <groupId>test</groupId>
     <artifactId>test</artifactId>
     <version>0.1-SNAPSHOT</version>
   
     <name>test</name>
   
     <properties>
       <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       <maven.compiler.source>1.7</maven.compiler.source>
       <maven.compiler.target>1.7</maven.compiler.target>
     </properties>
   
     <build>
       <pluginManagement>
         <plugins>
           <plugin>
             <artifactId>maven-compiler-plugin</artifactId>
             <version>3.8.1</version>
           </plugin>
           <plugin>
             <artifactId>maven-source-plugin</artifactId>
             <version>3.2.1</version>
           </plugin>
           <plugin>
             <artifactId>maven-jar-plugin</artifactId>
             <version>3.2.0</version>
           </plugin>
           <plugin>
             <artifactId>maven-assembly-plugin</artifactId>
             <version>3.3.0</version>
           </plugin>
           <plugin>
             <artifactId>maven-release-plugin</artifactId>
             <version>2.5.3</version>
           </plugin>
           <plugin>
             <artifactId>maven-deploy-plugin</artifactId>
             <version>3.0.0-M1</version>
           </plugin>
           <plugin>
             <artifactId>maven-help-plugin</artifactId>
             <version>3.2.0</version>
           </plugin>
           <plugin>
             <artifactId>maven-javadoc-plugin</artifactId>
             <version>3.2.0</version>
             <configuration>
               <quiet>true</quiet>
             </configuration>
           </plugin>
           <plugin>
             <artifactId>maven-resources-plugin</artifactId>
             <version>3.1.0</version>
           </plugin>
           <plugin>
             <artifactId>maven-surefire-plugin</artifactId>
             <version>3.0.0-M5</version>
           </plugin>
           <plugin>
             <artifactId>maven-war-plugin</artifactId>
             <version>3.3.1</version>
           </plugin>
           <plugin>
             <artifactId>maven-install-plugin</artifactId>
             <version>3.0.0-M1</version>
           </plugin>
           <plugin>
             <artifactId>maven-dependency-plugin</artifactId>
             <version>3.1.4-SNAPSHOT</version>
           </plugin>
           <plugin>
             <artifactId>maven-clean-plugin</artifactId>
             <version>3.1.0</version>
           </plugin>
           <plugin>
             <artifactId>maven-site-plugin</artifactId>
             <version>3.9.0</version>
           </plugin>
         </plugins>
       </pluginManagement>
       <plugins>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
           <dependencies>
             <dependency>
               <groupId>org.apache.maven.surefire</groupId>
               <artifactId>surefire-junit47</artifactId>
               <version>3.0.0-M5</version>
             </dependency>
           </dependencies>
         </plugin>
       </plugins>
     </build>
   </project>
   ```
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [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)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   


-- 
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.

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