Changeset 9765 in josm for trunk/netbeans


Ignore:
Timestamp:
2016-02-09T13:25:35+01:00 (3 years ago)
Author:
bastiK
Message:

new setup of the netbeans project

  • removed classpath hack with two source directories (. and ./src) instead copy the resources to build dir in nbbuild.xml
  • import main JOSM ant file into nbbuild.xml instead of copy&paste
Location:
trunk/netbeans
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/netbeans/nbbuild.xml

    r8529 r9765  
    88<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    99<!-- in the project's Project Properties dialog box.-->
    10 <project name="josm" default="default" basedir=".">
     10<project name="josmnb" default="default" basedir=".">
    1111    <description>Builds, tests, and runs the project josm.</description>
    1212
    13     <property name="javacc.home" location="../tools"/>
    14     <property name="mapcss.dir" location="../src/org/openstreetmap/josm/gui/mappaint/mapcss"/>
    15     <!-- For Windows-specific stuff -->
    16     <condition property="isWindows">
    17         <os family="Windows"/>
    18     </condition>
     13    <import file="nbproject/build-impl.xml" as="nbimpl"/>
    1914
    20     <import file="nbproject/build-impl.xml"/>
     15    <import file="../build.xml" as="josmbase"/> <!-- import the main JOSM ant file -->
     16
    2117    <!--
    2218
    23     There exist several targets which are by default empty and which can be 
    24     used for execution of your tasks. These targets are usually executed 
    25     before and after some main targets. They are: 
     19    There exist several targets which are by default empty and which can be
     20    used for execution of your tasks. These targets are usually executed
     21    before and after some main targets. They are:
    2622
    2723      -pre-init:                 called before initialization of project properties
     
    4945        </target>
    5046
    51     For list of available properties check the imported 
    52     nbproject/build-impl.xml file. 
     47    For list of available properties check the imported
     48    nbproject/build-impl.xml file.
    5349
    5450
    5551    Another way to customize the build is by overriding existing main targets.
    56     The targets of interest are: 
     52    The targets of interest are:
    5753
    5854      -init-macrodef-javac:     defines macro for javac compilation
     
    6056      -init-macrodef-debug:     defines macro for class debugging
    6157      -init-macrodef-java:      defines macro for class execution
    62       -do-jar-with-manifest:    JAR building (if you are using a manifest)
    63       -do-jar-without-manifest: JAR building (if you are not using a manifest)
    64       run:                      execution of project
     58      -do-jar:                  JAR building
     59      run:                      execution of project
    6560      -javadoc-build:           Javadoc generation
    6661      test-report:              JUnit report generation
     
    7469        </target>
    7570
    76     Notice that the overridden target depends on the jar target and not only on 
    77     the compile target as the regular run target does. Again, for a list of available 
     71    Notice that the overridden target depends on the jar target and not only on
     72    the compile target as the regular run target does. Again, for a list of available
    7873    properties which you can use, check the target you are overriding in the
    79     nbproject/build-impl.xml file. 
     74    nbproject/build-impl.xml file.
    8075
    8176    -->
    82    
    83     <target name="-post-compile">
    84     <!-- create the REVISION file to be included in the distribution -->
    85                 <exec append="false" output="REVISION.XML" executable="svn" dir=".." failifexecutionfails="false">
    86                         <env key="LANG" value="C"/>
    87                         <arg value="info"/>
    88                         <arg value="--xml"/>
    89                         <arg value="."/>
    90                 </exec>
    91                 <xmlproperty file="REVISION.XML" prefix="version" keepRoot="false" collapseAttributes="true"/>
    92                 <delete file="REVISION.XML" />
    93                 <tstamp>
    94                         <format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss"/>
    95                 </tstamp>
    9677
    97                 <property name="version.entry.commit.revision" value="UNKNOWN"/>
    98                 <echo file="${build.classes.dir}/REVISION">
    99 # automatically generated by JOSM build.xml - do not edit
    100 Revision: ${version.entry.commit.revision}
    101 Is-Local-Build: true
    102 Build-Date: ${build.tstamp}
    103 </echo>
    104         </target>
     78    <!--
     79      ** Copy resource file required on classpath.
     80    -->
     81    <target name="copy-josm-resources">
     82        <copy file="../CONTRIBUTION" todir="${build.classes.dir}"/>
     83        <copy file="../README" todir="${build.classes.dir}"/>
     84        <copy file="../LICENSE" todir="${build.classes.dir}"/>
     85        <copy file="../gpl-2.0.txt" todir="${build.classes.dir}" />
     86        <copy file="../gpl-3.0.txt" todir="${build.classes.dir}" />
     87        <copy todir="${build.classes.dir}/images"><fileset dir="../images"/></copy>
     88        <copy todir="${build.classes.dir}/data"><fileset dir="../data"/></copy>
     89        <copy todir="${build.classes.dir}/styles"><fileset dir="../styles"/></copy>
     90        <copy todir="${build.classes.dir}/org/openstreetmap/gui/jmapviewer/images">
     91            <fileset dir="../src/org/openstreetmap/gui/jmapviewer/images"/>
     92        </copy>
     93    </target>
    10594
    106     <target name="check-javacc">
    107         <uptodate property="javacc.notRequired" targetfile="${mapcss.dir}/parsergen/MapCSSParser.java" >
    108             <srcfiles dir="${mapcss.dir}" includes="MapCSSParser.jj"/>
    109         </uptodate>
    110     </target>   
    111     <target name="javacc" depends="check-javacc" unless="javacc.notRequired">
    112         <mkdir dir="${mapcss.dir}/parsergen"/>
    113         <exec append="false" executable="java" failifexecutionfails="true">
    114             <arg value="-cp"/>
    115             <arg value="${javacc.home}/javacc.jar"/>
    116             <arg value="javacc"/>
    117             <arg value="-DEBUG_PARSER=false"/>
    118             <arg value="-DEBUG_TOKEN_MANAGER=false"/>
    119             <arg value="-JDK_VERSION=1.7"/>
    120             <arg value="-GRAMMAR_ENCODING=UTF-8"/>
    121             <arg value="-OUTPUT_DIRECTORY=${mapcss.dir}/parsergen"/>
    122             <arg value="${mapcss.dir}/MapCSSParser.jj"/>
    123         </exec>
     95    <!--
     96      ** Customize some properties used by the main JOSM ant file.
     97    -->
     98    <target name="set-josmbase-properties" depends="-init-project">
     99        <property name="revision.dir" value="${build.classes.dir}"/>
     100        <property name="proj-build.dir" location="${build.dir}/build2"/>
     101        <property name="proj-classpath" location="${build.classes.dir}"/>
    124102    </target>
    125     <target name="-pre-compile" depends="javacc">
    126 <!--        <javacc target="${mapcss.dir}/MapCSSParser.jj" javacchome="${javacc.home}" outputdirectory="${mapcss.dir}/parsergen"/>-->
    127     </target>   
     103
     104    <!--
     105      ** Make sure properties are loaded in the right order.
     106      ** E.g. ${build.dir} is set both by Netbeans and by the main JOSM ant file.
     107      ** Load the Netbeans properties first, which makes the values permanent.
     108    -->
     109    <target name="init-josmbase" depends="-init-project, set-josmbase-properties, josmbase.init-properties"/>
     110
     111    <target name="-pre-compile" depends="init-josmbase, josmbase.javacc"/>
     112
     113    <target name="-post-compile" depends="init-josmbase, josmbase.epsg, josmbase.create-revision, copy-josm-resources"/>
     114
    128115</project>
  • trunk/netbeans/nbproject/genfiles.properties

    r7937 r9765  
    1 nbbuild.xml.data.CRC32=2a1d7942
    2 nbbuild.xml.script.CRC32=cf6b78f3
    3 nbbuild.xml.stylesheet.CRC32=28e38971@1.38.2.45
     1nbbuild.xml.data.CRC32=34ed5462
     2nbbuild.xml.script.CRC32=148a2ea3
     3nbbuild.xml.stylesheet.CRC32=8064a381@1.75.2.48
    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=e047155d
    7 nbproject/build-impl.xml.script.CRC32=63445536
    8 nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
     6nbproject/build-impl.xml.data.CRC32=f36994fb
     7nbproject/build-impl.xml.script.CRC32=05416174
     8nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
  • trunk/netbeans/nbproject/private/config.properties

    r7937 r9765  
     1config=local_preferences
  • trunk/netbeans/nbproject/project.properties

    r8277 r9765  
    1 annotation.processing.enabled=false
     1annotation.processing.enabled=true
    22annotation.processing.enabled.in.editor=false
    33annotation.processing.processors.list=
     
    2424debug.test.classpath=\
    2525    ${run.test.classpath}
     26# Files in build.classes.dir which should be excluded from distribution jar
     27dist.archive.excludes=
    2628# This directory is removed when the project is cleaned:
    2729dist.dir=dist
     
    2931dist.javadoc.dir=${dist.dir}/javadoc
    3032endorsed.classpath=
    31 excludes=org/apache/commons/compress/compressors/CompressorStreamFactory.java,org/apache/commons/jcs/admin/servlet/**,org/apache/commons/jcs/auxiliary/disk/jdbc/**,org/apache/commons/jcs/auxiliary/remote/http/**,org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java,org/apache/commons/jcs/utils/servlet/**,org/apache/commons/logging/impl/AvalonLogger.java,org/apache/commons/logging/impl/Jdk13LumberjackLogger.java,org/apache/commons/logging/impl/Log4JLogger.java,org/apache/commons/logging/impl/LogKitLogger.java,org/apache/commons/logging/impl/ServletContextCleaner.java
     33excludes=org/apache/commons/compress/compressors/lzma/**,org/apache/commons/compress/compressors/xz/**,org/apache/commons/compress/compressors/CompressorStreamFactory.java,org/apache/commons/compress/compressors/deflate/**,org/apache/commons/compress/compressors/gzip/**,org/apache/commons/compress/compressors/lzw/**,org/apache/commons/compress/compressors/pack200/**,org/apache/commons/compress/compressors/snappy/**,org/apache/commons/compress/compressors/z/**,org/apache/commons/jcs/admin/servlet/**,org/apache/commons/jcs/auxiliary/disk/jdbc/**,org/apache/commons/jcs/auxiliary/remote/http/**,org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java,org/apache/commons/jcs/utils/servlet/**,org/apache/commons/logging/impl/AvalonLogger.java,org/apache/commons/logging/impl/Jdk13LumberjackLogger.java,org/apache/commons/logging/impl/Log4JLogger.java,org/apache/commons/logging/impl/LogKitLogger.java,org/apache/commons/logging/impl/ServletContextCleaner.java,org/openstreetmap/gui/jmapviewer/Demo.java
     34file.reference.commons-collections-3.2.jar=../test/lib/unitils-core/commons-collections-3.2.jar
     35file.reference.commons-lang-2.3.jar=../test/lib/unitils-core/commons-lang-2.3.jar
     36file.reference.commons-logging-1.1.jar=../test/lib/unitils-core/commons-logging-1.1.jar
    3237file.reference.core-src=../src
    33 file.reference.core=..
     38file.reference.debug-1.0.jar=../test/lib/fest/debug-1.0.jar
     39file.reference.equalsverifier-1.7.6.jar=../test/lib/equalsverifier-1.7.6.jar
     40file.reference.fest-assert-1.0.jar=../test/lib/fest/fest-assert-1.0.jar
     41file.reference.fest-reflect-1.1.jar=../test/lib/fest/fest-reflect-1.1.jar
     42file.reference.fest-swing-1.1.jar=../test/lib/fest/fest-swing-1.1.jar
     43file.reference.fest-util-1.0.jar=../test/lib/fest/fest-util-1.0.jar
     44file.reference.findbugs.jar=../tools/findbugs/findbugs.jar
     45file.reference.hamcrest-core-1.3.jar=../test/lib/junit/hamcrest-core-1.3.jar
     46file.reference.jcip-annotations-1.0.jar=../test/lib/fest/jcip-annotations-1.0.jar
     47file.reference.jfcunit.jar=../test/lib/jfcunit.jar
     48file.reference.junit-4.12.jar=../test/lib/junit/junit-4.12.jar
     49file.reference.MRJToolkitStubs-1.0.jar=../test/lib/fest/MRJToolkitStubs-1.0.jar
     50file.reference.ognl-2.6.9.jar=../test/lib/unitils-core/ognl-2.6.9.jar
     51file.reference.test-functional=../test/functional
     52file.reference.test-performance=../test/performance
    3453file.reference.test-unit=../test/unit
    35 includes=org/apache/commons/compress/compressors/*.java,org/apache/commons/compress/compressors/bzip2/*.java,org/apache/commons/codec/**/*.java,org/glassfish/**/*.java,org/jdesktop/**/*.java,org/openstreetmap/**/*.java,org/w3/**/*.java,gnu/**/*.java,javax/**/*.java,oauth/**/*.java,com/**/*.java,org/apache/commons/logging/**/*.java,org/apache/commons/jcs/**/*.java,images/**,org/openstreetmap/gui/**/*.png,data/**,styles/**,LICENSE,README,CONTRIBUTION,gpl-2.0.txt,gpl-3.0.txt
    36 jar.archive.disabled=${jnlp.enabled}
     54file.reference.unitils-core-3.4.2.jar=../test/lib/unitils-core/unitils-core-3.4.2.jar
     55includes=**/*.java
    3756jar.compress=false
    38 jar.index=${jnlp.enabled}
    3957javac.classpath=
    4058# Space-separated list of extra javac options
    41 javac.compilerargs=-Xlint:unchecked -Xlint:cast -Xlint:dep-ann -Xlint:divzero -Xlint:empty -Xlint:finally -Xlint:overrides -Xlint:static -Xlint:try  -Xlint:deprecation 
     59javac.compilerargs=-Xlint:unchecked -Xlint:cast -Xlint:dep-ann -Xlint:divzero -Xlint:empty -Xlint:finally -Xlint:overrides -Xlint:static -Xlint:try  -Xlint:deprecation
    4260javac.deprecation=true
    4361javac.processorpath=\
     
    4866    ${javac.classpath}:\
    4967    ${build.classes.dir}:\
    50     ${libs.junit.classpath}:\
    51     ${libs.junit_4.classpath}
     68    ${file.reference.junit-4.12.jar}:\
     69    ${file.reference.equalsverifier-1.7.6.jar}:\
     70    ${file.reference.jfcunit.jar}:\
     71    ${file.reference.hamcrest-core-1.3.jar}:\
     72    ${file.reference.MRJToolkitStubs-1.0.jar}:\
     73    ${file.reference.debug-1.0.jar}:\
     74    ${file.reference.fest-assert-1.0.jar}:\
     75    ${file.reference.fest-reflect-1.1.jar}:\
     76    ${file.reference.fest-swing-1.1.jar}:\
     77    ${file.reference.fest-util-1.0.jar}:\
     78    ${file.reference.jcip-annotations-1.0.jar}:\
     79    ${file.reference.commons-collections-3.2.jar}:\
     80    ${file.reference.commons-lang-2.3.jar}:\
     81    ${file.reference.commons-logging-1.1.jar}:\
     82    ${file.reference.ognl-2.6.9.jar}:\
     83    ${file.reference.unitils-core-3.4.2.jar}:\
     84    ${file.reference.findbugs.jar}
    5285javac.test.processorpath=\
    5386    ${javac.test.classpath}
     
    6396javadoc.version=false
    6497javadoc.windowtitle=
    65 jnlp.codebase.type=no.codebase
    66 jnlp.descriptor=application
    67 jnlp.enabled=false
    68 jnlp.mixed.code=default
    69 jnlp.offline-allowed=false
    70 jnlp.signed=false
    71 jnlp.signing=
    72 jnlp.signing.alias=
    73 jnlp.signing.keystore=
    7498main.class=org.openstreetmap.josm.gui.MainApplication
    7599manifest.file=manifest.mf
     
    84108    ${build.test.classes.dir}
    85109source.encoding=UTF-8
    86 src.core.dir=${file.reference.core}
    87110src.dir=${file.reference.core-src}
     111test.functional.dir=${file.reference.test-functional}
     112test.performance.dir=${file.reference.test-performance}
    88113test.unit.dir=${file.reference.test-unit}
  • trunk/netbeans/nbproject/project.xml

    r7937 r9765  
    77            <source-roots>
    88                <root id="src.dir"/>
    9                 <root id="src.core.dir"/>
    109            </source-roots>
    1110            <test-roots>
    12                 <root id="test.unit.dir"/>
     11                <root id="test.unit.dir" name="Unit Tests"/>
     12                <root id="test.functional.dir" name="Functional Tests"/>
     13                <root id="test.performance.dir" name="Performance Tests"/>
    1314            </test-roots>
    1415        </data>
Note: See TracChangeset for help on using the changeset viewer.