Uploaded image for project: 'Maven Install Plugin'
  1. Maven Install Plugin
  2. MINSTALL-191

Metadata for submodules seems to be incomplete

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M1, 3.0.0, 3.1.0, 3.1.1
    • None
    • install:install
    • None

    Description

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

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

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dvallant Dorian Vallant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment