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

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

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

Script and patch 'AA'

Integrating all Eric's comments. The layout is now:

{code}
-- pom.xml (hadoop reactor pom)
 |
 |-devbin/ (test-patch scripts)
 |
 |-hadoop-project/pom.xml (project defaults/dependencies)
 |
 |-hadoop-annotations/pom.xml (doclet and javadoc annotations)
 |
 |-hadoop-assemblies/pom.xml (reusable assemblies)
 |
 |-hadoop-common/pom.xml (common)
{code}

I've named the modules 'hadoop-...' because both IntelliJ and Eclipse use the 
artifactId of the POM to display the project structure and it will be less 
confusing to developers if what the IDE shows an the directory structure are 
the same.

The common build commands are:

{code}
* Clean                     : mvn clean
* Compile                   : mvn compile [-Pnative]
* Run tests                 : mvn test [-Pnative]
* Create JAR                : mvn package
* Run findbugs              : mvn compile findbugs:findbugs
* Run checkstyle            : mvn compile checkstyle:checkstyle
* Install JAR in M2 cache   : mvn install
* Deploy JAR to Maven repo  : mvn deploy
* Run clover                : mvn test -Pclover 
[-DcloverLicenseLocation=${user.name}/.clover.license]
* Run Rat                   : mvn apache-rat:check
* Build javadocs            : mvn javadocs:javadocs
* Build TAR                 : mvn verify -Ptar[,docs][,src][,native]
{code}

The 'verify' phase is used to create the TAR. This is done this way because we 
need to run some scripts before and after the assembly:single goal (I've spent 
all morning trying to define a custom lifcycle to have a 'distro' phase but I 
couldn't get it to work, this could be a later improvement).

Full details on the Maven build commands can be found in the 
*hadoop-common/BUILDING.txt*

Tom, now I would need your help to update the test-patch script and the jenkins 
job.

> To use maven for hadoop common builds
> -------------------------------------
>
>                 Key: HADOOP-6671
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6671
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 0.22.0
>            Reporter: Giridharan Kesavan
>            Assignee: Alejandro Abdelnur
>         Attachments: HADOOP-6671-AA.patch, 
> HADOOP-6671-cross-project-HDFS.patch, HADOOP-6671-e.patch, 
> HADOOP-6671-f.patch, HADOOP-6671-g.patch, HADOOP-6671-h.patch, 
> HADOOP-6671-i.patch, HADOOP-6671-j.patch, HADOOP-6671-k.sh, 
> HADOOP-6671-l.patch, HADOOP-6671-m.patch, HADOOP-6671-n.patch, 
> HADOOP-6671-o.patch, HADOOP-6671-p.patch, HADOOP-6671-q.patch, 
> HADOOP-6671.patch, HADOOP-6671b.patch, HADOOP-6671c.patch, 
> HADOOP-6671d.patch, build.png, common-mvn-layout-i.sh, 
> hadoop-commons-maven.patch, mvn-layout-AA.sh, mvn-layout-e.sh, 
> mvn-layout-f.sh, mvn-layout-k.sh, mvn-layout-l.sh, mvn-layout-m.sh, 
> mvn-layout-n.sh, mvn-layout-o.sh, mvn-layout-p.sh, mvn-layout-q.sh, 
> mvn-layout.sh, mvn-layout.sh, mvn-layout2.sh, mvn-layout2.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