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

generatePom=true with 3.0.0-M1 does not generate minimal POM but copies existing one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M1, 3.0.0
    • 3.0.1
    • install:install-file
    • None

    Description

      I am using install:install-file with generatePom=true to install JAR with minimal POM file. This has stopped working with 3.0.0-M1. With 3.0.0-M1, it copeis existing project pom.xml instead of generating a minimal one.

       

      This is easily reproducible with minimal project:

      <?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>maven.install.plugin.issue</groupId>
        <artifactId>maven.install.plugin.issue</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>jar</packaging>
      
        <name>maven.install.plugin.issue</name>
      
        <properties>
          <maven.compiler.source>1.6</maven.compiler.source>
          <maven.compiler.target>1.6</maven.compiler.target>
        </properties>
      
        <build>
          <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
            <plugins>
              <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <!-- 2.5.2 does generate POM correctly. But 3.0.0-M1 does not. -->
                <version>3.0.0-M1</version>
                <!-- version>2.5.2</version -->
              </plugin>
            </plugins>
          </pluginManagement>
      
          <plugins>
            <plugin>
              <artifactId>maven-install-plugin</artifactId>
              <executions>
                <execution>
                  <id>default-install</id>
                  <phase>none</phase>
                  <goals><goal>install</goal></goals>
                </execution>
                <execution>
                  <id>custom-install</id>
                  <phase>install</phase>
                  <goals>
                    <goal>install-file</goal>
                  </goals>
                  <configuration>
                    <file>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</file>
                    <generatePom>true</generatePom>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </project>
      
      

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              wilx Václav Haisman
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: