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

Travis Crawford commented on HIVE-4278:
---------------------------------------

Here are more details about the proposal - this is excerpted from the HCatalog 
build.

In 
[hcatalog/build-support/ant/build-common.xml|http://svn.apache.org/repos/asf/hive/trunk/hcatalog/build-support/ant/build-common.xml]
 we see how HCatalog creates a jar. In addition to creating the jar we 
[install:http://maven.apache.org/ant-tasks/examples/install-deploy.html] into 
the local maven repo.

{code}
  <target name="jar" depends="mvn-dependencies,compile,compile-resource">
    <echo message="${ant.project.name}"/>
    <jar jarfile="${build.dir}/${jar.name}" basedir="${build.classes}">
      <metainf dir="${path.to.basedir}" 
includes="**/LICENSE.txt,**/NOTICE.txt"/>
    </jar>
    <artifact:install 
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
      <artifact:pom file="${pom.file}"/>
      <artifact:localRepository path="${mvn.local.repo}"/>
    </artifact:install>
  </target>
{code}

In Hive's existing 
[build-common.xml|http://svn.apache.org/repos/asf/hive/trunk/build-common.xml] 
we see how things currently work. Notice how we publish to the "local" Ivy repo.

{code}
  <target name="jar" depends="compile">
    <echo message="Project: ${ant.project.name}" />
    <jar
      jarfile="${build.dir}/hive-${ant.project.name}-${version}.jar"
      basedir="${build.classes}">
      <manifest>
        <!-- Not putting these in their own manifest section, since that inserts
        a new-line, which breaks the reading of the attributes. -->
        <attribute name="Implementation-Title" value="Hive"/>
        <attribute name="Implementation-Version" value="${version}"/>
        <attribute name="Implementation-Vendor" value="Apache"/>
      </manifest>
      <metainf dir="${hive.root}" includes="LICENSE,NOTICE"/>
    </jar>
    <ivy:publish settingsRef="${ant.project.name}.ivy.settings"
                 resolver="local" pubrevision="${version}" overwrite="true"
                 artifactspattern="${build.dir}/${ivy.publish.pattern}"/>
  </target>
{code}

We see they're quite similar, and we should definitely look to merge the build 
files so its maintainable and feels less "bolted on" over time. This would be a 
pretty targeted change, simply changing where we publish SNAPSHOT jars, and a 
resolver change to always check the local maven repo for changing artifacts.

Its worth noting the Hive build already uses maven ant tasks when publishing 
artifacts to a remote maven repo. See {{maven-publish-artifact}} in 
[build.xml|http://svn.apache.org/repos/asf/hive/trunk/build.xml] for details. 
There would likely be some build file refactoring, but overall not too major a 
change.
                
> HCat needs to get current Hive jars instead of pulling them from maven repo
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-4278
>                 URL: https://issues.apache.org/jira/browse/HIVE-4278
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Build Infrastructure, HCatalog
>    Affects Versions: 0.11.0
>            Reporter: Alan Gates
>            Priority: Blocker
>             Fix For: 0.11.0
>
>
> The HCatalog build is currently pulling Hive jars from the maven repo instead 
> of using the ones built as part of the current build.  Now that it is part of 
> Hive it should use the jars being built instead of pulling them from maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to