[2] | 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.--> |
---|
[161] | 10 | <project name="QCG-Icon" default="default" basedir="."> |
---|
[144] | 11 | <description>Builds, tests, and runs the project QCG-Icon.</description> |
---|
[2] | 12 | <import file="nbproject/build-impl.xml"/> |
---|
| 13 | <!-- |
---|
| 14 | |
---|
| 15 | There exist several targets which are by default empty and which can be |
---|
| 16 | used for execution of your tasks. These targets are usually executed |
---|
| 17 | before and after some main targets. They are: |
---|
| 18 | |
---|
| 19 | -pre-init: called before initialization of project properties |
---|
| 20 | -post-init: called after initialization of project properties |
---|
| 21 | -pre-compile: called before javac compilation |
---|
| 22 | -post-compile: called after javac compilation |
---|
| 23 | -pre-compile-single: called before javac compilation of single file |
---|
| 24 | -post-compile-single: called after javac compilation of single file |
---|
| 25 | -pre-compile-test: called before javac compilation of JUnit tests |
---|
| 26 | -post-compile-test: called after javac compilation of JUnit tests |
---|
| 27 | -pre-compile-test-single: called before javac compilation of single JUnit test |
---|
| 28 | -post-compile-test-single: called after javac compilation of single JUunit test |
---|
| 29 | -pre-jar: called before JAR building |
---|
| 30 | -post-jar: called after JAR building |
---|
| 31 | -post-clean: called after cleaning build products |
---|
| 32 | |
---|
| 33 | (Targets beginning with '-' are not intended to be called on their own.) |
---|
| 34 | |
---|
| 35 | Example of inserting an obfuscator after compilation could look like this: |
---|
| 36 | |
---|
| 37 | <target name="-post-compile"> |
---|
| 38 | <obfuscate> |
---|
| 39 | <fileset dir="${build.classes.dir}"/> |
---|
| 40 | </obfuscate> |
---|
| 41 | </target> |
---|
| 42 | |
---|
| 43 | For list of available properties check the imported |
---|
| 44 | nbproject/build-impl.xml file. |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | Another way to customize the build is by overriding existing main targets. |
---|
| 48 | The targets of interest are: |
---|
| 49 | |
---|
| 50 | -init-macrodef-javac: defines macro for javac compilation |
---|
| 51 | -init-macrodef-junit: defines macro for junit execution |
---|
| 52 | -init-macrodef-debug: defines macro for class debugging |
---|
| 53 | -init-macrodef-java: defines macro for class execution |
---|
| 54 | -do-jar-with-manifest: JAR building (if you are using a manifest) |
---|
| 55 | -do-jar-without-manifest: JAR building (if you are not using a manifest) |
---|
| 56 | run: execution of project |
---|
| 57 | -javadoc-build: Javadoc generation |
---|
| 58 | test-report: JUnit report generation |
---|
| 59 | |
---|
| 60 | An example of overriding the target for project execution could look like this: |
---|
| 61 | |
---|
| 62 | <target name="run" depends="matlabClient-impl.jar"> |
---|
| 63 | <exec dir="bin" executable="launcher.exe"> |
---|
| 64 | <arg file="${dist.jar}"/> |
---|
| 65 | </exec> |
---|
| 66 | </target> |
---|
| 67 | |
---|
| 68 | Notice that the overridden target depends on the jar target and not only on |
---|
| 69 | the compile target as the regular run target does. Again, for a list of available |
---|
| 70 | properties which you can use, check the target you are overriding in the |
---|
| 71 | nbproject/build-impl.xml file. |
---|
| 72 | |
---|
| 73 | --> |
---|
[325] | 74 | |
---|
| 75 | <condition property="isMac"> |
---|
| 76 | <os family="mac" /> |
---|
| 77 | </condition> |
---|
[125] | 78 | |
---|
| 79 | <target name="single-jar" depends="jar"> |
---|
| 80 | <jar destfile="qcg-icon.jar"> |
---|
[325] | 81 | <zipfileset src="${dist.jar}" /> |
---|
[125] | 82 | <zipgroupfileset dir="dist/lib" includes="*.jar" /> |
---|
| 83 | <manifest> |
---|
| 84 | <attribute name="Main-Class" value="org.qcg.icon.Main" /> |
---|
| 85 | </manifest> |
---|
| 86 | </jar> |
---|
| 87 | </target> |
---|
[325] | 88 | |
---|
| 89 | <path id="dep-lib"> |
---|
| 90 | <fileset dir="dist/lib"> |
---|
| 91 | <include name="**/*.jar"/> |
---|
| 92 | </fileset> |
---|
| 93 | </path> |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | <target name="bundle" depends="jar" if="isMac"> |
---|
| 97 | |
---|
| 98 | <taskdef |
---|
| 99 | name="bundleapp" |
---|
| 100 | classname="com.oracle.appbundler.AppBundlerTask" |
---|
| 101 | classpath="dist_MACOSX/lib/appbundler-1.0.jar" /> |
---|
| 102 | |
---|
| 103 | <bundleapp |
---|
| 104 | outputdirectory="dist_MACOSX" |
---|
| 105 | name="QCG-Icon" |
---|
| 106 | displayname="QCG-Icon" |
---|
| 107 | identifier="org.qcg.QCGIconApp" |
---|
| 108 | shortversion="1.8" |
---|
| 109 | icon="dist_macosx/resources/resources/qcg-logo-stones.icns" |
---|
| 110 | applicationCategory="public.app-category.education" |
---|
| 111 | mainclassname="org.qcg.icon.Main"> |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | <!--runtime dir="${env.JAVA_HOME}" /--> |
---|
| 115 | |
---|
| 116 | <classpath file="${dist.jar}"/> |
---|
| 117 | <classpath file="dist/lib/AppleJavaExtensions.jar"/> |
---|
| 118 | <classpath file="dist/lib/Growl.jar"/> |
---|
| 119 | <classpath file="dist/lib/JarSync-0.3.jar"/> |
---|
| 120 | <classpath file="dist/lib/QCGComputingSDK-3.0.0.jar"/> |
---|
| 121 | <classpath file="dist/lib/QCGCoreSDK-3.5.0.jar"/> |
---|
| 122 | <classpath file="dist/lib/activation-1.1.jar"/> |
---|
| 123 | <classpath file="dist/lib/avalon-framework-4.1.3.jar"/> |
---|
| 124 | <classpath file="dist/lib/bcpkix-jdk15on-1.50.jar"/> |
---|
| 125 | <classpath file="dist/lib/bcprov-jdk15on-1.50.jar"/> |
---|
| 126 | <classpath file="dist/lib/canl-2.1.0.jar"/> |
---|
| 127 | <classpath file="dist/lib/commons-io-1.4.jar"/> |
---|
| 128 | <classpath file="dist/lib/commons-logging-1.1.jar"/> |
---|
| 129 | <classpath file="dist/lib/gss-2.2.0-SNAPSHOT.jar"/> |
---|
| 130 | <classpath file="dist/lib/jaxb-api-2.1.jar"/> |
---|
| 131 | <classpath file="dist/lib/jaxb-impl-2.1.6.jar"/> |
---|
| 132 | <classpath file="dist/lib/jaxws-api-2.1.jar"/> |
---|
| 133 | <classpath file="dist/lib/jaxws-rt-2.1.3.jar"/> |
---|
| 134 | <classpath file="dist/lib/jsch-0.1.49.jar"/> |
---|
| 135 | <classpath file="dist/lib/jsr250-api-1.0.jar"/> |
---|
| 136 | <classpath file="dist/lib/jsse-2.2.0-SNAPSHOT.jar"/> |
---|
| 137 | <classpath file="dist/lib/junit-3.8.jar"/> |
---|
| 138 | <classpath file="dist/lib/log4j-1.2.12.jar"/> |
---|
| 139 | <classpath file="dist/lib/logkit-1.0.1.jar"/> |
---|
| 140 | <classpath file="dist/lib/mimepull-1.1.jar"/> |
---|
| 141 | <classpath file="dist/lib/not-yet-commons-ssl-0.3.11.jar"/> |
---|
| 142 | <classpath file="dist/lib/resolver-20050927.jar"/> |
---|
| 143 | <classpath file="dist/lib/saaj-api-1.3.jar"/> |
---|
| 144 | <classpath file="dist/lib/saaj-impl-1.3.jar"/> |
---|
| 145 | <classpath file="dist/lib/servlet-api-2.3.jar"/> |
---|
| 146 | <classpath file="dist/lib/sjsxp-1.0.jar"/> |
---|
| 147 | <classpath file="dist/lib/ssl-proxies-2.2.0-SNAPSHOT.jar"/> |
---|
| 148 | <classpath file="dist/lib/stax-api-1.0.jar"/> |
---|
| 149 | <classpath file="dist/lib/stax-ex-1.2.jar"/> |
---|
| 150 | <classpath file="dist/lib/streambuffer-0.7.jar"/> |
---|
| 151 | <classpath file="dist/lib/swing-layout-1.0.4.jar"/> |
---|
| 152 | <classpath file="dist/lib/voms-api-java-3.0.0.jar"/> |
---|
| 153 | <classpath file="dist/lib/webservices-api-1.1.2-SNAPSHOT.jar"/> |
---|
| 154 | <classpath file="dist/lib/xmlsec-2.0.jar"/> |
---|
| 155 | <option value="-Duser.dir=$APP_ROOT/Contents/Resources"/> |
---|
| 156 | <option value="-Dapple.laf.useScreenMenuBar=true"/> |
---|
| 157 | <option value="-Xdock:name=QCG-Icon"/> |
---|
| 158 | <option value="-Dapple.awt.application.name=QCG-Icon"/> |
---|
| 159 | </bundleapp> |
---|
| 160 | </target> |
---|
| 161 | |
---|
[2] | 162 | </project> |
---|