You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Giridharan Kesavan (JIRA)" <ji...@apache.org> on 2011/08/03 09:23:27 UTC
[jira] [Created] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
hadoopcommon build version cant be set from the maven commandline
-----------------------------------------------------------------
Key: HADOOP-7506
URL: https://issues.apache.org/jira/browse/HADOOP-7506
Project: Hadoop Common
Issue Type: Bug
Components: build
Affects Versions: 0.23.0
Reporter: Giridharan Kesavan
Assignee: Giridharan Kesavan
pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Alejandro Abdelnur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Abdelnur updated HADOOP-7506:
---------------------------------------
Issue Type: Sub-task (was: Bug)
Parent: HADOOP-7412
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Tom White (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom White resolved HADOOP-7506.
-------------------------------
Resolution: Not A Problem
Closing since there's a workaround.
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Scott Carey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079144#comment-13079144 ]
Scott Carey commented on HADOOP-7506:
-------------------------------------
I have given up on the maven-release-plugin. It fails in many situations, too many of them to list here. If you want to do something like have trunk named trunk-SNAPSHOT and branches named in custom ways, good luck. It is an example of a design anti-pattern: it is a conflated design. It tries to do too much at once.
Do one thing and do it well:
Use http://mojo.codehaus.org/versions-maven-plugin/ to update the version of items in multi-module products.
Use plain old svn command line to branch/tag.
Use plain old maven to verify a build.
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Alejandro Abdelnur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078839#comment-13078839 ]
Alejandro Abdelnur commented on HADOOP-7506:
--------------------------------------------
Note Maven warning on this:
{code}
[WARNING] Some problems were encountered while building the effective model for org.apache.hadoop:hadoop-project:pom:0.23.0-SNAPSHOST
[WARNING] 'version' contains an expression but should be a constant. @ org.apache.hadoop:hadoop-project:${hadoop.version}, /Users/tucu/src/apache/hadoop/utrunk/hadoop-project/pom.xml, line 19, column 12
{code}
In addition, this won't work (I've tried this approach a couple of years ago when starting with Oozie) for the following reason:
The installed/deployed POMs will have a variable as the version and Maven dependency resolution won't be able to resolve that variable to a concrete value. Following there is a minimal POM that fails after doing a 'mvn install' with the HADOOP-7506 patch. (Make sure you trash other snapshots of hadoop-* and you are using -offline, to force the use of the just installed artifacts).
{code}
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>x</groupId>
<artifactId>x</artifactId>
<version>1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>0.23.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
{code}
One of the reasons for the failure is that the version is defined in hadoop-common's parent POM (hadoop-project) and then Maven cannot determine the version of hadoop-project to use because (chicken & egg problem).
The Maven way to take care of version upgrades through out the POMs is using the maven-release-plugin (I've used it in the past and it works quite well in multi-module projects)
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Giridharan Kesavan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079172#comment-13079172 ]
Giridharan Kesavan commented on HADOOP-7506:
--------------------------------------------
Luke's suggestion seem to work. Thanks Luke.
{noformat}
mvn versions:set -DnewVersion=<newversion}
need to execute the same command at two levels
executing at trunk level changes the version in the root pom.xml and hadoop-common/pom.xml
executing the command at trunk/hadoop-project level updates the version for hadoop-project, hadoop-annotations and hadoop-assemblies pom.xml
{noformat}
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Luke Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079054#comment-13079054 ]
Luke Lu commented on HADOOP-7506:
---------------------------------
bq. Maybe the versions plugin could be use for this purposes during the CI: http://mojo.codehaus.org/versions-maven-plugin/index.html
Just verified that mvn versions:set -DnewVersion=0.23.0-my-version works without the scm stuff. So this is a viable way for CI build, though still less convenient than version properties which can be easily controlled by profiles (e.g., via settings.xml)
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Alejandro Abdelnur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078968#comment-13078968 ]
Alejandro Abdelnur commented on HADOOP-7506:
--------------------------------------------
@Luke, I was not suggesting to use the maven-release-plugin for CI. I didn't know CI was the main motivation of the patch. Still for CI.
The release plugin is quite handy when it comes to do a release of a multi-module project, taking care of tagging, updating to the release version all artifacts, deploying them, and updating the version to the new devel version.
Not yet, but eventually we should use. Because of this, versions should not be parameterized, else the release plugin will not do its magic there.
Maybe the versions plugin could be use for this purposes during the CI: http://mojo.codehaus.org/versions-maven-plugin/index.html
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Giridharan Kesavan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Giridharan Kesavan updated HADOOP-7506:
---------------------------------------
Attachment: HADOOP-7506.PATCH
with this patch build version can be overridden from the commandline by using -Dhadoop.version=<version#>
the default version is set to 0.203.0-SNAPSHOT
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Luke Lu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078934#comment-13078934 ]
Luke Lu commented on HADOOP-7506:
---------------------------------
The patch itself won't work for cross-module projects. Especially if downstream projects use ivy. We have to do some controlled version variable expansion like what I did for MR-279.
However the maven-release-plugin way doesn't really work either, especially for CI, as I argued in [MNG-624|http://jira.codehaus.org/browse/MNG-624] and [MNG-2971|http://jira.codehaus.org/browse/MNG-2971]. Creating new tag/branch for each CI build (requires a different version instead of just something-SNAPSHOT) is extremely slow and unwieldy.
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079039#comment-13079039 ]
Allen Wittenauer commented on HADOOP-7506:
------------------------------------------
If we can't change the version # at build time, I don't think we'll be able to upgrade server side-only components without also upgrading all the clients. That's a major hit on the ops side. If that holds true, then we'll need to back out the maven patch before release if we can't fix this.
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7506) hadoopcommon build version cant be
set from the maven commandline
Posted by "Tom White (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082126#comment-13082126 ]
Tom White commented on HADOOP-7506:
-----------------------------------
Giri - can this be closed now you've got a solution?
> hadoopcommon build version cant be set from the maven commandline
> -----------------------------------------------------------------
>
> Key: HADOOP-7506
> URL: https://issues.apache.org/jira/browse/HADOOP-7506
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: build
> Affects Versions: 0.23.0
> Reporter: Giridharan Kesavan
> Assignee: Giridharan Kesavan
> Attachments: HADOOP-7506.PATCH
>
>
> pom.xml had to introduce hadoop.version property with the default value set to the snapshot version. If someone during build time want to override the version from maven command line they can do so by passing -Dhadoop.version="". For ppl who doesnt want to change the default version can continue building.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira