-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create ant scripts for building and releasing components.
- Loading branch information
scarytom
committed
Aug 30, 2009
1 parent
8b4d862
commit e629df3
Showing
8 changed files
with
152 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Currently no overall build script. Build individual components a they specify. | ||
Currently no overall build script. Build individual components as they specify. | ||
To build a working swing desktop application, run the release target within the ant build.xml script in the swingclient project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="common"> | ||
|
||
<property file="build.properties"/> | ||
<property name="version" value="0.1"/> | ||
|
||
<target name="compile" description="Compile Java source."> | ||
<mkdir dir="${build.dir}/classes"/> | ||
<javac srcdir="${src.dir}" | ||
debug="on" | ||
destdir="${build.dir}/classes" | ||
source="1.6" target="1.6"> | ||
<classpath refid="compile.classpath"/> | ||
</javac> | ||
<copy toDir="${build.dir}/classes"> | ||
<fileset dir="${src.dir}" excludes="**/*.java"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="manifest" description="Generate manifest." depends="compile"> | ||
<fail unless="module" message="The 'module' property is unset"/> | ||
<mkdir dir="${build.dir}/META-INF"/> | ||
<manifest file="${build.dir}/META-INF/MANIFEST.MF"> | ||
<attribute name="Built-By" value="${user.name}"/> | ||
<section name="common"> | ||
<attribute name="Specification-Title" value="${ant.project.name}"/> | ||
<attribute name="Specification-Version" value="${version}"/> | ||
<attribute name="Specification-Vendor" value="netmelody.org"/> | ||
<attribute name="Specification-Description" value="Docnap is a simple Document Management System (DMS) designed for home use"/> | ||
<attribute name="Specification-DocURL" value="http://hg.errant.me.uk/scarytom/docnap/wiki/Home/"/> | ||
<attribute name="Specification-Copyright" value="Copyright (C) 2009 Tom Denley"/> | ||
<attribute name="Specification-License" value="http://www.gnu.org/licenses/gpl-2.0.html"/> | ||
<attribute name="Specification-SymbolicName" value="${module}"/> | ||
</section> | ||
</manifest> | ||
</target> | ||
|
||
<target name="test.compile" depends="compile" description="Compile test source."> | ||
<mkdir dir="${build.dir}/test"/> | ||
<javac srcdir="${test.dir}" | ||
debug="on" | ||
destdir="${build.dir}/test" | ||
source="1.6" target="1.6"> | ||
<classpath path="${build.dir}/classes"/> | ||
<classpath refid="compile.classpath"/> | ||
</javac> | ||
<copy toDir="${build.dir}/test"> | ||
<fileset dir="${test.dir}" excludes="**/*.java"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="test" depends="test.compile" description="Execute JUnit tests."> | ||
<java fork="true" | ||
classname="junit.textui.TestRunner" | ||
failonerror="true" | ||
taskname="junit"> | ||
<classpath> | ||
<pathelement location="${build.dir}/test"/> | ||
<pathelement location="${build.dir}/classes"/> | ||
<path refid="compile.classpath"/> | ||
</classpath> | ||
<arg value="${test.class}"/> | ||
</java> | ||
</target> | ||
|
||
<target name="clean" description="Remove generated files."> | ||
<delete dir="${build.dir}"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Run the jar target in the build.xml ant script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src.dir=src | ||
test.dir=test | ||
build.dir=build | ||
module=org.netmelody.docnap.core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="docnap-core" basedir="." default="jar"> | ||
|
||
<import file="../common.xml"/> | ||
|
||
<path id="compile.classpath"> | ||
<fileset dir="vendor/lib" includes="*.jar"/> | ||
<fileset dir="vendor/buildlib" includes="*.jar"/> | ||
</path> | ||
|
||
<target name="jar" depends="compile, manifest" description="Build jar."> | ||
<jar destfile="${build.dir}/${ant.project.name}-${version}.jar" manifest="${build.dir}/META-INF/MANIFEST.MF"> | ||
<fileset dir="db" includes="**/*.*"/> | ||
<fileset dir="${build.dir}/classes"/> | ||
</jar> | ||
</target> | ||
|
||
<target name="dist" depends="clean, jar" description="Build distribution."> | ||
<mkdir dir="${build.dir}/dist"/> | ||
<copy toDir="${build.dir}/dist"> | ||
<fileset dir="vendor/lib" includes="*.jar"/> | ||
<fileset dir="${build.dir}" includes="*.jar"/> | ||
</copy> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
To build a full release, run the release target in the build.xml ant script. | ||
This depends on the docnap core being present relative to this project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src.dir=src | ||
test.dir=test | ||
build.dir=build | ||
module=org.netmelody.docnap.swingclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="docnap-swingclient" basedir="." default="jar"> | ||
|
||
<import file="../common.xml"/> | ||
<property name="core.dir" value="../org.netmelody.docnap.core"/> | ||
|
||
<path id="compile.classpath"> | ||
<fileset dir="vendor/lib" includes="*.jar"/> | ||
<fileset dir="${core.dir}/${build.dir}/dist" includes="*.jar"/> | ||
</path> | ||
|
||
<target name="distcore" description="Build core distribution."> | ||
<ant antfile="${core.dir}/build.xml" target="dist" inheritAll="false"/> | ||
</target> | ||
|
||
<target name="jar" depends="distcore, compile, manifest" description="Build jar."> | ||
<jar destfile="${build.dir}/${ant.project.name}-${version}.jar" manifest="${build.dir}/META-INF/MANIFEST.MF"> | ||
<fileset dir="${build.dir}/classes"/> | ||
</jar> | ||
</target> | ||
|
||
<target name="dist" depends="clean, jar" description="Build distribution."> | ||
<mkdir dir="${build.dir}/dist"/> | ||
<copy toDir="${build.dir}/dist"> | ||
<fileset dir="${core.dir}/${build.dir}/dist" includes="*.jar"/> | ||
<fileset dir="vendor/lib" includes="*.jar"/> | ||
<fileset dir="${build.dir}" includes="*.jar"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="release" depends="dist" description="Build single release jar with dependencies embedded."> | ||
<mkdir dir="${build.dir}/release"/> | ||
<jar jarfile="${build.dir}/release/${ant.project.name}-standalone-${version}.jar"> | ||
<zipgroupfileset dir="${build.dir}/dist" includes="*.jar"/> | ||
<manifest> | ||
<attribute name="Main-Class" value="org.netmelody.docnap.swingclient.DocnapMain"/> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
</project> |