You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/04/02 08:51:29 UTC
[I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
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-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #316:
URL: https://github.com/apache/maven-install-plugin/issues/316#issuecomment-2771867778
**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** commented
Sorry, bad wording. I wanted to say "user unconventional choice". But see MNG-8106
And congratulations, you discovered a nasty bug by doing your choice.
--
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: [I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #316:
URL: https://github.com/apache/maven-install-plugin/issues/316#issuecomment-2771867750
**[Michael Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)** commented
[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)
--
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: [I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #316:
URL: https://github.com/apache/maven-install-plugin/issues/316#issuecomment-2771867761
**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** commented
Ok, so this is actually a Maven bug: https://issues.apache.org/jira/browse/MNG-8106
Will be fixed in 3.9.7
--
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: [I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #316:
URL: https://github.com/apache/maven-install-plugin/issues/316#issuecomment-2771867758
**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** commented
This is a user -mistake- unconventional choice, and cannot be supported well by Maven repository layout, hence, these things should be avoided. The example project has 3 artifacts:
```
at.dvallant.maven:maven-install-plugin-bug:0.1.0-SNAPSHOT (root/parent POM)
at.dvallant.maven:plugins:0.1.0-SNAPSHOT
at.dvalland.maven.plugins:my-maven-plugin:0.1.0-SNAPSHOT
```
Clearly can be seen, that the two overlap: `at.dwallant.maven:plugins` (GA) and `at.dvallant.maven.plugins` (G). This means that on disk (mapped by layout) this directory contains once G level metadata (for at.dvalland.maven.plugins:my-maven-plugin plugin) and once A level metadata (for at.dvallant.maven:plugins artifact). These situations should be avoided.
--
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: [I] [MINSTALL-191] Metadata for submodules seems to be incomplete [maven-install-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #316:
URL: https://github.com/apache/maven-install-plugin/issues/316#issuecomment-2771867764
**[Dorian Vallant](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER302228)** commented
[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas) I don't understand exactly what you mean by "This is a user mistake". The project layout uses [standard Maven convention for groupId](https://maven.apache.org/guides/mini/guide-naming-conventions.html). But even if I change the groupId for in all pom's to e.g. `at.dvallant.maven` (without any subgroup), it doesn't work either. Maybe I misunderstood something...
--
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