Newsgroup: it.fan.studio-vit
Titolo: build file


scrisse:
-
	<!--
 ! mcube
 !
 ! see Apache Ant documentation: 
http://jakarta.apache.org/ant
-->
-
	<project name="mcube" default="jar" basedir=".">
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="dist" location="dist"/>
<property name="build" location="build"/>
<!-- change this value to the name of the application -->
<property name="
app.name
" value="mcube"/>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     BUILD ADMINISTRATION
     Create build directories and set up necessary paths.
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="init_Jesse">
-
	<path id="project.classpath">
-
	<fileset dir="lib/">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
</target>
-
	<target name="init">
<!-- Create the time stamp -->
<tstamp/>
-
	<!--
 Create the build directory structure used by compile 
-->
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
-
	<path id="project.classpath">
-
	<fileset dir="lib/">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
</target>
-
	<target name="clean" description="Clean up generated files,
forcing them to be rebuilt.">
-
	<!--
 Delete the directories where generated files fall 
-->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     JAR
     Construct the .jar file for use in a library.
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="jar" depends="init" description="Creates
mcube.jar file.">
-
	<pathconvert property="manifest.classpath"
refid="project.classpath" pathsep=" ">
<map from="${basedir}/lib" to="lib"/>
</pathconvert>
<echo message="client classpath: ${manifest.classpath}"/>
-
	<jar destfile="${build}/mcube.jar" update="true">
-
	<fileset dir="classes">
<exclude name="**/**Test.class"/>
<exclude name="**/**Test$*.class"/>
<exclude name="**/*jdic.jar"/>
</fileset>
-
	<manifest>
<attribute name="Main-Class" value="net.mcube.MusicManager"/>
<attribute name="Class-Path" value="${manifest.classpath}"/>
<attribute name="Sealed" value="true"/>
</manifest>
</jar>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     COMPILE
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="compile" depends="init" description="compile the
source ">
<!-- Compile the java code from ${src} into ${build} -->
-
	<path id="project.classpath">
-
	<fileset dir="lib/">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
-
	<javac srcdir="${src}" destdir="${build}" source="1.4">
<exclude name="**/**Test*.java"/>
<classpath refid="project.classpath"/>
</javac>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
	     DISTRIBUTION
	   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - 
-->
<target name="dist" depends="jar, copy lib" description="Create a
directory with stand alone and runnable version.">
	</target>
-
	<target name="copy lib" description="Copy all needed
libraries">
-
	<copy todir="${build}/lib">
<fileset dir="./lib"/>
</copy>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     REDISTRIBUTING THE SOURCE
     Package the entire mCube source tree in a .zip file.
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="distJesse" depends="init" description="Create a
.zip file of the source for backup or distribution.">
<zip destfile="glazedlists-source.zip" basedir="."
excludes="classes/**, docs/api/**, mcube-source.zip"/>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     TEST
     Compile unit tests and run them using JUnit.
     This task depends on JUnit, available free at
http://www.junit.org
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="test" depends="init,compile"
description="Compile unit tests and run them using JUnit.">
<mkdir dir="classes"/>
<!-- Verify that JUnit is available on the classpath -->
<available file="${ant.home}/lib/junit.jar" property="junit.present"/>
<fail unless="junit.present" message="To run this task, install
junit.jar and optional.jar into ${ant.home}/lib/ JUnit is available
free at 
http://www.junit.org
"/>
-
	<!--
 Compile the test classes from source/ into classes/ 
-->
-
	<javac destdir="classes" srcdir="source" debug="on"
source="1.4">
<classpath path="${ant.home}/lib/junit.jar"/>
<include name="**/**Test.java"/>
</javac>
<!-- Execute JUnit tests -->
-
	<junit printsummary="true" showoutput="false" fork="true"
errorProperty="test.failed" failureProperty="test.failed">
<classpath path="classes:${ant.home}/lib/junit.jar"/>
<formatter type="brief" usefile="false"/>
-
	<batchtest>
<fileset dir="classes/" includes="**/**Test.class"/>
</batchtest>
</junit>
<fail message="Tests failed. Check test output." if="test.failed"/>
</target>
-
	<!--
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 
     JAVADOC
     Construct a browsable API.
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
-->
-
	<target name="docs" depends="init" description="Scan the
source code to generate the Javadoc API.">
<mkdir dir="docs"/>
-
	<tstamp prefix="javadoc">
<format property="datestamp" pattern="yyyy-MM-dd H:mm"/>
</tstamp>
<!-- document all the source with @todo tags -->
-
	<javadoc sourcepath="src" destdir="docs/api" author="true"
use="true" windowtitle="mCube" source="1.4">
<packageset dir="source">
			</packageset>
-
	<doctitle>
<h1>
				<a
href="
https://mcube.dev.java.net/
">mcube</a>
			</h1>
</doctitle>
-
	<bottom>
Generated ${javadoc.datestamp}<br>
			<i>Copyright &#169; 2004</i>
</bottom>
<link href="
http://java.sun.com/j2se/1.4.2/docs/api/
"/>
</javadoc>
</target>
</project>
--
Un idiota sara' in grado di fare una quantita' di danni
in proporzione quadratica rispetto alla potenza dello
strumento adoperato.
("Neo")
--
Fondatore "Gilda dei non 
leggitori di subject"
--
Hobbit name: Meriadoc Toadfoot
--
Su Honda CBF 600 e Aprilia Leonardo 250 ST