java/rozsirene-atributy/build2.xml
author František Kučera <franta-hg@frantovo.cz>
Sat, 16 Dec 2023 14:48:17 +0100
branchv_0
changeset 37 9abe4cd1f308
permissions -rw-r--r--
přidán ručně psaný build2.xml pro Ant - možnost sestavení podobně jako přes Make
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 Rozšířené atributy – program na správu rozšířených atributů souborů
     4 Copyright © 2023 František Kučera (frantovo.cz)
     5 
     6 This program is free software: you can redistribute it and/or modify
     7 it under the terms of the GNU General Public License as published by
     8 the Free Software Foundation, version 3 of the License.
     9 
    10 This program is distributed in the hope that it will be useful,
    11 but WITHOUT ANY WARRANTY; without even the implied warranty of
    12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13 GNU General Public License for more details.
    14 
    15 You should have received a copy of the GNU General Public License
    16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17 -->
    18 <project name="rozšířené-atributy" basedir="." default="jar">
    19 
    20 	<property name="JAR" value="dist/rozsirene-atributy.jar"/>
    21 	<property name="MAIN" value="cz.frantovo.rozsireneatributy.Startér"/>
    22 	<property
    23 		name="LAF"
    24 		value="-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel"
    25 	/>
    26 	
    27 	<target name="clean">
    28 		<delete dir="build"/>
    29 		<delete dir="dist"/>
    30 	</target>
    31 	
    32 	<target name="build">
    33 		<mkdir dir="build"/>
    34 		<touch>
    35 			<fileset dir="build"/>
    36 		</touch>
    37 		<javac
    38 			srcdir="src"
    39 			destdir="build"
    40 			includeAntRuntime="no">
    41 		</javac>
    42 		<copy todir="build">
    43 			<fileset dir="src" includes="**/*.properties"/>
    44 		</copy>
    45 	</target>
    46 	
    47 	<target name="jar" depends="build">
    48 		<mkdir dir="dist"/>
    49 		<touch>
    50 			<fileset dir="dist"/>
    51 		</touch>
    52 		<jar destfile="${JAR}" basedir="build">
    53 			<manifest>
    54 				<attribute name="Main-Class" value="${MAIN}"/>
    55 			</manifest>
    56 		</jar>
    57 	</target>
    58 	
    59 	<target name="run" depends="jar">
    60 		<exec executable="java">
    61 			<arg value="${LAF}"/>
    62 			<arg value="-jar"/>
    63 			<arg value="${JAR}"/>
    64 			<arg value="--soubor"/>
    65 			<arg value="${JAR}"/>
    66 		</exec>
    67 	</target>
    68 
    69 </project>