You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Francis De Brabandere (JIRA)" <ji...@codehaus.org> on 2012/07/19 16:42:21 UTC

[jira] (MINSTALL-87) Install:install-file on missing file should fail, not indicate success with bogus jar file message

    [ https://jira.codehaus.org/browse/MINSTALL-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304070#comment-304070 ] 

Francis De Brabandere commented on MINSTALL-87:
-----------------------------------------------

This very annoying! Also it's clearly a BUG and not an Improvement. Should be easy to fix.

Used to fail correctly with maven 2.x (see output below)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error installing artifact 'com.bugsense:bugsense-trace:jar': Error installing artifact: File myproject/libs/bugsense-trace-1-9.jar does not exist


                
> Install:install-file on missing file should fail, not indicate success with bogus jar file message
> --------------------------------------------------------------------------------------------------
>
>                 Key: MINSTALL-87
>                 URL: https://jira.codehaus.org/browse/MINSTALL-87
>             Project: Maven 2.x Install Plugin
>          Issue Type: Improvement
>          Components: install:install-file
>    Affects Versions: 2.3.1
>         Environment: RHEL 6.1
>            Reporter: Chris Lott
>            Priority: Minor
>
> 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] ------------------------------------------------------------------------
> Finally, here is full version info.
> $ mvn -version
> Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Maven home: /home/user/Programs/apache-maven-3.0.4
> Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
> Java home: /usr/java/jdk1.6.0_30/jre
> Default locale: en_US, platform encoding: UTF-8
> Thanks for listening.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira