Skip to content

Commit

Permalink
make the build.xml and ivy.xml files look the same
Browse files Browse the repository at this point in the history
Conflicts:

	build.xml
  • Loading branch information
ohrite authored and cwensel committed Oct 10, 2011
1 parent 5f5984d commit 3b658ce
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 90 deletions.
127 changes: 58 additions & 69 deletions build.xml
@@ -1,73 +1,77 @@
<?xml version="1.0"?> <?xml version="1.0"?>


<!-- <!--
~ Copyright (c) 2010 Concurrent, Inc. All Rights Reserved. ~ Copyright (c) 2007-2011 Concurrent, Inc. All Rights Reserved.
~ ~
~ Project and contact information: http://www.concurrentinc.com/ ~ Project and contact information: http://www.cascading.org/
~
~ This file is part of the Cascading project.
~
~ Cascading is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Cascading is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Cascading. If not, see <http://www.gnu.org/licenses/>.
--> -->


<project name="cascading.load" default="build" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> <project name="load" default="compile" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">

<dirname property="load.basedir" file="${ant.file.load}"/>


<!-- load properties first --> <!-- load properties first -->
<property file="../build.properties"/> <property file="../build.properties"/>
<property file="./build.properties"/> <property file="./build.properties"/>


<property name="src.license" location="${basedir}/LICENSE.txt"/> <property name="src.license" location="${load.basedir}/LICENSE.txt"/>


<property name="src.dir" location="${basedir}/src/java"/> <property name="src.dir" location="${load.basedir}/src/java"/>
<property name="src.data" location="${basedir}/src/data"/> <property name="src.test" location="${load.basedir}/src/test"/>
<property name="src.test" location="${basedir}/src/test"/>


<available file="${src.dir}" type="dir" property="main.available"/> <available file="${src.dir}" type="dir" property="main.available"/>
<available file="${src.test}" type="dir" property="test.available"/> <available file="${src.test}" type="dir" property="test.available"/>


<property name="lib.dir" location="${basedir}/lib"/> <property name="lib.dir" location="${load.basedir}/lib"/>
<property name="compile.lib.dir" location="${lib.dir}/compile"/>
<property name="runtime.lib.dir" location="${lib.dir}/runtime"/>
<property name="test.lib.dir" location="${lib.dir}/test"/>


<property name="build.dir" location="${basedir}/build/"/> <property name="scripts.dir" location="${load.basedir}/bin"/>

<property name="build.dir" location="${load.basedir}/build/"/>
<property name="build.classes" location="${build.dir}/classes"/> <property name="build.classes" location="${build.dir}/classes"/>
<property name="build.test" location="${build.dir}/test"/> <property name="build.test" location="${build.dir}/test"/>
<property name="build.deps" location="${build.dir}/deps"/>


<property name="test.results" location="${build.dir}/testresults"/> <property name="test.results" location="${build.dir}/testresults"/>
<property name="test.showoutput" value="no"/> <property name="test.showoutput" value="no"/>


<property name="dist" location="dist"/> <property name="dist" location="dist"/>


<fileset id="lib.compile.fileset" dir="${compile.lib.dir}">
<include name="*.jar"/>
</fileset>

<fileset id="lib.runtime.fileset" dir="${runtime.lib.dir}">
<include name="*.jar"/>
</fileset>

<fileset id="lib.test.fileset" dir="${test.lib.dir}">
<include name="*.jar"/>
</fileset>


<path id="project.class.path"> <path id="project.class.path">
<pathelement location="${build.classes}"/> <pathelement location="${build.classes}"/>
<pathelement location="${build.test}"/> <pathelement location="${build.test}"/>


<fileset refid="lib.compile.fileset"/> <fileset dir="${lib.dir}">
<fileset refid="lib.runtime.fileset"/> <include name="*.jar"/>
<fileset refid="lib.test.fileset"/> </fileset>

<fileset dir="${build.deps}">
<include name="*.jar"/>
</fileset>
</path> </path>


<target name="clean"> <target name="clean">

<echo message="cleaning..."/> <echo message="cleaning..."/>
<delete dir="${build.dir}"/> <delete dir="${build.dir}"/>
<delete dir="${dist}"/> <delete dir="${dist}"/>
<delete dir="${ant.project.name}.tgz"/> <delete dir="${ant.project.name}.tgz"/>

</target> </target>


<target name="compile"> <target name="compile">

<echo message="building..."/> <echo message="building..."/>
<mkdir dir="${build.classes}"/> <mkdir dir="${build.classes}"/>


Expand All @@ -81,16 +85,10 @@
</fileset> </fileset>
</copy> </copy>


