Create a main-jar macro.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2010-04-18 18:03:37 +00:00
parent 8724fdcba5
commit f2bfef6274
6 changed files with 37 additions and 41 deletions
+1 -8
View File
@@ -93,14 +93,7 @@ under the License.
</target>
<target name="jar" depends="classes">
<jar jarfile="${build.dir}/lib/${name}.jar">
<fileset dir="${build.dir}/classes"/>
<fileset dir="${src.extra.dir}">
<selector refid="src-extra-set"/>
</fileset>
<!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
<zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
</jar>
<main-jar/>
</target>
<!-- ================================================================== -->
+6 -11
View File
@@ -89,16 +89,11 @@ under the License.
</target>
<target name="jar" depends="classes">
<jar jarfile="${build.dir}/lib/${name}.jar">
<fileset dir="${build.dir}/classes"/>
<fileset dir="${src.dir}">
<include name="**/*.properties,**/*.xml,**/*.bsh,**/*.logic,**/*.js,**/*.jacl,**/*.py"/>
<include name="META-INF/**"/>
</fileset>
<!-- also put the DTDs in the jar file... -->
<fileset dir="${dtd.dir}" includes="*.dtd"/>
<!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
<zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
</jar>
<main-jar>
<main-elements>
<!-- also put the DTDs in the jar file... -->
<fileset dir="${dtd.dir}" includes="*.dtd"/>
</main-elements>
</main-jar>
</target>
</project>
+1 -9
View File
@@ -50,15 +50,7 @@ under the License.
</target>
<target name="main-jar" depends="stubs">
<jar jarfile="${build.dir}/lib/${name}.jar">
<fileset dir="${build.dir}/classes"/>
<fileset dir="${src.dir}">
<include name="**/*.properties,**/*.xml,**/*.bsh,**/*.logic,**/*.js,**/*.jacl,**/*.py"/>
<include name="META-INF/**"/>
</fileset>
<!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
<zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
</jar>
<main-jar/>
</target>
<target name="rmi-jar" depends="stubs">
+10 -9
View File
@@ -38,15 +38,16 @@ under the License.
</target>
<target name="jar" depends="classes">
<jar jarfile="${build.dir}/lib/ofbiz.jar" manifest="${src.dir}/org/ofbiz/base/start/Start.mf">
<fileset dir="${build.dir}/classes"/>
<fileset dir="${src.dir}">
<include name="**/*.properties"/>
<include name="META-INF/**"/>
</fileset>
<!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
<zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
</jar>
<main-jar>
<main-elements>
<manifest>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Implementation-Title" value="Apache OFBiz Startup"/>
<attribute name="Implementation-Vendor" value="The Apache Open for Business Project"/>
<attribute name="Main-Class" value="org.ofbiz.base.start.Start"/>
</manifest>
</main-elements>
</main-jar>
<!-- copy the ofbiz.jar file -->
<copy todir="${basedir}/../..">
<fileset dir="${build.dir}/lib" includes="ofbiz.jar"/>
@@ -1,4 +0,0 @@
Manifest-Version: 1.0
Implementation-Title: "Apache OFBiz Startup"
Implementation-Vendor: "The Apache Open For Business Project"
Main-Class: org.ofbiz.base.start.Start
+19
View File
@@ -79,6 +79,25 @@ under the License.
</javadoc>
</presetdef>
<macrodef name="main-jar">
<attribute name="jarfile" default="${build.dir}/lib/${name}.jar"/>
<element name="main-pattern" optional="true"/>
<element name="main-elements" optional="true"/>
<sequential>
<jar jarfile="@{jarfile}">
<fileset dir="${build.dir}/classes">
<main-pattern/>
</fileset>
<fileset dir="${src.extra.dir}">
<selector refid="src-extra-set"/>
</fileset>
<!-- now add the NOTICE and LICENSE files to allow the jar file to be distributed alone -->
<zipfileset dir="${ofbiz.home.dir}" prefix="META-INF" includes="NOTICE,LICENSE"/>
<main-elements/>
</jar>
</sequential>
</macrodef>
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.class.path"/>
<presetdef name="default-groovyc">