Anonymous avatar Anonymous committed 8e6ed4c

First cut at ant/ivy build scripts.

git-svn-id: http://svn.opensymphony.com/svn/propertyset/branches/ivy_build@198 bf3cbcdd-1c1a-0410-9a68-d6f521e3fa7b

Comments (0)

Files changed (9)

ant/clean-plugin.xml

+<project name="clean-plugin">
+<!-- **********************************************************************
+		INPUTS
+		
+		clean.exclude.default.directories - exclude default directories from deletion
+		clean.include.other.directories - a single directory or a fileset to delete, optional
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+	<property name="clean.exclude.default.directories" value="false"/>
+
+	<target name="clean:clean" depends="clean:build, clean:lib, clean:local">
+	</target>
+
+	<target name="clean:build">
+        <delete dir="${project.build.output.dir}"/>
+        <delete dir="${project.build.test.output.dir}"/>
+        <delete dir="${project.build.dir}"/>
+	</target>
+
+	<target name="clean:lib">
+        <delete dir="${project.lib.dir}"/>
+	</target>
+
+	<target name="clean:local">
+	</target>
+
+	<target name="clean:help">
+	</target>
+	
+</project>

ant/compiler-plugin.xml

+<project name="compiler-plugin"  xmlns:ivy="antlib:org.apache.ivy.ant">
+<!-- **********************************************************************
+		INPUTS
+		
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+	<target name="compiler:compile">
+		<mkdir dir="${project.build.output.dir}" />
+	
+		<ivy:retrieve conf="compile" pattern="${build.lib.pattern}" sync="true" />
+		
+		<path id="project.compile.classpath">
+			<fileset dir="${project.lib.dir}/compile" includes="*.jar"/>
+		</path>
+
+		<javac srcdir="${project.build.source.dir}" destdir="${project.build.output.dir}">
+			<classpath refid="project.compile.classpath" />
+		</javac>
+	</target>
+
+	<target name="compiler:test-compile">
+		<mkdir dir="${project.build.test.output.dir}" />
+
+		<ivy:retrieve conf="test" pattern="${build.lib.pattern}" sync="true" />
+
+		<path id="project.test-compile.classpath">
+			<fileset dir="${ivy.lib.dir}" includes="*.jar"/>
+		</path>
+
+		<javac srcdir="${project.build.test.source.dir}" destdir="${project.build.test.output.dir}">
+			<classpath refid="project.test-compile.classpath" />
+		</javac>
+	</target>
+
+	<target name="compiler:help">
+	</target>
+	
+</project>

ant/dependency-plugin.xml

+<project name="dependency-plugin">
+<!-- **********************************************************************
+		INPUTS
+		
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+
+	<target name="dependency:resolve">
+		<ivy:resolve />
+	</target>
+
+	<target name="dependency:retrieve">
+		<ivy:retrieve />
+	</target>
+
+	<target name="dependency:report">
+		<ivy:report />
+	</target>
+
+	<target name="dependency:help">
+	</target>
+	
+</project>

ant/jar-module.xml

