alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
<project name="Custom tasks jar" default="build" basedir="..">

	<target name="build" description="Removes all build artifacts, recreates the support jar, and refreshes this plugin's resources" depends="clean, lib/antTasks.jar"/>

	<target name="init" depends="properties">
		<property name="temp.folder" value="${basedir}/temp.folder"/>
		<property name="plugin.destination" value="${basedir}"/>
		<property name="build.result.folder" value="${basedir}"/>
	</target>

	<target name="properties" if="eclipse.running">
		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
	</target>

	<path id="sourcePath">
		<pathelement location="Ant Tasks/"/>
	</path>
	
	<target name="lib/antTasks.jar" depends="init" description= "Builds the custom tasks JAR">
		<property name="destdir" value="${temp.folder}/lib/antTasks.jar.bin"/>
		<delete dir="${temp.folder}/lib/antTasks.jar.bin"/>
		<mkdir dir="${temp.folder}/lib/antTasks.jar.bin"/>
		<!-- compile the source code -->
		<javac target="1.1" destdir="${temp.folder}/lib/antTasks.jar.bin" failonerror="false" verbose="false" debug="on" includeAntRuntime="yes">
			<src refid="sourcePath"/>
		</javac>
		<mkdir dir="${build.result.folder}/lib"/>
		<jar destfile="${build.result.folder}/lib/antTasks.jar" basedir="${temp.folder}/lib/antTasks.jar.bin"/>
		<delete dir="${temp.folder}"/>
	</target>

	<target name="clean" depends="init">
		<delete file="${build.result.folder}/lib/antTasks.jar"/>
		<delete dir="${temp.folder}"/>
	</target>
</project>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.