<copy todir="${build.classes}"> <copy file="${src.license}" tofile="${build.classes}/LOAD-LICENSE.txt"/>
<fileset dir="${src.data}">
<exclude name="**/*.java"/>
</fileset>
</copy>

</target> </target>


<target name="compile-test"> <target name="compile-test">

<echo message="building..."/> <echo message="building..."/>
<mkdir dir="${build.test}"/> <mkdir dir="${build.test}"/>
<mkdir dir="${lib.dir}"/> <mkdir dir="${lib.dir}"/>
Expand All @@ -104,7 +102,6 @@
<exclude name="**/*.java"/> <exclude name="**/*.java"/>
</fileset> </fileset>
</copy> </copy>

</target> </target>


<!-- runs roundup.sh test plans --> <!-- runs roundup.sh test plans -->
Expand Down Expand Up @@ -157,41 +154,34 @@
</target> </target>


<target name="jar" depends="compile" description="creates a Hadoop ready jar will all dependencies"> <target name="jar" depends="compile" description="creates a Hadoop ready jar will all dependencies">

<tstamp>
<!-- copy Cascading classes and libraries --> <format property="TIMESTAMP" pattern="yyyy-MM-dd HH:mm:ss"/>
<copy todir="${build.classes}/lib"> </tstamp>
<fileset refid="lib.compile.fileset"/>
<mapper type="flatten"/>
</copy>


<jar jarfile="${build.dir}/${ant.project.name}.jar"> <jar jarfile="${build.dir}/${ant.project.name}.jar">
<fileset dir="${build.classes}"/> <fileset dir="${build.classes}"/>
<fileset dir="${load.basedir}" includes="lib/"/>
<manifest> <manifest>
<attribute name="Main-Class" value="${ant.project.name}/Main"/> <attribute name="Main-Class" value="${ant.project.name}/Main"/>
<attribute name="Build-Date" value="${TIMESTAMP}"/>
</manifest> </manifest>
</jar> </jar>

</target> </target>


<target name="dist" depends="clean,jar,stamp-jar" description="packages current project"> <target name="dist" depends="clean,retrieve,jar,stamp-jar" description="packages current project">

<mkdir dir="${dist}"/> <mkdir dir="${dist}"/>


<copy todir="${dist}"> <copy todir="${dist}">

<fileset dir="."> <fileset dir=".">
<include name="bin/**"/> <include name="bin/**"/>
<include name="data/**"/> <include name="data/**"/>
<include name="src/**"/> <include name="bin/**"/>
<include name="lib/**"/> <include name="README.txt"/>
<include name="build.xml"/>
<include name="README.TXT"/>
</fileset> </fileset>


<fileset dir="${build.dir}"> <fileset dir="${build.dir}">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>

</copy> </copy>


<copy file="${src.license}" tofile="${dist}/LICENSE.txt"/> <copy file="${src.license}" tofile="${dist}/LICENSE.txt"/>
Expand All @@ -201,23 +191,27 @@
<include name="**"/> <include name="**"/>
</fileset> </fileset>
</chmod> </chmod>

</target> </target>


<target name="tar" depends="dist" description="creates an archive of current project"> <target name="tar" depends="dist" description="creates an archive of current project">
<tar destfile="${ant.project.name}-${DSTAMP}.tgz" <tar destfile="${ant.project.name}-${DSTAMP}.tgz"
compression="gzip"> compression="gzip">
<tarfileset dir="dist/" prefix="${ant.project.name}-${DSTAMP}"> <tarfileset dir="dist/" prefix="${ant.project.name}-${DSTAMP}">
<include name="**/**"/> <include name="**/**"/>
<exclude name="bin/**"/>
</tarfileset>
<tarfileset dir="dist/" prefix="${ant.project.name}-${DSTAMP}" filemode="744">
<include name="bin/**"/>
</tarfileset> </tarfileset>
</tar> </tar>
</target> </target>


<target name="s3-package" if="package.remote.bucket"> <target name="s3-package" if="package.remote.bucket">

<taskdef name="S3Upload" classname="dak.ant.taskdefs.S3Upload"/> <taskdef name="S3Upload" classname="dak.ant.taskdefs.S3Upload"/>


<echo message="http://${package.remote.bucket}/multitool/${ant.project.name}-${DSTAMP}.tgz" <property file="${package.aws.properties}"/>

<echo message="http://${package.remote.bucket}/load/${ant.project.name}-${DSTAMP}.tgz"
file="${ant.project.name}-current.txt"/> file="${ant.project.name}-current.txt"/>


<S3Upload verbose="true" <S3Upload verbose="true"
Expand All @@ -231,29 +225,24 @@
</S3Upload> </S3Upload>


<property name="package.remote.port" value="22"/> <property name="package.remote.port" value="22"/>