+<project name="jar-module">
+
+<!-- ====================================================================== -->
+<!-- REQUIRED INPUTS -->
+<!-- OPTIONAL INPUTS -->
+<!-- ====================================================================== -->
+
+	<import file="module.xml" />
+
+	<import file="resources-plugin.xml" />
+	<import file="compiler-plugin.xml" />
+	<import file="test-plugin.xml" />
+	<import file="package-plugin.xml" />
+
+<!-- ====================================================================== -->
+<!-- PROJECT PROPERTIES -->
+<!-- ====================================================================== -->
+
+
+<!-- ====================================================================== -->
+<!-- COMMON PROPERTIES -->
+<!-- ====================================================================== -->
+
+
+<!-- ====================================================================== -->
+<!-- BUILD LIFECYCLE -->
+<!-- ====================================================================== -->
+
+	<target name="process-resources" depends="module.process-resources, resources:resources" />
+
+	<target name="compile" depends="module.compile, compiler:compile" />
+
+	<target name="process-test-resources" depends="module.process-test-resources, resources:test-resources" />
+
+	<target name="test-compile" depends="module.test-compile, compiler:test-compile" />
+
+	<target name="test" depends="module.test, test:test" />
+
+	<target name="package" depends="module.package, package:jar, package:test-jar, package:source-jar" />
+
+</project>
+<project name="module">
+
+<!-- ====================================================================== -->
+<!-- REQUIRED INPUTS -->
+<!-- 		project.group.id -->
+<!-- 		project.artifact.id -->
+<!-- 		project.version -->
+<!-- OPTIONAL INPUTS -->
+<!-- 		project.name -->
+<!-- 		project.description -->
+<!--        project.packaging - defaults to jar -->
+<!-- ====================================================================== -->
+
+
+<!-- ====================================================================== -->
+<!-- PROJECT PROPERTIES -->
+<!-- ====================================================================== -->
+
+	<property name="project.base.dir" value="${basedir}" />
+	<property name="project.lib.dir" value="${basedir}/lib" />
+	<property name="project.build.dir" value="${project.base.dir}/target" />
+	<property name="project.build.output.dir" value="${project.build.dir}/classes" />
+	<property name="project.build.final.name" value="${project.artifact.id}-${project.version}" />
+	<property name="project.build.test.output.dir" value="${project.build.dir}/test-classes" />
+	<property name="project.build.source.dir" value="${project.base.dir}/src/main/java" />
+	<property name="project.build.test.source.dir" value="${project.base.dir}/src/test/java" />
+	<property name="project.build.resource.dir" value="${project.base.dir}/src/main/resources" />
+	<property name="project.build.test.resource.dir" value="${project.base.dir}/src/test/resources" />
+
+<!-- ====================================================================== -->
+<!-- COMMON PROPERTIES -->
+<!-- ====================================================================== -->
+
+	<property name="help.detail" value="false" />
+	<property name="help.indent.size" value="2" />
+	<property name="help.line.length" value="80" />
+	<property name="build.timestamp.format" value="yyyyMMdd-HHmm" />
+	<property name="build.lib.pattern" value="${project.lib.dir}/[conf]/[artifact]-[revision].[ext]" />
+
+
+<!-- ====================================================================== -->
+<!-- DEFAULT PLUG-INS -->
+<!-- ====================================================================== -->
+
+	<import file="clean-plugin.xml" />
+
+<!-- ====================================================================== -->
+<!-- CLEAN LIFECYCLE -->
+<!-- ====================================================================== -->
+
+	<target name="pre-clean">
+        <!-- configure ivy here? -->
+	</target>
+
+	<target name="clean" depends="pre-clean, clean:build" />
+
+	<target name="post-clean" depends="clean" />
+
+<!-- ====================================================================== -->
+<!-- BUILD LIFECYCLE -->
+<!-- ====================================================================== -->
+
+	<!-- check that required properties are set -->
+	<target name="validate" />
+	
+	<!-- set project properties and create directories -->
+	<target name="initialize" depends="validate">
+        <tstamp>
+            <format property="build.timestamp" pattern="${build.timestamp.format}" />
+        </tstamp>
+        <!-- configure ivy here? -->
+	</target>
+
+	<target name="generate-sources" depends="initialize" />
+
+	<target name="process-sources" depends="generate-sources" />
+
+	<target name="generate-resources" depends="process-sources" />
+
+	<target name="process-resources" depends="generate-resources" />
+
+	<target name="compile" depends="process-resources" />
+
+	<target name="process-classes" depends="compile" />
+
+	<target name="generate-test-sources" depends="process-classes" />
+
+	<target name="process-test-sources" depends="generate-test-sources" />
+
+	<target name="generate-test-resources" depends="process-test-sources" />
+
+	<target name="process-test-resources" depends="generate-test-resources" />
+
+	<target name="test-compile" depends="process-test-resources" />
+
+	<target name="process-test-classes" depends="test-compile" />
+
+	<target name="test" depends="process-test-classes" />
+
+	<target name="prepare-package" depends="test" />
+
+	<target name="package" depends="prepare-package" />
+
+	<target name="pre-integration-test" depends="package" />
+
+	<target name="integration-test" depends="pre-integration-test" />
+
+	<target name="post-integration-test" depends="integration-test" />
+
+	<target name="verify" depends="post-integration-test" />
+
+	<target name="publish" depends="verify" />
+
+	<target name="deploy" depends="publish" />
+
+</project>

ant/package-plugin.xml

+<project name="package-plugin" xmlns:ivy="antlib:org.apache.ivy.ant">
+<!-- **********************************************************************
+		INPUTS
+		
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+	<target name="package:jar">
+		<ivy:retrieve conf="runtime" />
+	</target>
+
+	<target name="package:test-jar">
+	</target>
+
+	<target name="package:source-jar">
+	</target>
+
+	<target name="package:help">
+	</target>
+	
+</project>

ant/publish-plugin.xml

+<project name="publish-plugin">
+<!-- **********************************************************************
+		INPUTS
+		
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+
+	<target name="publish:publish">
+	</target>
+
+	<target name="publish:help">
+	</target>
+	
+</project>

ant/resources-plugin.xml

+<project name="resources-plugin">
+<!-- **********************************************************************
+		INPUTS
+		resources.output.dir - the directory to copy resources to, defaults to ${project.build.output.dir}
+		resources.test.output.dir - the directory to copy resources to, defaults to ${project.build.test.output.dir}
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+	<property name="resources.output.dir" value="${project.build.output.dir}"/>
+	<property name="resources.test.output.dir" value="${project.build.test.output.dir}"/>
+
+	<!-- copies resources from main source to main output directory, optionally filtering on copy -->
+	<target name="resources:resources">
+		<mkdir dir="${project.build.output.dir}" />
+	</target>
+
+	<!-- copies resources from test source to test output directory, optionally filtering on copy -->
+	<target name="resources:test-resources">
+		<mkdir dir="${project.build.test.output.dir}" />
+	</target>
+
+	<target name="resources:help">
+	</target>
+	
+</project>

ant/test-plugin.xml

+<project name="test-plugin">
+<!-- **********************************************************************
+		INPUTS
+		
+		
+		help.detail
+		help.indent.size
+		help.line.length
+		help.goal - if provided displays help for the specified goal, otherwise displays help for all goals
+
+		
+     ********************************************************************** -->
+
+
+	<target name="test:test">
+	</target>
+
+	<target name="test:help">
+	</target>
+	
+</project>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.