Author: doogie
Date: Sun Apr 18 18:03:37 2010
New Revision: 935380
URL: http://svn.apache.org/viewvc?rev=935380&view=rev
Log:
Create a main-jar macro.
Removed:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.mf
Modified:
ofbiz/trunk/common.xml
ofbiz/trunk/framework/base/build.xml
ofbiz/trunk/framework/service/build.xml
ofbiz/trunk/framework/start/build.xml
ofbiz/trunk/macros.xml
Modified: ofbiz/trunk/common.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/common.xml?rev=935380&r1=935379&r2=935380&view=diff
==============================================================================
--- ofbiz/trunk/common.xml (original)
+++ ofbiz/trunk/common.xml Sun Apr 18 18:03:37 2010
@@ -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>
<!-- ================================================================== -->
Modified: ofbiz/trunk/framework/base/build.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/build.xml?rev=935380&r1=935379&r2=935380&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/build.xml (original)
+++ ofbiz/trunk/framework/base/build.xml Sun Apr 18 18:03:37 2010
@@ -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>
Modified: ofbiz/trunk/framework/service/build.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/build.xml?rev=935380&r1=935379&r2=935380&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/build.xml (original)
+++ ofbiz/trunk/framework/service/build.xml Sun Apr 18 18:03:37 2010
@@ -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">
Modified: ofbiz/trunk/framework/start/build.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/build.xml?rev=935380&r1=935379&r2=935380&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/build.xml (original)
+++ ofbiz/trunk/framework/start/build.xml Sun Apr 18 18:03:37 2010
@@ -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"/>
Modified: ofbiz/trunk/macros.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/macros.xml?rev=935380&r1=935379&r2=935380&view=diff
==============================================================================
--- ofbiz/trunk/macros.xml (original)
+++ ofbiz/trunk/macros.xml Sun Apr 18 18:03:37 2010
@@ -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">