Maven Install Plugin
  1. Maven Install Plugin
  2. MINSTALL-29

Can't use maven-install-plugin with <goal>install-file</goal> in POM

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      WinXP, running M2 in Cygwin
    • Number of attachments :
      0

      Description

      This issue is related to another I submitted recently. In fact, the earlier issue was encounted
      in an earlier attempt to get the same results. (see bottom, below.)

      Consider the POM descriptor containing

      <pluginRepositories>
      <pluginRepository>
      <id>snapshots</id>
      <url>http://svn.apache.org/maven-snapshot-repository</url>
      </pluginRepository>
      </pluginRepositories>

      <build>
      <plugins>
      <plugin>
      <artifactId>maven-install-plugin</artifactId>
      <version>2.2-SNAPSHOT</version>
      <executions>
      <execution>
      <id>install-library</id>
      <phase>install</phase>
      <goals>
      <goal>install-file</goal>
      </goals>
      <configuration>
      <groupId>com.epsiia.dxr.third-party</groupId>
      <artifactId>dxr-third-party-WINDOWS-X86-com-emc-centera-fplibrary-lib</artifactId>
      <version>2.0SP1</version>
      <packaging>lib</packaging>
      <file>FPLibrary.lib</file>
      </configuration>
      </execution>
      </executions>
      </plugin>
      </plugins>
      </build>

      M2 fails to build in this project because all </configuration> elements are read-only. [I'm attempting
      to use the 2.2-SNAPSHOT because I get the same error in stable versions. ]

      Shouldn't this execution be allowable and equivalent to the CLI invocation

      % mvn install:install-file -DgroupId=com.epsiia.dxr.third-party ..

      I'm trying to create a mind-numbingly simple environment, so that other less-experienced developers
      aren't required to know which of the third-party libraries need to be manually installed via once-only
      occurances should the local repository need to be re-constructed.

        Activity

        Hide
        Joseph Campolongo added a comment -

        I've run into this same problem running with maven-install-plugin v2.1. I cannot find v2.2-SNAPSHOT anywhere to try.

        Show
        Joseph Campolongo added a comment - I've run into this same problem running with maven-install-plugin v2.1. I cannot find v2.2-SNAPSHOT anywhere to try.
        Hide
        Trygve Laugstøl added a comment -

        A working work-around for this issue is to use this within <project>:

        <properties>
        <groupId>jflex</groupId>
        <artifactId>jflex</artifactId>
        <version>unknown</version>
        <file>bootstrap/jflex.jar</file>
        <packaging>jar</packaging>
        <generatePom>true</generatePom>
        </properties>

        Show
        Trygve Laugstøl added a comment - A working work-around for this issue is to use this within <project>: <properties> <groupId>jflex</groupId> <artifactId>jflex</artifactId> <version>unknown</version> <file>bootstrap/jflex.jar</file> <packaging>jar</packaging> <generatePom>true</generatePom> </properties>
        Hide
        Jason Dillon added a comment -

        The latest 2.2-SNAPSHOT resolves this problem. To use add this to your pom:

         <pluginRepositories>
            <pluginRepository>
                <id>apache-snapshots</id>
                <name>Apache Snapshots Repository</name>
                <url>http://people.apache.org/repo/m2-snapshot-repository</url>
                <layout>default</layout>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>daily</updatePolicy>
                    <checksumPolicy>ignore</checksumPolicy>
                </snapshots>
                <releases>
                    <enabled>false</enabled>
                </releases>
            </pluginRepository>
        </pluginRepositories>
        
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-install-plugin</artifactId>
                        <version>2.2-SNAPSHOT</version>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
        
        Show
        Jason Dillon added a comment - The latest 2.2-SNAPSHOT resolves this problem. To use add this to your pom: <pluginRepositories> <pluginRepository> <id>apache-snapshots</id> <name>Apache Snapshots Repository</name> <url>http: //people.apache.org/repo/m2-snapshot-repository</url> <layout> default </layout> <snapshots> <enabled> true </enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>ignore</checksumPolicy> </snapshots> <releases> <enabled> false </enabled> </releases> </pluginRepository> </pluginRepositories> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>2.2-SNAPSHOT</version> </plugin> </plugins> </pluginManagement> </build>
        Hide
        brianfox brianfox added a comment -

        already fixed

        Show
        brianfox brianfox added a comment - already fixed

          People

          • Assignee:
            Unassigned
            Reporter:
            Brad Harper
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: