Commits

ltor...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 738273b

change build dir of jar file

  • Participants
  • Parent commits 524fdae

Comments (0)

Files changed (2)

File build.properties

 status=integration
 cvs.tag=v2_2-rc2
 
-# uncomment the next line if this is a release build
-release=
-
-#build.compiler=jikes
-
 # The URL to use for testing the example webapp. Comment this out to disable the webapp tests.
 #test.web.baseURL=http://localhost:8080/oscache/
     <!-- overridden properties (must be before the import!) -->
    
     <property name="lib.optional" value="${lib}/plugins"/> <!-- overwritten -->
+    <property name="jar.excludes" value="test/**, docs/**, *.war, **/*.html"/>
 
     <property name="tmp.dir" value="tmp"/> <!-- ??? -->
 
 
     <property name="src.webapp" value="${src}/webapp"/> <!-- new -->
 
-    <tstamp>
-        <format property="release" pattern="-dMMMyy" locale="en" timezone="GMT"/>
-    </tstamp>
-
     <!-- Classpath -->
     <path id="cp">
         <fileset dir="lib">
 
     <!-- Prepares the build directory -->
     <target name="prepare" depends="init">
-        <mkdir dir="${build}/META-INF"/>
-        <copy file="${src}/etc/${name}.tld" tofile="${build}/META-INF/taglib.tld"/>
+        <mkdir dir="${build.java}/META-INF"/>
+        <copy file="${src}/etc/${name}.tld" tofile="${build.java}/META-INF/taglib.tld"/>
     </target>
 
 
     <!-- Compiles the core source code -->
     <target name="compile" depends="prepare">
-        <javac srcdir="${src.java}" destdir="${build}" includes="com/opensymphony/oscache/**" debug="${debug}" classpathref="cp"/>
+        <javac srcdir="${src.java}" destdir="${build.java}" includes="com/opensymphony/oscache/**" debug="${debug}" classpathref="cp"/>
     </target>
 
 
     <target name="example-war" depends="jar">
         <mkdir dir="${build}/webapp"/>
 
-        <javac srcdir="${src.webapp}/WEB-INF/classes" destdir="${build}/webapp" includes="com/opensymphony/oscache/**" debug="${debug}" classpath="${build}" classpathref="cp"/>
+        <javac srcdir="${src.webapp}/WEB-INF/classes" destdir="${build}/webapp" includes="com/opensymphony/oscache/**" debug="${debug}" classpath="${build.java}" classpathref="cp"/>
 
         <war destfile="${dist}/${name}-example.war" basedir="${src.webapp}" webxml="${src.webapp}/WEB-INF/web.xml" excludes="WEB-INF/web.xml">
             <lib dir="${lib.core}"/>
-            <lib file="${dist}/${name}-${version}${release}.jar"/>
+            <lib file="${build}/${name}-${version}.jar"/>
             <webinf file="${src}/etc/${name}.tld"/>
             <classes dir="${build}/webapp"/>
         </war>
 
     <!-- Build a usable jar file -->
     <target name="jar" depends="compile">
-        <mkdir dir="${dist}"/>
+        <mkdir dir="${build}"/>
 
-        <!--   
-        ERROR - /home/os-j2ee/common-build/osbuild.xml:325: Warning: Could not find file /opt/j2ee/domains/opensymphony.com/ci/anthill/AnthillPro/work/cvsrepositorydriver/oscache.HEAD.test/oscache/build/oscache-2.2-rc2.jar to copy.
-        ${build} ? siehe osbuild bzw. webwork
-        -->
-  
-        <jar jarfile="${dist}/${name}-${version}${release}.jar" basedir="${build}" includes="**" excludes="test/**, docs/**, *.war">
+        <jar jarfile="${build}/${name}-${version}.jar" basedir="${build.java}" excludes="${jar.excludes}">
             <manifest>
                 <attribute name="Implementation-Title" value="${fullname}"/>
                 <attribute name="Implementation-Version" value="${version}"/>
         </jar>
     </target>
 
-
-    <!-- Cleans up generated stuff -->
-    <target name="clean" depends="common.clean">
-    </target>
-
     <!-- Run the unit tests. This is used by the test target, so do not call directly -->
     <target name="test-base">
         <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
 
     <!-- Create the distribution zip files -->
     <target name="dist" depends="clean, jar, docs, example-war, clover.report, junit.report">
+        <!-- copy the standard file -->
+        <copy file="${build}/${name}-${version}.jar" tofile="${dist}/${name}-${version}.jar"/>
+   
+        <!-- create the full package -->
         <mkdir dir="${tmp.dir}/docs"/>
         <mkdir dir="${tmp.dir}/src"/>
         <mkdir dir="${tmp.dir}/lib"/>
             <fileset dir="${lib}" excludes="build/**, *.jar" />
         </copy>
 
-        <copy file="${dist}/${name}-${version}${release}.jar" tofile="${tmp.dir}/${name}-${version}${release}.jar"/>
+        <copy file="${build}/${name}-${version}.jar" tofile="${tmp.dir}/${name}-${version}.jar"/>
         <copy file="${src}/etc/oscache.properties" tofile="${tmp.dir}/etc/oscache.properties"/>
         <copy file="${src}/etc/${name}.tld" tofile="${tmp.dir}/etc/${name}.tld"/>
         <copy file="readme.txt" tofile="${tmp.dir}/readme.txt" failonerror="false"/>
 
-        <zip zipfile="${dist}/${name}-${version}${release}-full.zip" basedir="${tmp.dir}" includes="**"/>
+        <zip zipfile="${dist}/${name}-${version}-full.zip" basedir="${tmp.dir}" includes="**"/>
 
         <!-- Remove everything that's not in the binary release -->
         <delete dir="${tmp.dir}/src"/>
         <delete dir="${tmp.dir}/docs/junit"/>
         <delete dir="${tmp.dir}/docs/clover"/>
 
-        <zip zipfile="${dist}/${name}-${version}${release}-binary.zip" basedir="${tmp.dir}" includes="**"/>
+        <zip zipfile="${dist}/${name}-${version}-binary.zip" basedir="${tmp.dir}" includes="**"/>
 
         <delete dir="${tmp.dir}"/>
     </target>