1.1 --- a/java/nekurak.net-web/nbproject/build-impl.xml Tue Mar 23 15:09:19 2010 +0100
1.2 +++ b/java/nekurak.net-web/nbproject/build-impl.xml Sat Jun 19 14:00:11 2010 +0200
1.3 @@ -199,6 +199,20 @@
1.4 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
1.5 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
1.6 <fail unless="dist.war">Must set dist.war</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=<app_server_installation_directory>
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 @@ -216,11 +230,51 @@
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/web-project/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 location="${build.dir}/empty" name="empty.dir"/>
1.43 + <mkdir dir="${empty.dir}"/>
1.44 + <mkdir dir="@{apgeneratedsrcdir}"/>
1.45 + <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.46 + <src>
1.47 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
1.48 + <include name="*"/>
1.49 + </dirset>
1.50 + </src>
1.51 + <classpath>
1.52 + <path path="@{classpath}"/>
1.53 + </classpath>
1.54 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
1.55 + <compilerarg line="${javac.compilerargs}"/>
1.56 + <compilerarg value="-processorpath"/>
1.57 + <compilerarg path="@{processorpath}:${empty.dir}"/>
1.58 + <compilerarg line="${ap.processors.internal}"/>
1.59 + <compilerarg value="-s"/>
1.60 + <compilerarg path="@{apgeneratedsrcdir}"/>
1.61 + <compilerarg line="${ap.proc.none.internal}"/>
1.62 + <customize/>
1.63 + </javac>
1.64 + </sequential>
1.65 + </macrodef>
1.66 + </target>
1.67 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
1.68 + <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
1.69 + <attribute default="${src.dir}" name="srcdir"/>
1.70 + <attribute default="${build.classes.dir}" name="destdir"/>
1.71 + <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
1.72 + <attribute default="${javac.processorpath}" name="processorpath"/>
1.73 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
1.74 <attribute default="${includes}" name="includes"/>
1.75 <attribute default="${excludes}" name="excludes"/>
1.76 <attribute default="${javac.debug}" name="debug"/>
1.77 @@ -245,6 +299,35 @@
1.78 </sequential>
1.79 </macrodef>
1.80 </target>
1.81 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
1.82 + <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
1.83 + <attribute default="${src.dir}" name="srcdir"/>
1.84 + <attribute default="${build.classes.dir}" name="destdir"/>
1.85 + <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
1.86 + <sequential>
1.87 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
1.88 + <classpath>
1.89 + <path path="@{classpath}"/>
1.90 + </classpath>
1.91 + </depend>
1.92 + </sequential>
1.93 + </macrodef>
1.94 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
1.95 + <attribute default="${build.classes.dir}" name="destdir"/>
1.96 + <sequential>
1.97 + <fail unless="javac.includes">Must set javac.includes</fail>
1.98 + <pathconvert pathsep="," property="javac.includes.binary">
1.99 + <path>
1.100 + <filelist dir="@{destdir}" files="${javac.includes}"/>
1.101 + </path>
1.102 + <globmapper from="*.java" to="*.class"/>
1.103 + </pathconvert>
1.104 + <delete>
1.105 + <files includes="${javac.includes.binary}"/>
1.106 + </delete>
1.107 + </sequential>
1.108 + </macrodef>
1.109 + </target>
1.110 <target name="-init-macrodef-junit">
1.111 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
1.112 <attribute default="${includes}" name="includes"/>
1.113 @@ -387,7 +470,30 @@
1.114 </fail>
1.115 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
1.116 </target>
1.117 - <target depends="-pre-init,-init-private,-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-nbjsdebug,-init-macrodef-debug,-init-taskdefs" name="init"/>
1.118 + <target name="-init-ap-cmdline-properties">
1.119 + <property name="annotation.processing.enabled" value="true"/>
1.120 + <property name="annotation.processing.processors.list" value=""/>
1.121 + <property name="annotation.processing.run.all.processors" value="true"/>
1.122 + <property name="javac.processorpath" value="${javac.classpath}"/>
1.123 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
1.124 + <condition property="ap.supported.internal" value="true">
1.125 + <not>
1.126 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
1.127 + </not>
1.128 + </condition>
1.129 + </target>
1.130 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
1.131 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
1.132 + <isfalse value="${annotation.processing.run.all.processors}"/>
1.133 + </condition>
1.134 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
1.135 + <isfalse value="${annotation.processing.enabled}"/>
1.136 + </condition>
1.137 + </target>
1.138 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
1.139 + <property name="ap.cmd.line.internal" value=""/>
1.140 + </target>
1.141 + <target depends="-pre-init,-init-private,-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-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
1.142 <!--
1.143 COMPILATION SECTION
1.144 -->
1.145 @@ -467,10 +573,10 @@
1.146 <arg value="-compilerSourceVM ${javac.source}"/>
1.147 <arg value="-compilerTargetVM ${javac.target}"/>
1.148 <arg value="-javaEncoding ${source.encoding}"/>
1.149 - <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
1.150 + <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
1.151 </java>
1.152 <mkdir dir="${build.generated.dir}/classes"/>
1.153 - <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
1.154 + <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
1.155 </target>
1.156 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
1.157 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
1.158 @@ -486,10 +592,10 @@
1.159 <arg value="-compilerSourceVM ${javac.source}"/>
1.160 <arg value="-compilerTargetVM ${javac.target}"/>
1.161 <arg value="-javaEncoding ${source.encoding}"/>
1.162 - <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
1.163 + <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
1.164 </java>
1.165 <mkdir dir="${build.generated.dir}/classes"/>
1.166 - <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
1.167 + <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
1.168 <customize>
1.169 <patternset includes="${javac.jsp.includes}"/>
1.170 </customize>
1.171 @@ -726,7 +832,7 @@
1.172 <!--
1.173 JAVADOC SECTION
1.174 -->
1.175 - <target depends="init" name="javadoc-build">
1.176 + <target depends="init" if="have.sources" name="javadoc-build">
1.177 <mkdir dir="${dist.javadoc.dir}"/>
1.178 <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.179 <classpath>