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

Install:install-file on missing file should fail, not indicate success with bogus jar file message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.1
    • 2.4
    • install:install-file
    • None

    Description

      I had to install a third-party jar into my local repository and used maven to do so. But I botched the file name, and confusingly the plugin did not complain; in fact it reported total success. It creates a pom file but no jar file. I think the build should fail if the file to be installed is not found.

      Reproduce with the following invocation:

      mvn install:install-file -DgroupId=foo -DartifactId=foo -Dversion=1 -Dfile=/tmp/doesnotexit-comma-trust-me -Dpackaging=jar -DgeneratePom=true

      Below is the log from running this operation. Despite the message, it did NOT create a jar file.

      [INFO] Scanning for projects...
      [INFO]                                                                     
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
      [INFO] Installing /tmp/doesnotexit-comma-trust-me to /home/user/.m2/repository/foo/foo/1/foo-1.jar
      [INFO] Installing /tmp/mvninstall4193497156837259347.pom to /home/user/.m2/repository/foo/foo/1/foo-1.pom
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 0.422s
      [INFO] Finished at: Mon May 21 11:04:30 EDT 2012
      [INFO] Final Memory: 4M/359M
      [INFO] ------------------------------------------------------------------------
      

      Thanks for listening.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            chrislott Chris Lott
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: