Review Board 1.7.22


[PIG-2907] Publish pig 0.23 jars to maven

Review Request #8157 - Created Nov. 21, 2012 and submitted

Rohini Palaniswamy
PIG-2907
Reviewers
pig
pig
Publishing h23 compiled pig jar with classifier h23. 
Tested with a local nexus repository using the command

ant clean mvn-deploy -Dasfrepo=http://localhost:8089/nexus

Diff revision 2 (Latest)

1 2
1 2

  1. http://svn.apache.org/repos/asf/pig/trunk/build.xml: Loading...
http://svn.apache.org/repos/asf/pig/trunk/build.xml
Revision 1415689 New Change
[20] 65 lines
[+20]
66
    <!-- warnings option if all.warnings property is set on cmdline -->
66
    <!-- warnings option if all.warnings property is set on cmdline -->
67
    <property name="javac.args.all.warnings" value="-Xmaxwarns 1000000 -Xlint -Xlint:-deprecation" />
67
    <property name="javac.args.all.warnings" value="-Xmaxwarns 1000000 -Xlint -Xlint:-deprecation" />
68

    
   
68

   
69
    <!-- artifact jar file names -->
69
    <!-- artifact jar file names -->
70
    <property name="artifact.pig.jar" value="${final.name}.jar"/>
70
    <property name="artifact.pig.jar" value="${final.name}.jar"/>

    
   
71
    <property name="artifact.pig-h2.jar" value="${final.name}-h2.jar"/>
71
    <property name="artifact.pig-withouthadoop.jar" value="${final.name}-withouthadoop.jar"/>
72
    <property name="artifact.pig-withouthadoop.jar" value="${final.name}-withouthadoop.jar"/>
72
    <property name="artifact.pig-withdependencies.jar" value="${final.name}-withdependencies.jar"/>
73
    <property name="artifact.pig-withdependencies.jar" value="${final.name}-withdependencies.jar"/>
73
    <property name="artifact.pig-sources.jar" value="${final.name}-sources.jar"/>
74
    <property name="artifact.pig-sources.jar" value="${final.name}-sources.jar"/>
74
    <property name="artifact.pig-javadoc.jar" value="${final.name}-javadoc.jar"/>
75
    <property name="artifact.pig-javadoc.jar" value="${final.name}-javadoc.jar"/>
75
    <property name="artifact.pig.tar" value="${final.name}.tar.gz"/>
76
    <property name="artifact.pig.tar" value="${final.name}.tar.gz"/>
76

    
   
77

   
77
    <!-- jar names. TODO we might want to use the svn reversion name in the name in case it is a dev version -->
78
    <!-- jar names. TODO we might want to use the svn reversion name in the name in case it is a dev version -->
78
    <property name="output.jarfile.withdependencies" value="${build.dir}/${artifact.pig-withdependencies.jar}" />
79
    <property name="output.jarfile.withdependencies" value="${build.dir}/${artifact.pig-withdependencies.jar}" />
79
    <property name="output.stage.jarfile.withdependencies" value="${build.dir}/${final.name}-withdependencies.stage.jar" />
80
    <property name="output.stage.jarfile.withdependencies" value="${build.dir}/${final.name}-withdependencies.stage.jar" />
80
    <property name="output.jarfile.withouthadoop" value="${build.dir}/${artifact.pig-withouthadoop.jar}" />
81
    <property name="output.jarfile.withouthadoop" value="${build.dir}/${artifact.pig-withouthadoop.jar}" />
81
    <property name="output.jarfile.core" value="${build.dir}/${artifact.pig.jar}" />
82
    <property name="output.jarfile.core" value="${build.dir}/${artifact.pig.jar}" />

    
   
83
    <property name="output.jarfile.core-h2" value="${build.dir}/${artifact.pig-h2.jar}" />
82
    <property name="output.jarfile.sources" value="${build.dir}/${artifact.pig-sources.jar}" />
84
    <property name="output.jarfile.sources" value="${build.dir}/${artifact.pig-sources.jar}" />
83
    <property name="output.jarfile.javadoc" value="${build.dir}/${artifact.pig-javadoc.jar}" />
85
    <property name="output.jarfile.javadoc" value="${build.dir}/${artifact.pig-javadoc.jar}" />
84
    <!-- Maintain old pig.jar in top level directory. -->
86
    <!-- Maintain old pig.jar in top level directory. -->
85
    <property name="output.jarfile.backcompat.withouthadoop" value="${basedir}/${name}-withouthadoop.jar" />
87
    <property name="output.jarfile.backcompat.withouthadoop" value="${basedir}/${name}-withouthadoop.jar" />
86
    <property name="output.jarfile.backcompat" value="${basedir}/${name}.jar" />
88
    <property name="output.jarfile.backcompat" value="${basedir}/${name}.jar" />
[+20] [20] 569 lines
[+20]
656
    <!-- ================================================================== -->
658
    <!-- ================================================================== -->
657
    <target name="jar" depends="compile" description="Create pig-all.jar">
659
    <target name="jar" depends="compile" description="Create pig-all.jar">
658
        <antcall target="jarWithSvn" inheritRefs="true" inheritall="true"/>
660
        <antcall target="jarWithSvn" inheritRefs="true" inheritall="true"/>
659
        <antcall target="jarWithOutSvn" inheritRefs="true" inheritall="true"/>
661
        <antcall target="jarWithOutSvn" inheritRefs="true" inheritall="true"/>
660
    </target>
662
    </target>
661
    
663

   

    
   
664
    <scriptdef name="propertyreset" language="javascript"

    
   
665
        description="Allows to assign @{property} new value">

    
   
666
        <attribute name="name"/>

    
   
667
        <attribute name="value"/>

    
   
668
           project.setProperty(attributes.get("name"), attributes.get("value"));

    
   
669
    </scriptdef>

    
   
670

   

    
   
671
    <target name="mvn-jar" description="Create pig.jar for Hadoop23">

    
   
672
        <propertyreset name="hadoopversion" value="23" />

    
   
673
        <propertyreset name="isHadoop" value="true" />

    
   
674
        <propertyreset name="src.shims.dir" value="${basedir}/shims/src/hadoop${hadoopversion}" />

    
   
675
        <antcall target="clean" inheritRefs="true" inheritall="true"/>

    
   
676
        <antcall target="jar" inheritRefs="true" inheritall="true"/>

    
   
677
        <move file="${output.jarfile.core}" tofile="${basedir}/${artifact.pig-h2.jar}"/>

    
   
678
        <antcall target="clean" inheritRefs="true" inheritall="true"/>

    
   
679
        <propertyreset name="hadoopversion" value="20" />

    
   
680
        <propertyreset name="isHadoop" value="" />

    
   
681
        <propertyreset name="src.shims.dir" value="${basedir}/shims/src/hadoop${hadoopversion}" />

    
   
682
        <antcall target="jar" inheritRefs="true" inheritall="true"/>

    
   
683
        <move file="${basedir}/${artifact.pig-h2.jar}" tofile="${output.jarfile.core-h2}"/>

    
   
684
    </target>

    
   
685

   
662
    <target name="jarWithSvn" if="svn.revision">
686
    <target name="jarWithSvn" if="svn.revision">
663
        <antcall target="buildJar" inheritRefs="true" inheritall="true">
687
        <antcall target="buildJar" inheritRefs="true" inheritall="true">
664
            <param name="svnString" value="${svn.revision}" />
688
            <param name="svnString" value="${svn.revision}" />
665
        </antcall>
689
        </antcall>
666
    </target>
690
    </target>
[+20] [20] 661 lines
[+20]
1328
          <artifact:install file="${smoke.tests.jarfile}">
1352
          <artifact:install file="${smoke.tests.jarfile}">
1329
               <pom refid="pigsmoke"/>
1353
               <pom refid="pigsmoke"/>
1330
         </artifact:install>
1354
         </artifact:install>
1331
    </target>
1355
    </target>
1332

    
   
1356

   
1333
    <target name="mvn-deploy" depends="mvn-taskdef,jar,source-jar, javadoc-jar,
1357
    <target name="mvn-deploy" depends="mvn-taskdef, mvn-jar, source-jar, javadoc-jar,
1334
         smoketests-jar, pigunit-jar, set-version, signanddeploy, simpledeploy"
1358
         smoketests-jar, pigunit-jar, set-version, signanddeploy, simpledeploy"
1335
         description="To deploy pig jar to apache snapshot's repository">
1359
         description="To deploy pig jar to apache snapshot's repository">
1336
    </target>
1360
    </target>
1337

    
   
1361

   
1338
     <target name="signanddeploy" if="staging" depends="sign">
1362
     <target name="signanddeploy" if="staging" depends="sign">
1339
        <artifact:pom file="${pig.pom}" id="pig"/>
1363
        <artifact:pom file="${pig.pom}" id="pig"/>
1340
        <artifact:install-provider artifactId="wagon-http" version="${wagon-http.version}"/>
1364
        <artifact:install-provider artifactId="wagon-http" version="${wagon-http.version}"/>
1341
        <artifact:deploy file="${output.jarfile.core}">
1365
        <artifact:deploy file="${output.jarfile.core}">
1342
        <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
1366
        <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
1343
        <pom refid="pig"/>
1367
        <pom refid="pig"/>
1344
     	   <attach file="${output.jarfile.core}.asc" type="jar.asc"/>
1368
           <attach file="${output.jarfile.core}.asc" type="jar.asc"/>
1345
     	   <attach file="${pig.pom}.asc" type="pom.asc"/>
1369
           <attach file="${pig.pom}.asc" type="pom.asc"/>

    
   
1370
           <attach file="${output.jarfile.core-h2}.asc" type="jar.asc" classifier="h2"/>

    
   
1371
           <attach file="${output.jarfile.core-h2}" classifier="h2" />
1346
           <attach file="${output.jarfile.sources}.asc" type="jar.asc" classifier="sources"/>
1372
           <attach file="${output.jarfile.sources}.asc" type="jar.asc" classifier="sources"/>
1347
           <attach file="${output.jarfile.sources}" classifier="sources" />
1373
           <attach file="${output.jarfile.sources}" classifier="sources" />
1348
           <attach file="${output.jarfile.javadoc}.asc" type="jar.asc"  classifier="javadoc"/>
1374
           <attach file="${output.jarfile.javadoc}.asc" type="jar.asc"  classifier="javadoc"/>
1349
           <attach file="${output.jarfile.javadoc}" classifier="javadoc" />
1375
           <attach file="${output.jarfile.javadoc}" classifier="javadoc" />
1350
        </artifact:deploy>
1376
        </artifact:deploy>
1351
    </target>
1377
    </target>
1352

    
   
1378

   
1353
    <target name="simpledeploy" unless="staging">
1379
    <target name="simpledeploy" unless="staging">
1354
      <artifact:pom file="${pig.pom}" id="pig"/>
1380
      <artifact:pom file="${pig.pom}" id="pig"/>
1355
      <artifact:install-provider artifactId="wagon-http" version="${wagon-http.version}"/>
1381
      <artifact:install-provider artifactId="wagon-http" version="${wagon-http.version}"/>
1356
      <artifact:deploy file="${output.jarfile.core}">
1382
      <artifact:deploy file="${output.jarfile.core}">
1357
              <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
1383
              <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
1358
              <pom refid="pig"/>
1384
              <pom refid="pig"/>

    
   
1385
          <attach file="${output.jarfile.core-h2}" classifier="h2" />
1359
          <attach file="${output.jarfile.sources}" classifier="sources" />
1386
          <attach file="${output.jarfile.sources}" classifier="sources" />
1360
      	  <attach file="${output.jarfile.javadoc}" classifier="javadoc" />
1387
          <attach file="${output.jarfile.javadoc}" classifier="javadoc" />
1361
      </artifact:deploy>
1388
      </artifact:deploy>
1362
      <artifact:pom file="${pigunit.pom}" id="pigunit"/>
1389
      <artifact:pom file="${pigunit.pom}" id="pigunit"/>
1363
      <artifact:deploy file="${pigunit.jarfile}">
1390
      <artifact:deploy file="${pigunit.jarfile}">
[+20] [20] 4 lines
[+20]
1368
      <artifact:deploy file="${smoke.tests.jarfile}">
1395
      <artifact:deploy file="${smoke.tests.jarfile}">
1369
              <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
1396
              <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
1370
              <pom refid="pigsmoke"/>
1397
              <pom refid="pigsmoke"/>
1371
      </artifact:deploy>
1398
      </artifact:deploy>
1372
   </target>
1399
   </target>
1373
	
1400

   
1374
    <target name="sign" depends="clean-sign" if="staging">
1401
    <target name="sign" depends="clean-sign" if="staging">
1375
       <input message="password:>" addproperty="gpg.passphrase">
1402
       <input message="password:>" addproperty="gpg.passphrase">
1376
        <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
1403
        <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
1377
       </input>
1404
       </input>
1378
       <macrodef name="sign-artifact" description="Signs the artifact">
1405
       <macrodef name="sign-artifact" description="Signs the artifact">
[+20] [20] 13 lines
[+20]
1392
           </exec>
1419
           </exec>
1393
         </sequential>
1420
         </sequential>
1394
       </macrodef>
1421
       </macrodef>
1395
       <sign-artifact input.file="${output.jarfile.core}"
1422
       <sign-artifact input.file="${output.jarfile.core}"
1396
        output.file="${output.jarfile.core}.asc" gpg.passphrase="${gpg.passphrase}"/>
1423
        output.file="${output.jarfile.core}.asc" gpg.passphrase="${gpg.passphrase}"/>

    
   
1424
       <sign-artifact input.file="${output.jarfile.core-h2}"

    
   
1425
        output.file="${output.jarfile.core-h2}.asc" gpg.passphrase="${gpg.passphrase}"/>
1397
       <sign-artifact input.file="${output.jarfile.sources}"
1426
       <sign-artifact input.file="${output.jarfile.sources}"
1398
        output.file="${output.jarfile.sources}.asc" gpg.passphrase="${gpg.passphrase}"/>
1427
        output.file="${output.jarfile.sources}.asc" gpg.passphrase="${gpg.passphrase}"/>
1399
       <sign-artifact input.file="${output.jarfile.javadoc}"
1428
       <sign-artifact input.file="${output.jarfile.javadoc}"
1400
    	output.file="${output.jarfile.javadoc}.asc" gpg.passphrase="${gpg.passphrase}"/>
1429
        output.file="${output.jarfile.javadoc}.asc" gpg.passphrase="${gpg.passphrase}"/>
1401
    	<sign-artifact input.file="${pig.pom}"
1430
       <sign-artifact input.file="${pig.pom}"
[+20] [20] 379 lines
  1. http://svn.apache.org/repos/asf/pig/trunk/build.xml: Loading...