[ 
https://issues.apache.org/jira/browse/HADOOP-6671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alejandro Abdelnur updated HADOOP-6671:
---------------------------------------

    Attachment: HADOOP-6671.patch
                mvn-layout.sh

How to apply the patch (I'm using GIT):

* Checkout hadoop-common trunk
* run the mvn-layout.sh script
* git 'add -u' and 'git add' all new files dirs (git will recognize all the 
moving of files are renames)
* commit all changes as first commit (a separate JIRA could be created for this 
if you find it necessary)
* apply the HADOOP-6671.patch
* test all works as indicated below
* commit

It requires Maven 3

Typical Maven goals:

* mvn clean   
* mvn compile
* mvn test
* mvn package

The last one generates the TARBALL. As with the Ant build, FORREST_HOME must be 
defined.

Options:

* -Dtest=<TestClass> to run a single test
* -DskipTests to skip running the tests (package by default runs tests)
* -Dcompile.native to compile the native code

This patch does the minimal code changes (one line in a test class where 
'build/' was hardcoded) and the fixFont script for chinese documentation.

There are some testcases that are writing files in the current directory 
instead under the build directory. Those should be fixed as part of a follow up 
issue (thus concentrating this one in just the mavenization).

Native code compilation and Documentation generation are done using 2 auxiliary 
ant scripts invoked from Maven POM.

As a follow up, when Mavenizing HDFS and MAPREDUCE we can introduce a parent 
POM file where all dependencies versions are commonly defined (same version for 
all).

A couple of JAR files are missing from the final TARBALL, I assume they were 
included in the Ant build due to a ivy scope mistake (jdiff, aspectj-tools)

JDIFF/Clover/FindBugs/Cobertura/etc/etc can be easily integrated in the Maven 
POM. But again, I think this should be done incrementally on top of this.



> To use maven for hadoop common builds
> -------------------------------------
>
>                 Key: HADOOP-6671
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6671
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.22.0
>            Reporter: Giridharan Kesavan
>         Attachments: HADOOP-6671.patch, build.png, 
> hadoop-commons-maven.patch, mvn-layout.sh, mvn-layout.sh
>
>
> We are now able to publish hadoop artifacts to the maven repo successfully [ 
> Hadoop-6382]
> Drawbacks with the current approach:
> * Use ivy for dependency management with ivy.xml
> * Use maven-ant-task for artifact publishing to the maven repository
> * pom files are not generated dynamically 
> To address this I propose we use maven to build hadoop-common, which would 
> help us to manage dependencies, publish artifacts and have one single xml 
> file(POM) for dependency management and artifact publishing.
> I would like to have a branch created to work on mavenizing  hadoop common.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to