[ 
https://issues.apache.org/jira/browse/HADOOP-6671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067473#comment-13067473
 ] 

Eric Yang commented on HADOOP-6671:
-----------------------------------

Why common-distro, hdfs-distro, mapreduce-distro have to be separated?  This 
can be defined as part of the super pom or parent pom to inherit same build 
structure across modules.  For long term maintainability, it would be more 
ideal to define the profile once and inherit from parent module.  If 
hdfs-distro and mapreduce-distro are separate submodule as layout, the code 
sharing does not take place.

{noformat}
mvn clean package -Pjavadoc,docs,tar,rpm 
{noformat}

Should be more human friendly than having to remember plugin specific commands.

Assembly is not a phase, but it's a goal.  There is no predefined phase called 
assembly.  For distro module, it makes sense to have package phase wire to 
assembly goal.  It is easy to wire antrun plugin to package phase in a profile, 
and define multiple profile for debian, rpm packages.

{noformat}
    <profile>
      <id>deb</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>build-deb</id>
                <phase>package</phase>
                <configuration>
                  <target>
                    <property name="artifactId" value="${project.artifactId}" />
                    <ant antfile="${basedir}/src/packages/build.xml">
                      <target name="package-deb"/>
                      <target name="package-conf-pseudo-deb"/>
                    </ant>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
{noformat}

Although the actual heavy lifting is done in ant to work around bugs in maven 
jdeb and maven rpm plugin, it is nicer to have a global structured pattern for 
locating src/package/build.xml for each submodule.

As long as the same profile code doesn't exist in common-distro, hdfs-distro, 
and mapreduce-distro, then I am fine with the proposal.


> 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-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-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