Return-Path: Delivered-To: apmail-maven-issues-archive@locus.apache.org Received: (qmail 71636 invoked from network); 2 Aug 2006 02:43:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Aug 2006 02:43:54 -0000 Received: (qmail 72929 invoked by uid 500); 2 Aug 2006 02:43:53 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 72872 invoked by uid 500); 2 Aug 2006 02:43:53 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 72863 invoked by uid 99); 2 Aug 2006 02:43:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 19:43:53 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [63.246.20.114] (HELO 63-246-20-114.contegix.com) (63.246.20.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2006 19:43:52 -0700 Received: (qmail 31209 invoked by uid 89); 2 Aug 2006 02:43:31 -0000 Received: from unknown (HELO codehaus01.managed.contegix.com) (127.0.0.1) by smtp.domain.com with SMTP; 2 Aug 2006 02:43:31 -0000 Message-ID: <52910998.1154486611282.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Tue, 1 Aug 2006 21:43:31 -0500 (CDT) From: "Johan Fischer (JIRA)" To: issues@maven.apache.org Subject: [jira] Created: (MINSTALL-30) Command Line parameter 'version' does not override pom file MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Command Line parameter 'version' does not override pom file ----------------------------------------------------------- Key: MINSTALL-30 URL: http://jira.codehaus.org/browse/MINSTALL-30 Project: Maven 2.x Install Plugin Issue Type: Bug Affects Versions: 2.1 Environment: maven 2.0.4 maven-install-plugin 2.1 Reporter: Johan Fischer Fix For: 2.2 Hi, I'm trying to override the version number in the pom using the CLI params -Dversion but the install plugin still uses the pom version creating a mismatched of the installed jar file: example: pom version: SHIP_VERSION {noformat} $ mvn -X -Dversion=1.4.1_2 install Error stacktraces are turned on. Maven version: 2.0.4 [DEBUG] Building Maven user-level plugin registry from: '/home/jfischer/.m2/plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: '/opt/maven/conf/plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Searching for parent-POM: cmss:parent::1.0.0-SNAPSHOT of project: cmss-libs:cmcrc-favlib:jar:SHIP_VERSION in relative path: ../pom.xml [DEBUG] Parent-POM: cmss:parent::1.0.0-SNAPSHOT not found in relative path: ../pom.xml [DEBUG] Retrieving parent-POM: cmss:parent::1.0.0-SNAPSHOT for project: cmss-libs:cmcrc-favlib:jar:SHIP_VERSION from the repository. [DEBUG] Skipping disabled repository central [DEBUG] parent: resolved to version 1.0.0-20060516.064917-2 from repository cmss [INFO] ---------------------------------------------------------------------------- [INFO] Building Java SMARTS lib [INFO] task-segment: [install] [INFO] ---------------------------------------------------------------------------- <--- snip ---> DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.1:compile' --> [DEBUG] (f) basedir = /home/jfischer/cmcrc/cmss/libs/favlib [DEBUG] (f) buildDirectory = /home/jfischer/cmcrc/cmss/libs/favlib/target [DEBUG] (f) classpathElements = [/home/jfischer/cmcrc/cmss/libs/favlib/target/classes, /home/jfischer/.m2/repository/cmss-libs/jelte-util/1.0.0/jelte-util-1.0.0.j ar] [DEBUG] (f) compileSourceRoots = [/home/jfischer/cmcrc/cmss/libs/favlib/src/main/java] [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /home/jfischer/cmcrc/cmss/libs/favlib/target/classes [DEBUG] (f) outputFileName = cmcrc-favlib-1.4.1_2 [DEBUG] (f) projectArtifact = cmss-libs:cmcrc-favlib:jar:SHIP_VERSION [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- <--- snip ---> [DEBUG] org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.1:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime) [DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime) [DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime) [DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime) [DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime) [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-install-plugin:2.1:install' --> [DEBUG] (f) artifact = cmss-libs:cmcrc-favlib:jar:SHIP_VERSION [DEBUG] (f) attachedArtifacts = [] [DEBUG] (f) localRepository = [local] -> file:///home/jfischer/.m2/repository [DEBUG] (f) packaging = jar [DEBUG] (f) pomFile = /home/jfischer/cmcrc/cmss/libs/favlib/pom.xml [DEBUG] -- end configuration -- [INFO] [install:install] [INFO] Installing /home/jfischer/cmcrc/cmss/libs/favlib/target/cmcrc-favlib-1.4.1_2.jar to /home/jfischer/.m2/repository/cmss-libs/cmcrc-favlib/SHIP_VERSION/cmcrc-f avlib-SHIP_VERSION.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10 seconds [INFO] Finished at: Wed Aug 02 12:36:09 GMT+10:00 2006 [INFO] Final Memory: 4M/9M [INFO] ------------------------------------------------------------------------ {noformat} As you can see, the install plugin installed the built jar file 1.4.2_2 to the local repos version=SHIP_VERSION...... Looking at the trunk code: http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java this makes perfect sense as if the pom file exists, it reads the version from there and skip CLI parsing as requested in MINSTALL-21. So would be nice to read first the pom, and then allow the CLI to override this. I don't know if you want to allow overriding the groupId and artifactId (I just looked at the version case). Cheers. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira