java/nekurak.net-ejb/nbproject/build-impl.xml
changeset 145 0efefbf5f8b6
parent 108 f74a9fc683da
child 149 8238cdb4113a
     1.1 --- a/java/nekurak.net-ejb/nbproject/build-impl.xml	Tue Apr 27 17:13:23 2010 +0200
     1.2 +++ b/java/nekurak.net-ejb/nbproject/build-impl.xml	Sun Jun 20 14:46:47 2010 +0200
     1.3 @@ -140,6 +140,20 @@
     1.4          <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
     1.5          <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
     1.6          <fail unless="dist.jar">Must set dist.jar</fail>
     1.7 +        <condition property="missing.j2ee.server.home">
     1.8 +            <and>
     1.9 +                <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
    1.10 +                <not>
    1.11 +                    <isset property="j2ee.server.home"/>
    1.12 +                </not>
    1.13 +            </and>
    1.14 +        </condition>
    1.15 +        <fail if="missing.j2ee.server.home">
    1.16 +The Java EE server classpath is not correctly set up - server home directory is missing.
    1.17 +Either open the project in the IDE and assign the server or setup the server classpath manually.
    1.18 +For example like this:
    1.19 +   ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;
    1.20 +                </fail>
    1.21          <fail unless="j2ee.platform.classpath">
    1.22  The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
    1.23  Either open the project in the IDE and assign the server or setup the server classpath manually.
    1.24 @@ -157,11 +171,52 @@
    1.25              </sequential>
    1.26          </macrodef>
    1.27      </target>
    1.28 -    <target name="-init-macrodef-javac">
    1.29 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
    1.30          <macrodef name="javac" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
    1.31              <attribute default="${src.dir}" name="srcdir"/>
    1.32              <attribute default="${build.classes.dir}" name="destdir"/>
    1.33              <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
    1.34 +            <attribute default="${javac.processorpath}" name="processorpath"/>
    1.35 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
    1.36 +            <attribute default="${includes}" name="includes"/>
    1.37 +            <attribute default="${excludes}" name="excludes"/>
    1.38 +            <attribute default="${javac.debug}" name="debug"/>
    1.39 +            <attribute default="${empty.dir}" name="gensrcdir"/>
    1.40 +            <element name="customize" optional="true"/>
    1.41 +            <sequential>
    1.42 +                <property name="javac.compilerargs" value=""/>
    1.43 +                <property location="${build.dir}/empty" name="empty.dir"/>
    1.44 +                <mkdir dir="${empty.dir}"/>
    1.45 +                <mkdir dir="@{apgeneratedsrcdir}"/>
    1.46 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
    1.47 +                    <src>
    1.48 +                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
    1.49 +                            <include name="*"/>
    1.50 +                        </dirset>
    1.51 +                    </src>
    1.52 +                    <classpath>
    1.53 +                        <path path="@{classpath}"/>
    1.54 +                    </classpath>
    1.55 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
    1.56 +                    <compilerarg line="${javac.compilerargs}"/>
    1.57 +                    <compilerarg value="-processorpath"/>
    1.58 +                    <compilerarg path="@{processorpath}:${empty.dir}"/>
    1.59 +                    <compilerarg line="${ap.processors.internal}"/>
    1.60 +                    <compilerarg value="-s"/>
    1.61 +                    <compilerarg path="@{apgeneratedsrcdir}"/>
    1.62 +                    <compilerarg line="${ap.proc.none.internal}"/>
    1.63 +                    <customize/>
    1.64 +                </javac>
    1.65 +            </sequential>
    1.66 +        </macrodef>
    1.67 +    </target>
    1.68 +    <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
    1.69 +        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
    1.70 +            <attribute default="${src.dir}" name="srcdir"/>
    1.71 +            <attribute default="${build.classes.dir}" name="destdir"/>
    1.72 +            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
    1.73 +            <attribute default="${javac.processorpath}" name="processorpath"/>
    1.74 +            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
    1.75              <attribute default="${includes}" name="includes"/>
    1.76              <attribute default="${excludes}" name="excludes"/>
    1.77              <attribute default="${javac.debug}" name="debug"/>
    1.78 @@ -187,6 +242,35 @@
    1.79              </sequential>
    1.80          </macrodef>
    1.81      </target>
    1.82 +    <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
    1.83 +        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
    1.84 +            <attribute default="${src.dir}" name="srcdir"/>
    1.85 +            <attribute default="${build.classes.dir}" name="destdir"/>
    1.86 +            <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
    1.87 +            <sequential>
    1.88 +                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
    1.89 +                    <classpath>
    1.90 +                        <path path="@{classpath}"/>
    1.91 +                    </classpath>
    1.92 +                </depend>
    1.93 +            </sequential>
    1.94 +        </macrodef>
    1.95 +        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
    1.96 +            <attribute default="${build.classes.dir}" name="destdir"/>
    1.97 +            <sequential>
    1.98 +                <fail unless="javac.includes">Must set javac.includes</fail>
    1.99 +                <pathconvert pathsep="," property="javac.includes.binary">
   1.100 +                    <path>
   1.101 +                        <filelist dir="@{destdir}" files="${javac.includes}"/>
   1.102 +                    </path>
   1.103 +                    <globmapper from="*.java" to="*.class"/>
   1.104 +                </pathconvert>
   1.105 +                <delete>
   1.106 +                    <files includes="${javac.includes.binary}"/>
   1.107 +                </delete>
   1.108 +            </sequential>
   1.109 +        </macrodef>
   1.110 +    </target>
   1.111      <target name="-init-macrodef-junit">
   1.112          <macrodef name="junit" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
   1.113              <attribute default="${includes}" name="includes"/>
   1.114 @@ -294,6 +378,7 @@
   1.115                  <java classname="@{classname}" fork="true">
   1.116                      <jvmarg line="${debug-args-line}"/>
   1.117                      <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   1.118 +                    <jvmarg line="${runmain.jvmargs}"/>
   1.119                      <classpath>
   1.120                          <path path="@{classpath}"/>
   1.121                      </classpath>
   1.122 @@ -316,7 +401,30 @@
   1.123                  </fail>
   1.124          <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
   1.125      </target>
   1.126 -    <target depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-taskdefs" name="init"/>
   1.127 +    <target name="-init-ap-cmdline-properties">
   1.128 +        <property name="annotation.processing.enabled" value="true"/>
   1.129 +        <property name="annotation.processing.processors.list" value=""/>
   1.130 +        <property name="annotation.processing.run.all.processors" value="true"/>
   1.131 +        <property name="javac.processorpath" value="${javac.classpath}"/>
   1.132 +        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
   1.133 +        <condition property="ap.supported.internal" value="true">
   1.134 +            <not>
   1.135 +                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
   1.136 +            </not>
   1.137 +        </condition>
   1.138 +    </target>
   1.139 +    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
   1.140 +        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
   1.141 +            <isfalse value="${annotation.processing.run.all.processors}"/>
   1.142 +        </condition>
   1.143 +        <condition else="" property="ap.proc.none.internal" value="-proc:none">
   1.144 +            <isfalse value="${annotation.processing.enabled}"/>
   1.145 +        </condition>
   1.146 +    </target>
   1.147 +    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
   1.148 +        <property name="ap.cmd.line.internal" value=""/>
   1.149 +    </target>
   1.150 +    <target depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
   1.151      <!--
   1.152                  COMPILATION SECTION
   1.153              -->
   1.154 @@ -527,7 +635,7 @@
   1.155      <!--
   1.156                  JAVADOC SECTION
   1.157              -->
   1.158 -    <target depends="init" name="javadoc-build">
   1.159 +    <target depends="init" if="have.sources" name="javadoc-build">
   1.160          <mkdir dir="${dist.javadoc.dir}"/>
   1.161          <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}">
   1.162              <classpath>