m@38017
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
m@38017
|
2 |
<!-- You may freely edit this file. See commented blocks below for -->
|
m@38017
|
3 |
<!-- some examples of how to customize the build. -->
|
m@38017
|
4 |
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
m@38017
|
5 |
<project name="Isabelle-jEdit" default="default" basedir=".">
|
m@38017
|
6 |
<description>Builds, tests, and runs the project Isabelle-jEdit.</description>
|
m@38017
|
7 |
<import file="nbproject/build-impl.xml"/>
|
m@38017
|
8 |
<!--
|
m@38017
|
9 |
|
m@38017
|
10 |
There exist several targets which are by default empty and which can be
|
m@38017
|
11 |
used for execution of your tasks. These targets are usually executed
|
m@38017
|
12 |
before and after some main targets. They are:
|
m@38017
|
13 |
|
m@38017
|
14 |
-pre-init: called before initialization of project properties
|
m@38017
|
15 |
-post-init: called after initialization of project properties
|
m@38017
|
16 |
-pre-compile: called before javac compilation
|
m@38017
|
17 |
-post-compile: called after javac compilation
|
m@38017
|
18 |
-pre-compile-single: called before javac compilation of single file
|
m@38017
|
19 |
-post-compile-single: called after javac compilation of single file
|
m@38017
|
20 |
-pre-compile-test: called before javac compilation of JUnit tests
|
m@38017
|
21 |
-post-compile-test: called after javac compilation of JUnit tests
|
m@38017
|
22 |
-pre-compile-test-single: called before javac compilation of single JUnit test
|
m@38017
|
23 |
-post-compile-test-single: called after javac compilation of single JUunit test
|
m@38017
|
24 |
-pre-jar: called before JAR building
|
m@38017
|
25 |
-post-jar: called after JAR building
|
m@38017
|
26 |
-post-clean: called after cleaning build products
|
m@38017
|
27 |
|
m@38017
|
28 |
(Targets beginning with '-' are not intended to be called on their own.)
|
m@38017
|
29 |
|
m@38017
|
30 |
Example of inserting an obfuscator after compilation could look like this:
|
m@38017
|
31 |
|
m@38017
|
32 |
<target name="-post-compile">
|
m@38017
|
33 |
<obfuscate>
|
m@38017
|
34 |
<fileset dir="${build.classes.dir}"/>
|
m@38017
|
35 |
</obfuscate>
|
m@38017
|
36 |
</target>
|
m@38017
|
37 |
|
m@38017
|
38 |
For list of available properties check the imported
|
m@38017
|
39 |
nbproject/build-impl.xml file.
|
m@38017
|
40 |
|
m@38017
|
41 |
|
m@38017
|
42 |
Another way to customize the build is by overriding existing main targets.
|
m@38017
|
43 |
The targets of interest are:
|
m@38017
|
44 |
|
m@38017
|
45 |
-init-macrodef-javac: defines macro for javac compilation
|
m@38017
|
46 |
-init-macrodef-junit: defines macro for junit execution
|
m@38017
|
47 |
-init-macrodef-debug: defines macro for class debugging
|
m@38017
|
48 |
-init-macrodef-java: defines macro for class execution
|
m@38017
|
49 |
-do-jar-with-manifest: JAR building (if you are using a manifest)
|
m@38017
|
50 |
-do-jar-without-manifest: JAR building (if you are not using a manifest)
|
m@38017
|
51 |
run: execution of project
|
m@38017
|
52 |
-javadoc-build: Javadoc generation
|
m@38017
|
53 |
test-report: JUnit report generation
|
m@38017
|
54 |
|
m@38017
|
55 |
An example of overriding the target for project execution could look like this:
|
m@38017
|
56 |
|
m@38017
|
57 |
<target name="run" depends="Isabelle-jEdit-impl.jar">
|
m@38017
|
58 |
<exec dir="bin" executable="launcher.exe">
|
m@38017
|
59 |
<arg file="${dist.jar}"/>
|
m@38017
|
60 |
</exec>
|
m@38017
|
61 |
</target>
|
m@38017
|
62 |
|
m@38017
|
63 |
Notice that the overridden target depends on the jar target and not only on
|
m@38017
|
64 |
the compile target as the regular run target does. Again, for a list of available
|
m@38017
|
65 |
properties which you can use, check the target you are overriding in the
|
m@38017
|
66 |
nbproject/build-impl.xml file.
|
m@38017
|
67 |
|
m@38017
|
68 |
-->
|
m@38017
|
69 |
<target name="run" depends="Isabelle-jEdit-impl.jar,Isabelle-jEdit-impl.run">
|
m@38017
|
70 |
</target>
|
m@38017
|
71 |
<target name="debug" depends="Isabelle-jEdit-impl.jar,Isabelle-jEdit-impl.debug">
|
m@38017
|
72 |
</target>
|
m@38017
|
73 |
<target name="-pre-jar">
|
m@38017
|
74 |
<copy file="plugin/dockables.xml" todir="${build.classes.dir}" />
|
m@38017
|
75 |
<copy file="plugin/actions.xml" todir="${build.classes.dir}" />
|
m@38017
|
76 |
<copy file="plugin/Isac.props" todir="${build.classes.dir}" />
|
m@38017
|
77 |
</target>
|
m@38017
|
78 |
<target name="-post-jar">
|
m@38017
|
79 |
<!-- jars -->
|
m@38017
|
80 |
<delete file="${dist.dir}/jars/lib/jEdit.jar" />
|
m@38017
|
81 |
<move todir="${dist.dir}/jars">
|
m@38017
|
82 |
<fileset dir="${dist.dir}/jars/lib" />
|
m@38017
|
83 |
</move>
|
m@38017
|
84 |
<copy file="${dist.dir}/jars/Isac.jar" todir="contrib/jEdit/build/jars" />
|
m@38017
|
85 |
<copy file="${scala.library}" todir="${dist.dir}/jars" />
|
m@38017
|
86 |
<copy file="${scala.lib}/scala-swing.jar" todir="${dist.dir}/jars" />
|
m@38017
|
87 |
<!-- clean up -->
|
m@38017
|
88 |
<delete dir="{dist.dir}/jars/lib" />
|
m@38017
|
89 |
<!-- dist-template -->
|
m@38017
|
90 |
<copy file="dist-template/properties/jedit.props" tofile="${dist.dir}/properties" />
|
m@38017
|
91 |
<copy todir="${dist.dir}/modes">
|
m@38017
|
92 |
<fileset dir="dist-template/modes" />
|
m@38017
|
93 |
</copy>
|
m@38017
|
94 |
<copy todir="${dist.dir}/modes" overwrite="true">
|
m@38017
|
95 |
<fileset dir="${project.jEdit}/modes" />
|
m@38017
|
96 |
</copy>
|
m@38017
|
97 |
<replaceregexp byline="true" file="${dist.dir}/modes/catalog">
|
m@38017
|
98 |
<regexp pattern='(^.*NAME="javacc".*$)'/>
|
m@38017
|
99 |
<substitution expression="<MODE NAME="isac" FILE="isac.xml" FILE_NAME_GLOB="*.thy"/>${line.separator}${line.separator}\1"/>
|
m@38017
|
100 |
</replaceregexp>
|
m@38017
|
101 |
</target>
|
m@38017
|
102 |
</project>
|