<scp file="${ant.project.name}-current.txt" <scp file="${ant.project.name}-current.txt"
remoteTofile="${package.remote.path}/${ant.project.name}/${ant.project.name}-${DSTAMP}.tgz" remoteTofile="${package.remote.path}/${ant.project.name}/${ant.project.name}-${DSTAMP}.tgz"
keyfile="${package.remote.keyfile}" keyfile="${package.remote.keyfile}"
passphrase="" port="${package.remote.port}" trust="true"/> passphrase="" port="${package.remote.port}" trust="true"/>


<delete file="${ant.project.name}-current.txt"/> <delete file="${ant.project.name}-current.txt"/>

</target> </target>


<target name="publish" depends="clean,test,tar,s3-package"/> <target name="publish" depends="clean,retrieve,test,tar,s3-package"/>


<target name="retrieve"> <target name="retrieve">

<ivy:settings id="ivy.conjars.settings" url="http://conjars.org/repo/ivysettings.xml"/> <ivy:settings id="ivy.conjars.settings" url="http://conjars.org/repo/ivysettings.xml"/>


<!--<ivy:cleancache settingsRef="ivy.conjars.settings"/>--> <ivy:retrieve file="${multitool.basedir}/ivy.xml" settingsRef="ivy.conjars.settings" conf="default"

pattern="${lib.dir}/[artifact]-[revision].[ext]" sync="true"/>
<!--<ivy:resolve settingsRef="ivy.conjars.settings" transitive="false"/>-->

<ivy:retrieve settingsRef="ivy.conjars.settings"
conf="compile,runtime,test"
pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" sync="true"/>


<ivy:retrieve file="${multitool.basedir}/ivy.xml" settingsRef="ivy.conjars.settings" conf="test"
pattern="${build.dir}/deps/[artifact]-[revision].[ext]" sync="true"/>
</target> </target>

</project>
</project>
34 changes: 13 additions & 21 deletions ivy.xml
@@ -1,43 +1,35 @@
<!-- <!--
~ Copyright (c) 2010 Concurrent, Inc. All Rights Reserved. ~ Copyright (c) 2011 Concurrent, Inc. All Rights Reserved.
~ ~
~ Project and contact information: http://www.concurrentinc.com/ ~ Project and contact information: http://www.concurrentinc.com/
--> -->


<ivy-module version="2.0"> <ivy-module version="2.0">

<info organisation="cascading" module="cascading-load" revision="${cascading.release.full}">
<info organisation="cascading" module="cascading-load" revision=""> <license name="GNU General Public License version 3" url="http://www.gnu.org/licenses/"/>

<license name="Apache 2" url="http://www.apache.org/licenses/LICENSE-2.0.txt"/>

<ivyauthor name="Concurrent, Inc." url="http://concurrentinc.com/"/> <ivyauthor name="Concurrent, Inc." url="http://concurrentinc.com/"/>

<description homepage="http://cascading.org">
<description homepage="http://github.com/cwensel/cascading.load">
</description> </description>
</info> </info>


<configurations> <configurations>
<conf name="compile"/> <conf name="default"/>
<conf name="runtime"/>
<conf name="test"/> <conf name="test"/>
</configurations> </configurations>


<dependencies> <dependencies>
<dependency org="cascading" name="cascading-core" rev="1.2.3" conf="default"/>
<dependency org="cascading" name="cascading-test" rev="1.2.3" conf="test->default"/>
<dependency org="args4j" name="args4j" rev="2.0.12" conf="default"/>


<dependency org="cascading" name="cascading-core" rev="1.2.3" conf="compile->master,compile" <dependency org="org.apache.hadoop" name="hadoop-core" rev="0.20.2" conf="test->default">
changing="true"/>
<dependency org="args4j" name="args4j" rev="2.0.12" conf="compile->default"/>

<dependency org="org.apache.hadoop" name="hadoop-core" rev="0.20.2" conf="runtime->default">
<exclude org="ant"/> <exclude org="ant"/>
</dependency> </dependency>
<dependency org="org.apache.hadoop" name="hadoop-test" rev="0.20.2" conf="runtime->default"/> <dependency org="org.apache.hadoop" name="hadoop-test" rev="0.20.2" conf="test->default"/>
<dependency org="log4j" name="log4j" rev="1.2.15" conf="runtime->master"/>


<dependency org="cascading" name="cascading-test" rev="1.2.3" conf="test->master,compile" <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.4.3" conf="test->default">
changing="true"/> </dependency>


<dependency org="junit" name="junit" rev="4.4" conf="test->default"/>
</dependencies> </dependencies>

</ivy-module> </ivy-module>

0 comments on commit 3b658ce

Please sign in to comment.