přidán ručně psaný build2.xml pro Ant - možnost sestavení podobně jako přes Make v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 16 Dec 2023 14:48:17 +0100
branchv_0
changeset 379abe4cd1f308
parent 36 a7de67e6578c
child 38 41e91ea94acb
přidán ručně psaný build2.xml pro Ant - možnost sestavení podobně jako přes Make
java/rozsirene-atributy/build2.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/rozsirene-atributy/build2.xml	Sat Dec 16 14:48:17 2023 +0100
     1.3 @@ -0,0 +1,69 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +Rozšířené atributy – program na správu rozšířených atributů souborů
     1.7 +Copyright © 2023 František Kučera (frantovo.cz)
     1.8 +
     1.9 +This program is free software: you can redistribute it and/or modify
    1.10 +it under the terms of the GNU General Public License as published by
    1.11 +the Free Software Foundation, version 3 of the License.
    1.12 +
    1.13 +This program is distributed in the hope that it will be useful,
    1.14 +but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.16 +GNU General Public License for more details.
    1.17 +
    1.18 +You should have received a copy of the GNU General Public License
    1.19 +along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1.20 +-->
    1.21 +<project name="rozšířené-atributy" basedir="." default="jar">
    1.22 +
    1.23 +	<property name="JAR" value="dist/rozsirene-atributy.jar"/>
    1.24 +	<property name="MAIN" value="cz.frantovo.rozsireneatributy.Startér"/>
    1.25 +	<property
    1.26 +		name="LAF"
    1.27 +		value="-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel"
    1.28 +	/>
    1.29 +	
    1.30 +	<target name="clean">
    1.31 +		<delete dir="build"/>
    1.32 +		<delete dir="dist"/>
    1.33 +	</target>
    1.34 +	
    1.35 +	<target name="build">
    1.36 +		<mkdir dir="build"/>
    1.37 +		<touch>
    1.38 +			<fileset dir="build"/>
    1.39 +		</touch>
    1.40 +		<javac
    1.41 +			srcdir="src"
    1.42 +			destdir="build"
    1.43 +			includeAntRuntime="no">
    1.44 +		</javac>
    1.45 +		<copy todir="build">
    1.46 +			<fileset dir="src" includes="**/*.properties"/>
    1.47 +		</copy>
    1.48 +	</target>
    1.49 +	
    1.50 +	<target name="jar" depends="build">
    1.51 +		<mkdir dir="dist"/>
    1.52 +		<touch>
    1.53 +			<fileset dir="dist"/>
    1.54 +		</touch>
    1.55 +		<jar destfile="${JAR}" basedir="build">
    1.56 +			<manifest>
    1.57 +				<attribute name="Main-Class" value="${MAIN}"/>
    1.58 +			</manifest>
    1.59 +		</jar>
    1.60 +	</target>
    1.61 +	
    1.62 +	<target name="run" depends="jar">
    1.63 +		<exec executable="java">
    1.64 +			<arg value="${LAF}"/>
    1.65 +			<arg value="-jar"/>
    1.66 +			<arg value="${JAR}"/>
    1.67 +			<arg value="--soubor"/>
    1.68 +			<arg value="${JAR}"/>
    1.69 +		</exec>
    1.70 +	</target>
    1.71 +
    1.72 +</project>