source: josm/trunk/tools/netbeans/nbbuild.xml@ 18054

Last change on this file since 18054 was 16221, checked in by Don-vip, 5 years ago

see #16860 - remove copy of jmapviewer images in Netbeans project

  • Property svn:eol-style set to native
File size: 5.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- You may freely edit this file. See commented blocks below for -->
3<!-- some examples of how to customize the build. -->
4<!-- (If you delete it and reopen the project it will be recreated.) -->
5<!-- By default, only the Clean and Build commands use this build script. -->
6<!-- Commands such as Run, Debug, and Test only use this build script if -->
7<!-- the Compile on Save feature is turned off for the project. -->
8<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9<!-- in the project's Project Properties dialog box.-->
10<project name="josmnb" default="default" basedir=".">
11 <description>Builds, tests, and runs the project josm.</description>
12
13 <import file="nbproject/build-impl.xml" as="nbimpl"/>
14
15 <import file="../../build.xml" as="josmbase"/> <!-- import the main JOSM ant file -->
16
17 <!--
18
19 There exist several targets which are by default empty and which can be
20 used for execution of your tasks. These targets are usually executed
21 before and after some main targets. They are:
22
23 -pre-init: called before initialization of project properties
24 -post-init: called after initialization of project properties
25 -pre-compile: called before javac compilation
26 -post-compile: called after javac compilation
27 -pre-compile-single: called before javac compilation of single file
28 -post-compile-single: called after javac compilation of single file
29 -pre-compile-test: called before javac compilation of JUnit tests
30 -post-compile-test: called after javac compilation of JUnit tests
31 -pre-compile-test-single: called before javac compilation of single JUnit test
32 -post-compile-test-single: called after javac compilation of single JUunit test
33 -pre-jar: called before JAR building
34 -post-jar: called after JAR building
35 -post-clean: called after cleaning build products
36
37 (Targets beginning with '-' are not intended to be called on their own.)
38
39 Example of inserting an obfuscator after compilation could look like this:
40
41 <target name="-post-compile">
42 <obfuscate>
43 <fileset dir="${build.classes.dir}"/>
44 </obfuscate>
45 </target>
46
47 For list of available properties check the imported
48 nbproject/build-impl.xml file.
49
50
51 Another way to customize the build is by overriding existing main targets.
52 The targets of interest are:
53
54 -init-macrodef-javac: defines macro for javac compilation
55 -init-macrodef-junit: defines macro for junit execution
56 -init-macrodef-debug: defines macro for class debugging
57 -init-macrodef-java: defines macro for class execution
58 -do-jar: JAR building
59 run: execution of project
60 -javadoc-build: Javadoc generation
61 test-report: JUnit report generation
62
63 An example of overriding the target for project execution could look like this:
64
65 <target name="run" depends="josm-impl.jar">
66 <exec dir="bin" executable="launcher.exe">
67 <arg file="${dist.jar}"/>
68 </exec>
69 </target>
70
71 Notice that the overridden target depends on the jar target and not only on
72 the compile target as the regular run target does. Again, for a list of available
73 properties which you can use, check the target you are overriding in the
74 nbproject/build-impl.xml file.
75
76 -->
77
78 <!--
79 ** Copy resource file required on classpath.
80 -->
81 <target name="copy-josm-resources">
82 <copy file="../../CONTRIBUTION" todir="${build.classes.dir}"/>
83 <copy file="../../README" todir="${build.classes.dir}"/>
84 <copy file="../../LICENSE" todir="${build.classes.dir}"/>
85 <copy file="../../gpl-2.0.txt" todir="${build.classes.dir}" />
86 <copy file="../../gpl-3.0.txt" todir="${build.classes.dir}" />
87 <copy todir="${build.classes.dir}/images"><fileset dir="../../resources/images"/></copy>
88 <copy todir="${build.classes.dir}/data"><fileset dir="../../resources/data"/></copy>
89 <copy todir="${build.classes.dir}/styles"><fileset dir="../../resources/styles"/></copy>
90 </target>
91
92 <!--
93 ** Customize some properties used by the main JOSM ant file.
94 -->
95 <target name="set-josmbase-properties" depends="-init-project">
96 <property name="revision.dir" value="${build.classes.dir}"/>
97 <property name="proj-build.dir" location="${build.dir}/build2"/>
98 <property name="proj-classpath" location="${build.classes.dir}"/>
99 </target>
100
101 <!--
102 ** Make sure properties are loaded in the right order.
103 ** E.g. ${build.dir} is set both by Netbeans and by the main JOSM ant file.
104 ** Load the Netbeans properties first, which makes the values permanent.
105 -->
106 <target name="init-josmbase" depends="-init-project, set-josmbase-properties, josmbase.init-properties">
107 <pathconvert property="ivy.classpath.computed" dirsep="/" pathsep=":">
108 <path refid="runtime.path"/>
109 <map from="${basedir}${file.separator}" to=""/>
110 </pathconvert>
111 <propertyfile file="nbproject/project.properties">
112 <entry operation="=" key="ivy.classpath" value="${ivy.classpath.computed}"/>
113 </propertyfile>
114 </target>
115
116 <target name="-pre-compile" depends="init-josmbase, josmbase.javacc"/>
117
118 <target name="-post-compile" depends="init-josmbase, josmbase.epsg, josmbase.create-revision, copy-josm-resources"/>
119
120</project>
Note: See TracBrowser for help on using the repository browser.