Ignore:
Timestamp:
04/21/2016 03:59:55 PM (10 years ago)
Author:
jdalbey
Message:

Fix package-jars target to include xerces jar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE_metadata/NetBeans/TMCSim/nbproject/build-impl.xml

    r2 r12  
    5555    </target> 
    5656    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 
     57        <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> 
     58        <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> 
     59        <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> 
     60        <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> 
     61        <condition property="platform.javac" value="${platform.home}/bin/javac"> 
     62            <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> 
     63        </condition> 
     64        <property name="platform.javac" value="${platform.javac.tmp}"/> 
     65        <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> 
     66        <condition property="platform.java" value="${platform.home}/bin/java"> 
     67            <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> 
     68        </condition> 
     69        <property name="platform.java" value="${platform.java.tmp}"/> 
     70        <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> 
     71        <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> 
     72            <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> 
     73        </condition> 
     74        <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> 
     75        <condition property="platform.invalid" value="true"> 
     76            <or> 
     77                <contains string="${platform.javac}" substring="$${platforms."/> 
     78                <contains string="${platform.java}" substring="$${platforms."/> 
     79                <contains string="${platform.javadoc}" substring="$${platforms."/> 
     80            </or> 
     81        </condition> 
     82        <fail unless="platform.home">Must set platform.home</fail> 
     83        <fail unless="platform.bootcp">Must set platform.bootcp</fail> 
     84        <fail unless="platform.java">Must set platform.java</fail> 
     85        <fail unless="platform.javac">Must set platform.javac</fail> 
     86        <fail if="platform.invalid"> 
     87 The J2SE Platform is not correctly set up. 
     88 Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.  
     89 Either open the project in the IDE and setup the Platform with the same name or add it manually. 
     90 For example like this: 
     91     ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file) 
     92  or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)  
     93  </fail> 
    5794        <available file="${manifest.file}" property="manifest.available"/> 
    5895        <condition property="splashscreen.available"> 
     
    189226            <length length="0" string="${endorsed.classpath}" when="greater"/> 
    190227        </condition> 
    191         <condition else="false" property="jdkBug6558476"> 
    192             <and> 
    193                 <matches pattern="1\.[56]" string="${java.specification.version}"/> 
    194                 <not> 
    195                     <os family="unix"/> 
    196                 </not> 
    197             </and> 
    198         </condition> 
    199         <property name="javac.fork" value="${jdkBug6558476}"/> 
    200228        <property name="jar.index" value="false"/> 
    201229        <property name="jar.index.metainf" value="${jar.index}"/> 
     
    266294                <mkdir dir="${empty.dir}"/> 
    267295                <mkdir dir="@{apgeneratedsrcdir}"/> 
    268                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     296                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    269297                    <src> 
    270298                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    305333                <property location="${build.dir}/empty" name="empty.dir"/> 
    306334                <mkdir dir="${empty.dir}"/> 
    307                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
     335                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> 
    308336                    <src> 
    309337                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    385413            <sequential> 
    386414                <property name="junit.forkmode" value="perTest"/> 
    387                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
     415                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
    388416                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 
    389417                    <syspropertyset> 
     
    408436            <sequential> 
    409437                <property name="junit.forkmode" value="perTest"/> 
    410                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
     438                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
    411439                    <batchtest todir="${build.test.results.dir}"> 
    412440                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    447475                </union> 
    448476                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> 
    449                 <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="TMCSim" testname="TestNG tests" workingDir="${work.dir}"> 
     477                <testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="TMCSim" testname="TestNG tests" workingDir="${work.dir}"> 
    450478                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> 
    451479                    <propertyset> 
     
    527555            <sequential> 
    528556                <property name="junit.forkmode" value="perTest"/> 
    529                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
     557                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
    530558                    <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> 
    531559                    <syspropertyset> 
     
    552580            <sequential> 
    553581                <property name="junit.forkmode" value="perTest"/> 
    554                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
     582                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
    555583                    <batchtest todir="${build.test.results.dir}"> 
    556584                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    732760                        <path path="@{classpath}"/> 
    733761                    </classpath> 
     762                    <bootclasspath> 
     763                        <path path="${platform.bootcp}"/> 
     764                    </bootclasspath> 
    734765                </nbjpdastart> 
    735766            </sequential> 
     
    747778    </target> 
    748779    <target name="-init-debug-args"> 
    749         <property name="version-output" value="java version &quot;${ant.java.version}"/> 
     780        <exec executable="${platform.java}" outputproperty="version-output"> 
     781            <arg value="-version"/> 
     782        </exec> 
    750783        <condition property="have-jdk-older-than-1.4"> 
    751784            <or> 
     
    772805            <element name="customize" optional="true"/> 
    773806            <sequential> 
    774                 <java classname="@{classname}" dir="${work.dir}" fork="true"> 
     807                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
    775808                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    776809                    <jvmarg line="${debug-args-line}"/> 
     
    799832            <element name="customize" optional="true"/> 
    800833            <sequential> 
    801                 <java classname="@{classname}" dir="${work.dir}" fork="true"> 
     834                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
    802835                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    803836                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> 
     
    9861019            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> 
    9871020        </pathconvert> 
    988         <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
     1021        <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
    9891022    </target> 
    9901023    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> 
     
    10131046        <echo level="info">To run this application from the command line without Ant, try:</echo> 
    10141047        <property location="${dist.jar}" name="dist.jar.resolved"/> 
    1015         <echo level="info">java -jar "${dist.jar.resolved}"</echo> 
     1048        <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo> 
    10161049    </target> 
    10171050    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> 
     
    12041237            </and> 
    12051238        </condition> 
    1206         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
     1239        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> 
    12071240            <classpath> 
    12081241                <path path="${javac.classpath}"/> 
Note: See TracChangeset for help on using the changeset viewer.