📄 common.xml
字号:
<target name="netbeans" depends="init,jar,netbeans-extra,module-xml-regular,module-xml-autoload,module-xml-eager,javahelp,module-auto-deps,release,verify-class-linkage"> <genlist outputfiledir="${cluster}" module="${module.jar}"> <fileset dir="${cluster}"> <patternset refid="module.files"/> </fileset> </genlist> </target> <property name="jnlp.signjar.alias" value="jnlp" /> <property name="jnlp.signjar.keystore" location="${jnlp.dest.dir}/default.keystore" /> <property name="jnlp.signjar.password" value="netbeans" /> <property name="jnlp.codebase" value="file:${jnlp.dest.dir}" /><!-- XXX potential SPACE_IN_PATH bug --> <target name="jnlp" depends="init,netbeans,jnlp-master" description="Builds JNLP descriptor and signs JAR files" > <fail unless="jnlp.dest.dir" > You have to provide value to jnlp.dest.dir property! </fail> <fail unless="jnlp.signjar.keystore" > You have to provide value to jnlp.signjar.keystore property! </fail> <fail unless="jnlp.signjar.alias" > You have to provide value to jnlp.signjar.alias property! </fail> <fail unless="jnlp.signjar.password" > You have to provide value to jnlp.signjar.password property! </fail> <mkdir dir="${jnlp.dest.dir}" /> <property name="jnlp.codebase" value="$$$$codebase" /> <property name="jnlp.permissions" value="<security><all-permissions/></security>"/> <property name="jnlp.verify.excludes" value="" /> <makejnlp dir="${jnlp.dest.dir}" alias="${jnlp.signjar.alias}" storepass="${jnlp.signjar.password}" keystore="${jnlp.signjar.keystore}" codebase="${jnlp.codebase}" verify="true" verifyexcludes="${jnlp.verify.excludes}" permissions="${jnlp.permissions}" > <modules dir="${cluster}" > <include name="${module.jar}" /> </modules> </makejnlp> </target> <target name="jnlp-master" depends="init,netbeans" if="jnlp.master.dir" > <property name="jnlp.master.codebase" value="" /> <makemasterjnlp dir="${jnlp.master.dir}" codebase="${jnlp.master.codebase}" > <modules dir="${cluster}" > <include name="${module.jar}" /> </modules> </makemasterjnlp> </target> <target name="-nbm-prompt-for-storepass" if="keystore" unless="storepass"> <input addproperty="storepass" message="Enter password for ${keystore}:"/> </target> <target name="nbm" depends="init,netbeans,-nbm-prompt-for-storepass" description="Build NBM archive."> <mkdir dir="build"/> <property name="nbm.target.cluster" value=""/> <!-- fallback --> <makenbm file="build/${nbm}" productdir="${cluster}" module="${module.jar}" homepage="${nbm.homepage}" distribution="${nbm.distribution}" needsrestart="${nbm.needs.restart}" global="${nbm.is.global}" targetcluster="${nbm.target.cluster}" releasedate="${nbm.release.date}" moduleauthor="${nbm.module.author}"> <license file="${license.file}"/> <signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}"/> </makenbm> </target> <target name="test-preinit" depends="init"/> <target name="test-init" depends="init,test-preinit,test-lib-init"> <property name="test.unit.dir" location="test/unit"/> <property name="test.unit.src.dir" location="${test.unit.dir}/src"/> <property name="build.test.unit.dir" location="build/test/unit"/> <property name="build.test.unit.classes.dir" location="${build.test.unit.dir}/classes"/> <property name="build.test.unit.results.dir" location="${build.test.unit.dir}/results"/> <property name="extra.test.libs.dir" location="${test.dist.dir}/extralibs"/> <!-- if project.xml doesn't contain test dependencies --> <property name="test.unit.folder" location="build/test/unit/dist"/> <property name="test.unit.out.folder" location="${test.unit.folder}"/> <property name="test.filter.trace" value="true"/> <path id="test.unit.cp"> <!-- Cannot use <path refid="cp"/> since that uses ${module.classpath} and we want ${module.run.classpath}: --> <pathelement path="${test.unit.compile.cp}"/> <pathelement path="${cp.extra}"/> <pathelement location="${cluster}/${module.jar}"/> <path refid="test.unit.lib.cp"/> <!-- for compatibility with property based classpath--> <pathelement path="${module.run.classpath}"/> <pathelement path="${test.unit.cp.extra}"/> </path> <path id="test.unit.run.cp"> <!-- Cannot use <path refid="cp"/> since that uses ${module.classpath} and we want ${module.run.classpath}: --> <pathelement path="${test.unit.runtime.cp}"/> <pathelement path="${cp.extra}"/> <pathelement location="${cluster}/${module.jar}"/> <path refid="test.unit.lib.cp"/> <pathelement path="${build.test.unit.classes.dir}"/> <!-- for compatibility with property based classpath--> <pathelement path="${module.run.classpath}"/> <pathelement path="${test.unit.run.cp.extra}"/> <pathelement path="${test.unit.cp.extra}"/> </path> <!-- path reference used in both compiler and executor --> <propertyset id="test.unit.properties"> <propertyref prefix="test-unit-sys-prop."/> <mapper type="glob" from="test-unit-sys-prop.*" to="*"/> </propertyset> </target> <target name="test-build" depends="jar,do-test-build,test-build-datajar"/> <target name="do-test-build" depends="init,test-init"> <mkdir dir="${build.test.unit.classes.dir}"/> <mkdir dir="${test.dist.dir}"/> <depend srcdir="${test.unit.src.dir}" destdir="${build.test.unit.classes.dir}" cache="${build.test.unit.dir}/depcache"> <classpath refid="test.unit.cp"/> </depend> <javac srcdir="${test.unit.src.dir}" destdir="${build.test.unit.classes.dir}" debug="true" deprecation="${build.compiler.deprecation}" source="${javac.source}" target="${javac.target}" optimize="${build.compiler.optimize}" includeantruntime="false"> <exclude name="**/jars/**"/><!-- XXX for core only; fix in core, not here --> <exclude name="**/data/**"/><!-- XXX for openide/util and co. --> <classpath refid="test.unit.cp"/> <compilerarg line="${javac.compilerargs}"/> </javac> <copy todir="${build.test.unit.classes.dir}"> <fileset dir="${test.unit.src.dir}"> <exclude name="**/*.java"/> </fileset> </copy> <copy todir="${build.test.unit.dir}"> <fileset dir="${test.unit.dir}"> <include name="data/**"/> </fileset> </copy> <available file="${test.unit.dir}/data" type="dir" property="exists.test.data"/> <!-- test distribution --> <mkdir dir="${test.dist.dir}/extralibs"/> <mkdir dir="${test.unit.out.folder}"/> <jar destfile="${test.unit.out.folder}/tests.jar" basedir="${build.test.unit.classes.dir}" filesetmanifest="merge"/> <!-- create properties --> <shorterpaths inref="test.unit.run.cp" out="test.unit.run.cp.short" extralibs="extra.test.libs.short" extralibsdir="${extra.test.libs.dir}" testproperties="${test.unit.out.folder}/test.properties"> <replacement dir="${netbeans.dest.dir}" name="netbeans.dest.dir"/> <replacement dir="${test.dist.dir}" name="test.dist.dir"/> <replacement dir="${java.home}" name="java.home"/> <replacement dir="${java.home.parent}" name="java.home.parent"/> </shorterpaths> <copy todir="${test.unit.out.folder}"> <fileset dir="${test.unit.dir}/.."> <include name="build-unit.xml"/> <include name="build.xml"/> <include name="cfg-unit.xml"/> </fileset> </copy> </target> <target name="test-build-datajar" depends="do-test-build" if="exists.test.data"> <zip destfile="${test.unit.out.folder}/data.zip" basedir="${test.unit.dir}/data"/> </target> <target name="compile-test-single" depends="init,test-init,jar"> <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> <mkdir dir="${build.test.unit.classes.dir}"/> <!-- XXX consider forcing deprecation=true --> <!-- XXX consider deleting the .class file first to force a rebuild --> <depend srcdir="${test.unit.src.dir}" destdir="${build.test.unit.classes.dir}" cache="${build.test.unit.dir}/depcache"> <classpath refid="test.unit.cp"/> </depend> <javac srcdir="${test.unit.src.dir}" destdir="${build.test.unit.classes.dir}" debug="true" deprecation="${build.compiler.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false" optimize="${build.compiler.optimize}" includes="${javac.includes}"> <classpath refid="test.unit.cp"/> <compilerarg line="${javac.compilerargs}"/> </javac> <copy todir="${build.test.unit.classes.dir}"> <fileset dir="${test.unit.src.dir}"> <exclude name="**/*.java"/> </fileset> </copy> <copy todir="${build.test.unit.dir}"> <fileset dir="${test.unit.dir}"> <include name="data/**"/> </fileset> </copy> </target> <target name="test" depends="init,test-init,test-build">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -