jira-importer opened a new issue, #316:
URL: https://github.com/apache/maven-install-plugin/issues/316

   **[Dorian 
Vallant](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER302228)**
 opened 
**[MINSTALL-191](https://issues.apache.org/jira/browse/MINSTALL-191?redirect=false)**
 and commented
   
   maven-install-plugin 3.x (and maven-deploy-plugin 3.x too) seems to have a 
bug when generating maven-metadata-*.xml for submodules containing custom 
maven-plugins.
   With version 2.5.2 maven-install-plugin generates the local metadata as 
follows:
   
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <metadata>
     <groupId>at.dvallant.maven</groupId>
     <artifactId>plugins</artifactId>
     <versioning>
       <versions>
         <version>0.1.0-SNAPSHOT</version>
       </versions>
       <lastUpdated>20230831082036</lastUpdated>
     </versioning>
     <plugins>
       <plugin>
         <name>my-maven-plugin</name>
         <prefix>my</prefix>
         <artifactId>my-maven-plugin</artifactId>
       </plugin>
     </plugins>
   </metadata>
   ```
   
    
   After upgrading to 3.1.1 (also testet with 3.0.0-M1, 3.0.0 and 3.1.0) the 
generated file looks this:
   
   ```xml
   <metadata>
     <groupId>at.dvallant.maven</groupId>
     <artifactId>plugins</artifactId>
     <versioning>
       <versions>
         <version>0.1.0-SNAPSHOT</version>
       </versions>
       <lastUpdated>20230831082207</lastUpdated>
     </versioning>
   </metadata>
   ```
   
   A test-project to reproduce the issue is attached.
   
   To reproduce build the project by calling `mvn clean install` and then check 
the contents of 
`~/.m2/repository/at/dvallant/maven/plugins/maven-metadata-local.xml`.
   
   If you downgrade the version to 2.5.2, metadata generation works as expected.
   
   If you could give me a hint where the problem might be in the code I can try 
to fix it and open a pull request.
   
   
   ---
   
   **Affects:** 3.0.0-M1, 3.0.0, 3.1.0, 3.1.1
   
   **Attachments:**
   - 
[maven-install-plugin-bug.tgz](https://issues.apache.org/jira/secure/attachment/13062924/maven-install-plugin-bug.tgz)
 (_1.98 kB_)
   
   **Issue Links:**
   - [MNG-8106](https://issues.apache.org/jira/browse/MNG-8106) Maven Metadata 
corruption if repository directory role overlaps
    (_**"is fixed by"**_)
   


-- 
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-unsubscr...@maven.apache.org.apache.org

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

Reply via email to