Changeset 731


Ignore:
Timestamp:
Jul 23, 2008, 2:55:19 PM (14 years ago)
Author:
Martin Svensson
Message:

Re-arrange in build file for the Normalization plug-in package.

Location:
plugins/base2/net.sf.basedb.normalizations/trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.normalizations/trunk/build.xml

    r730 r731  
    99    <property name="name" value="normalization-plugins" /> 
    1010    <property name="src" value="src" /> 
    11     <property name="build" value="build" /> 
    12   <property name="dist" value="dist" />
    13   <property name="jar" value="${name}.jar" />
     11  <property name="version" value="pre1.0" description="Version number of the package" />
     12    <property name="build" value="build" description="Location of build class files"/> 
     13  <property name="dist" value="dist" description="Location where jar-file are created"/>
     14  <property name="jar" value="${name}.jar" description="Name of the jar file"/>
     15  <property name="package" location="package" description="Directory where packaged distribution files are created"/>
     16  <property name="javac.arg" value="-Xlint:unchecked" />
     17  <property name="javac.source" value="1.5" />
     18  <property name="javac.target" value="1.5" />
     19  <property name="javac.encoding" value="ISO-8859-1" />
    1420 
    1521    <!-- set up classpath for compiling --> 
     
    2026    </path> 
    2127   
     28  <target name="init">
     29    <mkdir dir="${build}" />
     30    <mkdir dir="${dist}" />
     31  </target>
     32   
     33  <target name="clean">
     34    <delete failonerror="false" includeemptydirs="true">
     35      <fileset dir="${build}" defaultexcludes="no" />
     36      <fileset dir="${dist}" defaultexcludes="no" />
     37      <fileset dir="${package}" defaultexcludes="no" />
     38    </delete>
     39  </target>
    2240       
    2341    <!-- main target --> 
    2442    <target   
    25         name="dist"   
    26         description="Compiles the package and put it in a jar-file"
    27   > 
    28         <javac   
    29           encoding="ISO-8859-1" 
    30             srcdir="${src}" 
    31             destdir="${build}" 
    32             classpathref="classpath"
    33         /> 
    34       <copy todir="${build}">
     43        name="dist"
     44      depends="clean,build"
     45    > 
     46      <copy todir="${dist}">
     47      <fileset dir="." includes="README*,LICENSE,INSTALL" />
     48    </copy>
     49     </target>
     50 
     51  <target
     52    name="package"
     53    depends="dist"
     54    description="Create binary distribution package"
     55    >
     56    <property name="tar.prefix" value="${name}-${version}" />
     57    <mkdir dir="${package}" />
     58    <tar
     59      destfile="${package}/${tar.prefix}.tar.gz"
     60      longfile="gnu"
     61      compression="gzip"
     62      >
     63      <tarfileset
     64        dir="${dist}"
     65        mode="755"
     66        prefix="${tar.prefix}"
     67        preserveLeadingSlashes="true"
     68        >
     69        <include name="**/*.sh" />
     70      </tarfileset>
     71      <tarfileset
     72        dir="${dist}"
     73        prefix="${tar.prefix}"
     74        preserveLeadingSlashes="true"
     75        >
     76        <exclude name="**/*.sh" />
     77      </tarfileset>
     78    </tar>
     79  </target>
     80 
     81  <target
     82    name="build"
     83    depends="init"
     84    description="Compiles the plugin and put in jar"
     85    >
     86    <property name="jar" value="${name}.jar" />
     87    <mkdir dir="${build}" />
     88    <javac
     89      encoding="${javac.encoding}"
     90      srcdir="${src}"
     91      destdir="${build}"
     92      debug="true"
     93      classpathref="classpath"
     94      source="${javac.source}"
     95      target="${javac.target}"
     96      >
     97      <compilerarg value="${javac.arg}" />
     98    </javac>
     99    <copy todir="${build}">
    35100      <fileset dir="." includes="META-INF/*" />
    36101    </copy>
    37       <replace token="%%plugins.jar%%" value="${jar}" file="${build}/META-INF/base-plugins.xml" /> 
    38         <jar   
    39             jarfile="${dist}/${jar}"   
    40             basedir="build" 
    41             manifest="META-INF/MANIFEST.MF" 
    42     > 
    43           <!--Include this to add required files for auto registration wizard--> 
    44           <metainf file="META-INF/base-plugins.xml"></metainf> 
    45           <!-- <metainf file="META-INF/base-configurations.xml"></metainf> -->
    46         </jar>   
    47      </target> 
     102    <replace token="%%plugins.jar%%" value="${jar}" file="${build}/META-INF/base-plugins.xml" />
     103    <jar
     104      jarfile="${dist}/${jar}"
     105      basedir="${build}"
     106      >
     107    </jar>
     108  </target>
     109 
    48110</project>
Note: See TracChangeset for help on using the changeset viewer.