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

Regression in 3.1.2 when installing pom artifact

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 3.1.2
    • None
    • None
    • None
    • macOS 14.5, Maven 3.9.8; probably any
    • Patch, Important

    Description

      With 3.1.2, I'm seeing wrong artifact metadata (POM files) being installed for POM-packaged artifacts in a multi-module project.

      Prior to 3.1.2, we were excluding some operations in InstallMojo.java when a project's packaging was "pom". The check got removed, leading to ".pom" artifact files being installed as some sort of zip file (yet having the ".pom" file suffix).

      This breaks all sorts of things for me, effectively rendering version 3.1.2 unusable.

      Patch forthcoming.

      To reproduce:

      git clone git@github.com:kohlschutter/kohlschutter-parent.git
      git checkout kohlschutter-parent-1.7.2
      cd kohlschutter-parent
      mvn clean install -Dignorant -DskipTests
      file $HOME/.m2/repository/com/kohlschutter/kohlschutter-parent-multirelease/1.7.2/kohlschutter-parent-multirelease-1.7.2.pom
      # the above command should return something like "XML 1.0 document text, ASCII text"
      # 
      # now change maven-install-plugin dependency version in kohlschutter-parent's pom.xml from 3.1.1 to 3.1.2
      mvn clean install -Dignorant -DskipTests
      file $HOME/.m2/repository/com/kohlschutter/kohlschutter-parent-multirelease/1.7.2/kohlschutter-parent-multirelease-1.7.2.pom
      # 
      # the above command now returns something like "Zip archive data, at least v1.0 to extract, compression method=store"
      # 
      # contents of the zip file:
      # META-INF/
      # META-INF/MANIFEST.MF
      # META-INF/maven/
      # META-INF/maven/com.kohlschutter/
      # META-INF/maven/com.kohlschutter/kohlschutter-parent-multirelease/
      # META-INF/maven/com.kohlschutter/kohlschutter-parent-multirelease/pom.xml
      # META-INF/maven/com.kohlschutter/kohlschutter-parent-multirelease/pom.properties}}
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ck@newsclub.de Christian Kohlschütter
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: