Changeset 38 for trunk/fmgVen


Ignore:
Timestamp:
Mar 20, 2012, 2:58:13 PM (12 years ago)
Author:
fmguler
Message:

Refs #7 - Removed explicit platform specification on build. Changed platform to default. Relying on javac target.

Used to set the active platform explicitly to JDK 1.4, but we're in the year 2012! This should not be a problem anymore. At most the user will have run time link problems on Java 1.4, which is easily recoverable (if we accidentally use latest java features). Also I have started to think that even if Java 1.4 happens to be supported, we can use retroweaver for that. Maybe we should update minimum java version to 1.5.

Location:
trunk/fmgVen/nbproject
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/fmgVen/nbproject/build-impl.xml

    r37 r38  
    8080    </target> 
    8181    <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 
    82         <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> 
    83         <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> 
    84         <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> 
    85         <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> 
    86         <condition property="platform.javac" value="${platform.home}/bin/javac"> 
    87             <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> 
    88         </condition> 
    89         <property name="platform.javac" value="${platform.javac.tmp}"/> 
    90         <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> 
    91         <condition property="platform.java" value="${platform.home}/bin/java"> 
    92             <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> 
    93         </condition> 
    94         <property name="platform.java" value="${platform.java.tmp}"/> 
    95         <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> 
    96         <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> 
    97             <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> 
    98         </condition> 
    99         <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> 
    100         <condition property="platform.invalid" value="true"> 
    101             <or> 
    102                 <contains string="${platform.javac}" substring="$${platforms."/> 
    103                 <contains string="${platform.java}" substring="$${platforms."/> 
    104                 <contains string="${platform.javadoc}" substring="$${platforms."/> 
    105             </or> 
    106         </condition> 
    107         <fail unless="platform.home">Must set platform.home</fail> 
    108         <fail unless="platform.bootcp">Must set platform.bootcp</fail> 
    109         <fail unless="platform.java">Must set platform.java</fail> 
    110         <fail unless="platform.javac">Must set platform.javac</fail> 
    111         <fail if="platform.invalid"> 
    112  The J2SE Platform is not correctly set up. 
    113  Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.  
    114  Either open the project in the IDE and setup the Platform with the same name or add it manually. 
    115  For example like this: 
    116      ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file) 
    117   or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)  
    118   </fail> 
    11982        <available file="${manifest.file}" property="manifest.available"/> 
    12083        <condition property="splashscreen.available"> 
     
    250213            <length length="0" string="${endorsed.classpath}" when="greater"/> 
    251214        </condition> 
     215        <condition else="false" property="jdkBug6558476"> 
     216            <and> 
     217                <matches pattern="1\.[56]" string="${java.specification.version}"/> 
     218                <not> 
     219                    <os family="unix"/> 
     220                </not> 
     221            </and> 
     222        </condition> 
     223        <property name="javac.fork" value="${jdkBug6558476}"/> 
    252224        <property name="jar.index" value="false"/> 
    253225        <property name="jar.index.metainf" value="${jar.index}"/> 
     
    297269                <mkdir dir="${empty.dir}"/> 
    298270                <mkdir dir="@{apgeneratedsrcdir}"/> 
    299                 <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}"> 
     271                <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}"> 
    300272                    <src> 
    301273                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    336308                <property location="${build.dir}/empty" name="empty.dir"/> 
    337309                <mkdir dir="${empty.dir}"/> 
    338                 <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}"> 
     310                <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}"> 
    339311                    <src> 
    340312                        <dirset dir="@{gensrcdir}" erroronmissingdir="false"> 
     
    393365            <sequential> 
    394366                <property name="junit.forkmode" value="perTest"/> 
    395                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> 
     367                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    396368                    <batchtest todir="${build.test.results.dir}"> 
    397369                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    470442                        <path path="@{classpath}"/> 
    471443                    </classpath> 
    472                     <bootclasspath> 
    473                         <path path="${platform.bootcp}"/> 
    474                     </bootclasspath> 
    475444                </nbjpdastart> 
    476445            </sequential> 
     
    488457    </target> 
    489458    <target name="-init-debug-args"> 
    490         <exec executable="${platform.java}" outputproperty="version-output"> 
    491             <arg value="-version"/> 
    492         </exec> 
     459        <property name="version-output" value="java version &quot;${ant.java.version}"/> 
    493460        <condition property="have-jdk-older-than-1.4"> 
    494461            <or> 
     
    515482            <element name="customize" optional="true"/> 
    516483            <sequential> 
    517                 <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
     484                <java classname="@{classname}" dir="${work.dir}" fork="true"> 
    518485                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    519486                    <jvmarg line="${debug-args-line}"/> 
     
    540507            <element name="customize" optional="true"/> 
    541508            <sequential> 
    542                 <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> 
     509                <java classname="@{classname}" dir="${work.dir}" fork="true"> 
    543510                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
    544511                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> 
     
    723690            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> 
    724691        </pathconvert> 
    725         <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
     692        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
    726693    </target> 
    727694    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> 
     
    750717        <echo level="info">To run this application from the command line without Ant, try:</echo> 
    751718        <property location="${dist.jar}" name="dist.jar.resolved"/> 
    752         <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo> 
     719        <echo level="info">java -jar "${dist.jar.resolved}"</echo> 
    753720    </target> 
    754721    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> 
     
    908875            </and> 
    909876        </condition> 
    910         <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}"> 
     877        <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}"> 
    911878            <classpath> 
    912879                <path path="${javac.classpath}"/> 
  • trunk/fmgVen/nbproject/genfiles.properties

    r37 r38  
    44# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 
    55# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 
    6 nbproject/build-impl.xml.data.CRC32=31e5c25b 
    7 nbproject/build-impl.xml.script.CRC32=74d9d881 
    8 nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46 
     6nbproject/build-impl.xml.data.CRC32=6b84a8b1 
     7nbproject/build-impl.xml.script.CRC32=84e2f99a 
     8nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.2.46 
  • trunk/fmgVen/nbproject/project.properties

    r37 r38  
    5555meta.inf.dir=${src.dir}/META-INF 
    5656mkdist.disabled=true 
    57 platform.active=JDK_1.5 
     57platform.active=default_platform 
    5858run.classpath=\ 
    5959    ${javac.classpath}:\ 
  • trunk/fmgVen/nbproject/project.xml

    r26 r38  
    66            <name>fmgVen</name> 
    77            <minimum-ant-version>1.6.5</minimum-ant-version> 
    8             <explicit-platform explicit-source-supported="true"/> 
    98            <source-roots> 
    109                <root id="src.dir"/> 
Note: See TracChangeset for help on using the changeset viewer.