export-build.xml.svn-base
来自「cqME :java framework for TCK test.」· SVN-BASE 代码 · 共 498 行 · 第 1/2 页
SVN-BASE
498 行
<project name="Exported Test" default="dist"><!-- $Id$ Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 only, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details (a copy is included at /legal/license.txt). You should have received a copy of the GNU General Public License version 2 along with this work; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, CA 95054 or visit www.sun.com if you need additional information or have any questions.--><!-- This script can be used to build and run exported tests. It can be run from command line using Ant or from NetBeans IDE. Depending on environment, build-impl.xml or nbproject/nb-build-impl.xml is imported by this script. These imported scripts define some specific targets such as 'preverify' or 'run-test'. In addition, in NetBeans IDE the imported script defines targets for running and debugging tests using integrated emulator and debugger. If you want to run this build script in specific environment, you can edit the import statement below in order to load your specific build script with 'preverify', 'run-test', 'load-properties-impl' and 'init-impl'.--> <!-- Select build-imp to load depending on the environment: NetBeans IDE or just simple Ant --> <condition property="import.file" value="nbproject/nb-build-impl.xml" else="build-impl.xml"> <isset property="netbeans.home"/> </condition> <import file="${import.file}"/> <property environment="env"/> <macrodef name="encodeUTF"> <attribute name="fromfile"/> <attribute name="tofile"/> <sequential> <java classname="com.sun.tck.j2me.utils.UTFEncoderTool" fork="true"> <classpath> <pathelement location="lib/j2mefw_jt.jar"/> </classpath> <arg value="-in"/> <arg file="@{fromfile}"/> <arg value="-out"/> <arg file="@{tofile}"/> </java> </sequential> </macrodef> <target name="init" depends="load-properties, init-impl, init-common" description="Performs initializations required for all other targets."> <!-- Defines some properties after loading initial properties from files. 'init-impl' target should be defined in imported build script, it's invoked prior to this target and can be used to override some properties. --> <path id="preverify.classpath"> <pathelement path="${compile.bootclasspath}"/> <pathelement path="${original.jar}"/> </path> </target> <target name="init-common" description="Defines common properties (for any environment)."> <!-- Defines properties which don't depend on the environment and are the same when the build is run from command line using Ant or from NetBeans IDE. --> <condition property="do.sign.jar"> <equals arg1="${trusted}" arg2="true" casesensitive="false"/> </condition> <condition property="do.run.remote"> <equals arg1="${distributed}" arg2="true" casesensitive="false"/> </condition> </target> <target name="load-properties" depends="load-properties-common, load-properties-impl" description="Loads properties from files."> <!-- Invokes other targets for loading properties.'load-properties-impl' target should be defined in imported build script, it's invoked prior to this target and can be used to load properties from specific files and override some of them. --> </target> <target name="load-properties-common" depends="load-local" description="Load properties from common files (for any environment)."> <!-- Loads properties from build.properties and test.properties files. These properties don't depend on the environment and are the same when the build is run from command line using Ant or from NetBeans IDE. --> <loadproperties srcfile="build.properties"/> <loadproperties srcfile="test.properties"/> <condition property="impl.classes" value="${env.IMPL_CLASSES}"> <and> <not> <isset property="impl.classes"/> </not> <isset property="env.IMPL_CLASSES"/> </and> </condition> <condition property="preverifier.exe" value="${env.PREVERIFIER_EXE}"> <and> <not> <isset property="preverifier.exe"/> </not> <isset property="env.PREVERIFIER_EXE"/> </and> </condition> </target> <target name="load-local" depends="-check-local" if="do.load.local" description="Load properties from local.properties if found."> <!-- Loads properties from local.properties file if found. This file is optional and may define some local specific properties such as 'impl.classes' and 'preverifier.exe'. --> <loadproperties srcfile="local.properties"/> </target> <target name="-check-local"> <!-- Sets do.load.local property if local.properties file is available. do.load.local is used by 'load-local' target. --> <condition property="do.load.local"> <available file="local.properties"/> </condition> </target> <target name="compile" if="compile.bootclasspath" depends="init, pre-compile" description="Compile all Java sources."> <!-- Compiles all Java sources. This tagret requires 'compile.bootclasspath' property. It defines platform specific classpath and should be set by 'init-impl' target from imported build script. When running build from command line, this property is defined by 'impl.classes' property in build.properties file. When running build from NetBeans IDE, this property is defined by Java ME Platform properties for this project. --> <javac srcdir="${src.dir}" destdir="${build.classes.dir}" source="1.2" target="1.1" includes="${java.sources} ${lib.java.files}" bootclasspath="${compile.bootclasspath}" includeantruntime="no" includejavaruntime="no" debug="true"> <classpath> <pathelement path="${build.classes.dir}"/> <pathelement path="${original.jar}"/> </classpath> </javac> </target> <target name="-check-agent-args-source" depends="init"> <condition property="agent.args.source.available"> <and> <isset property="agent.args.source"/> <available file="${agent.args.source}"/> </and> </condition> </target> <target name="-update-test-server-port" depends="init" if="test.server.port"> <!-- Update the source of agent.dat with new value of test.server.port. --> <loadfile srcfile="${agent.args.source}" property="agent.args"> <filterchain> <replaceregex pattern="-client\s+([^\s]+)\s+http://([^:]+):[0-9]+" replace="-client \1 http://\2:${test.server.port}" byline="false"/> </filterchain> </loadfile> <echo file="${agent.args.source}" append="false">${agent.args}</echo> </target> <target name="build-agent-dat" depends="init, -check-agent-args-source, -update-test-server-port" if="agent.args.source.available" description="Builds agent.dat file from the source text file."> <encodeUTF fromfile="${agent.args.source}" tofile="${build.dir}/${agent.args.file}"/> </target> <target name="jar" depends="init, compile, preverify, build-agent-dat, pre-jar" description="Updates the JAR file."> <!-- Updates the JAR file. The originally exported JAR file is copied from 'originals' directory to the project directory and all outdated class files in that JAR file are overwritten with previously compiled class files. Also update agent.dat in the JAR file. --> <jar destfile="${dist.dir}/${dist.jar}" basedir="${build.preverified.dir}" update="true"/> <jar destfile="${dist.dir}/${dist.jar}" basedir="${build.dir}" includes="${agent.args.file}" update="true"/> </target> <target name="update-jad" depends="update-jar-size, update-jar-url, sign-jar" description="Updates the JAD file."> <!-- This target invokes other targets in order to update the JAD file after the JAR file was changed. This includes updating the size of JAR file, URL of JAR file and signing updated JAD file. --> </target>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?