Ignore:
Timestamp:
2007-10-24T20:13:09+02:00 (17 years ago)
Author:
joerg
Message:

josm/plugins/*build.xml: now we use the unique target dist for creating .jar files. Use a lot more variables to be able to move the build directory. destination directory for .jar files is now plugins/dist/*.jar. correcteed clean targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/duplicateway/build.xml

    r5147 r5153  
    1 <project name="Duplicate-Way" default="jar" basedir=".">
     1<project name="Duplicate-Way" default="dist" basedir=".">
    22
    3   <property name="josm" location="../../core/dist/josm-custom.jar" />
     3  <!-- compilation properties -->
     4  <property name="josm.build.dir"       value="../../core"/>
     5  <property name="josm.home.dir"        value="${user.home}/.josm"/>
     6  <property name="josm"                 location="../../core/dist/josm-custom.jar" />
     7  <property name="plugin.build.dir"     value="build"/>
     8  <property name="plugin.dist.dir"      value="../dist"/>
     9  <property name="plugin.name"          value="${ant.project.name}"/>
     10  <property name="plugin.jar"           value="../dist/${plugin.name}.jar"/>
     11 
     12  <target name="init">
     13    <mkdir dir="${plugin.build.dir}"/>
     14  </target>
    415
    5   <target name="compile" depends="clean">
     16
     17  <target name="compile" depends="init">
    618    <mkdir dir="build"></mkdir>
    7     <mkdir dir="build/images"></mkdir>
     19    <mkdir dir="${plugin.build.dir}/images"></mkdir>
    820    <copy todir="build">
    9       <fileset dir="bin" casesensitive="yes">
     21      <fileset dir="${plugin.build.dir}" casesensitive="yes">
    1022        <filename name="**/*.class"/>
    1123      </fileset>
    1224    </copy>
    13     <copy todir="build/images">
     25    <copy todir="${plugin.build.dir}/images">
    1426      <fileset dir="images" casesensitive="yes">
    1527        <filename name="**/*.png"/>
     
    1830  </target>
    1931
    20   <target name="jar" depends="compile">
    21     <jar destfile="Duplicate-Way.jar" basedir="build">
     32  <target name="dist" depends="compile">
     33    <jar destfile="${plugin.jar}" basedir="build">
    2234      <manifest>
    2335        <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.duplicateway.DuplicateWayPlugin" />
     
    3042
    3143  <target name="clean">
    32     <delete dir="build" />
    33     <delete file="Duplicate-Way.jar" />
     44    <delete dir="${plugin.build.dir}" />
     45    <delete file="${plugin.jar}" />
    3446  </target>
    3547
    36   <target name="install" depends="jar">
    37     <copy file="Duplicate-Way.jar" todir="${user.home}/.josm/plugins"/>
     48  <target name="install" depends="dist">
     49    <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins"/>
    3850  </target>
    3951
Note: See TracChangeset for help on using the changeset viewer.