Changeset 29618 in osm for applications


Ignore:
Timestamp:
2013-06-03T01:39:58+02:00 (11 years ago)
Author:
the111
Message:

Fix #josm8640 and #josm8747 - JMapViewer versioned releases and enhanced release system.

Location:
applications/viewer/jmapviewer
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/build.xml

    r29161 r29618  
    22<project default="all" name="Compile and build java classes plus jar archives">
    33
    4         <target name="all" depends="clean,build,pack,create_run_jar,create_release_zip" />
     4        <target name="all" depends="clean,build,svn_info,pack,create_run_jar,create_release_zip,create_source_release_zip" />
    55
    66        <target name="clean">
     
    2323                </copy>
    2424        </target>
    25 
     25       
     26    <target name="svn_info" description="Get SVN info for use in JAR/ZIP filenames.">
     27        <!-- Create temporary SVN info file -->
     28        <exec executable="svn" output="svn-info.properties">
     29            <arg line="info" />
     30            <env key="LANG" value="en_US"/>
     31        </exec>
     32        <property prefix="svn" file="svn-info.properties" />
     33        <!-- Delete temporary SVN info file -->
     34        <delete file="svn-info.properties" />
     35    </target>
     36       
    2637        <target name="pack">
    27                 <delete file="JMapViewer.jar" />
    28                 <delete file="JMapViewer_src.jar" />
    2938                <!-- Create the JAR file containing the compiled class files -->
    30                 <jar destfile="JMapViewer.jar" filesetmanifest="mergewithoutmain">
     39                <jar destfile="JMapViewer_${svn.Revision}.jar" filesetmanifest="mergewithoutmain">
    3140                        <fileset dir="bin" includes="**/jmapviewer/**" />
    3241                </jar>
    3342                <!-- Create the JAR file containing the source java files -->
    34                 <jar destfile="JMapViewer_src.jar" filesetmanifest="mergewithoutmain">
     43                <jar destfile="JMapViewer_${svn.Revision}_src.jar" filesetmanifest="mergewithoutmain">
    3544                        <fileset dir="src" includes="**/jmapviewer/**" />
    3645                </jar>
    3746        </target>
    38 
    39         <target name="create_run_jar" description="Create a JAR file that can be used to excute the JMapViewer demo app. Requires JMapViewer.jar to be present.">
    40                 <delete file="JMapViewer_Demo.jar" />
    41                 <jar destfile="JMapViewer_Demo.jar" filesetmanifest="mergewithoutmain">
     47       
     48        <target name="create_run_jar" description="Create a JAR file that can be used to execute the JMapViewer demo app. Requires JMapViewer.jar to be present.">
     49                <jar destfile="JMapViewer_${svn.Revision}_Demo.jar" filesetmanifest="mergewithoutmain">
    4250                        <manifest>
    4351                                <attribute name="Main-Class" value="org.openstreetmap.gui.jmapviewer.Demo" />
    44                                 <attribute name="Class-Path" value="JMapViewer.jar" />
     52                                <attribute name="Class-Path" value="JMapViewer_${svn.Revision}.jar" />
    4553                        </manifest>
    4654                </jar>
     
    4856
    4957        <target name="create_release_zip" description="Create a release zip file containing the binary and source jar files as well as the demo starter">
    50                 <delete file="JMapViewer.zip" />
    51                 <zip basedir="." destfile="JMapViewer.zip">
     58                <zip basedir="." destfile="releases/${svn.Revision}/JMapViewer-${svn.Revision}.zip">
    5259                        <include name="JMapViewer*.jar" />
    5360                        <include name="Readme.txt" />
    5461                        <include name="Gpl.txt" />
    5562                </zip>
     63                <delete>
     64                        <fileset dir="." includes="JMapViewer*.jar"/>
     65                </delete>
     66        </target>
     67       
     68        <target name="create_source_release_zip" description="Create a release zip file containing the source files">
     69                <zip destfile="releases/${svn.Revision}/JMapViewer-${svn.Revision}-Source.zip">
     70                        <zipfileset file="Readme.txt" prefix="jmapviewer-${svn.Revision}"/>
     71                        <zipfileset file="build.xml" prefix="jmapviewer-${svn.Revision}"/>
     72                        <zipfileset file="Gpl.txt" prefix="jmapviewer-${svn.Revision}"/>
     73                        <zipfileset dir="src" includes="**/jmapviewer/**" prefix="jmapviewer-${svn.Revision}"/>
     74                </zip>
    5675        </target>
    5776
Note: See TracChangeset for help on using the changeset viewer.