java/nekurak.net-ejb/nbproject/build-impl.xml
changeset 186 b0f7d9ab4a07
parent 151 d7b5099bf65e
child 188 74d06a8a4948
     1.1 --- a/java/nekurak.net-ejb/nbproject/build-impl.xml	Sun Aug 15 22:20:10 2010 +0200
     1.2 +++ b/java/nekurak.net-ejb/nbproject/build-impl.xml	Fri Jul 15 22:25:39 2011 +0200
     1.3 @@ -118,8 +118,23 @@
     1.4          <property name="excludes" value=""/>
     1.5          <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
     1.6          <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
     1.7 -            <length length="0" string="${endorsed.classpath}" when="greater"/>
     1.8 +            <and>
     1.9 +                <isset property="endorsed.classpath"/>
    1.10 +                <length length="0" string="${endorsed.classpath}" when="greater"/>
    1.11 +            </and>
    1.12          </condition>
    1.13 +        <condition property="is.server.weblogic" value="true">
    1.14 +            <equals arg1="${j2ee.server.type}" arg2="WebLogic9"/>
    1.15 +        </condition>
    1.16 +        <condition else="false" property="jdkBug6558476">
    1.17 +            <and>
    1.18 +                <matches pattern="1\.[56]" string="${java.specification.version}"/>
    1.19 +                <not>
    1.20 +                    <os family="unix"/>
    1.21 +                </not>
    1.22 +            </and>
    1.23 +        </condition>
    1.24 +        <property name="javac.fork" value="${jdkBug6558476}"/>
    1.25      </target>
    1.26      <target depends="init" name="-init-cos" unless="deploy.on.save">
    1.27          <condition property="deploy.on.save" value="true">
    1.28 @@ -188,7 +203,7 @@
    1.29                  <property location="${build.dir}/empty" name="empty.dir"/>
    1.30                  <mkdir dir="${empty.dir}"/>
    1.31                  <mkdir dir="@{apgeneratedsrcdir}"/>
    1.32 -                <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.33 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
    1.34                      <src>
    1.35                          <dirset dir="@{gensrcdir}" erroronmissingdir="false">
    1.36                              <include name="*"/>
    1.37 @@ -259,15 +274,18 @@
    1.38              <attribute default="${build.classes.dir}" name="destdir"/>
    1.39              <sequential>
    1.40                  <fail unless="javac.includes">Must set javac.includes</fail>
    1.41 -                <pathconvert pathsep="," property="javac.includes.binary">
    1.42 +                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
    1.43                      <path>
    1.44                          <filelist dir="@{destdir}" files="${javac.includes}"/>
    1.45                      </path>
    1.46                      <globmapper from="*.java" to="*.class"/>
    1.47                  </pathconvert>
    1.48 +                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
    1.49 +                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
    1.50                  <delete>
    1.51 -                    <files includes="${javac.includes.binary}"/>
    1.52 +                    <files includesfile="${javac.includesfile.binary}"/>
    1.53                  </delete>
    1.54 +                <delete file="${javac.includesfile.binary}"/>
    1.55              </sequential>
    1.56          </macrodef>
    1.57      </target>
    1.58 @@ -295,6 +313,7 @@
    1.59                      <formatter type="brief" usefile="false"/>
    1.60                      <formatter type="xml"/>
    1.61                      <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
    1.62 +                    <jvmarg value="-ea"/>
    1.63                      <jvmarg line="${runmain.jvmargs}"/>
    1.64                  </junit>
    1.65              </sequential>
    1.66 @@ -424,6 +443,19 @@
    1.67      <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
    1.68          <property name="ap.cmd.line.internal" value=""/>
    1.69      </target>
    1.70 +    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
    1.71 +    <target name="-profile-pre-init">
    1.72 +        <!-- Empty placeholder for easier customization. -->
    1.73 +        <!-- You can override this target in the ../build.xml file. -->
    1.74 +    </target>
    1.75 +    <target name="-profile-post-init">
    1.76 +        <!-- Empty placeholder for easier customization. -->
    1.77 +        <!-- You can override this target in the ../build.xml file. -->
    1.78 +    </target>
    1.79 +    <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
    1.80 +        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
    1.81 +        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
    1.82 +    </target>
    1.83      <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.84      <!--
    1.85                  COMPILATION SECTION
    1.86 @@ -453,10 +485,16 @@
    1.87          <!-- Empty placeholder for easier customization. -->
    1.88          <!-- You can override this target in the ../build.xml file. -->
    1.89      </target>
    1.90 -    <target depends="compile" name="library-inclusion-in-archive">
    1.91 -        <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${build.classes.dir}"/>
    1.92 -        <copyfiles files="${reference.SuperDAO.jar}" todir="${build.classes.dir}"/>
    1.93 -        <copyfiles files="${libs.Smack-XMPP.classpath}" todir="${build.classes.dir}"/>
    1.94 +    <target depends="compile" if="is.server.weblogic" name="library-inclusion-in-archive">
    1.95 +        <basename file="${reference.nekurak_net-lib.jar}" property="manifest.reference.nekurak_net-lib.jar"/>
    1.96 +        <basename file="${reference.SuperDAO.jar}" property="manifest.reference.SuperDAO.jar"/>
    1.97 +        <basename file="${libs.Smack-XMPP.classpath}" property="manifest.libs.Smack-XMPP.classpath"/>
    1.98 +        <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
    1.99 +            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 "/>
   1.100 +            <attribute name="jar-1-Extension-Name" value="${manifest.reference.nekurak_net-lib.jar}"/>
   1.101 +            <attribute name="jar-2-Extension-Name" value="${manifest.reference.SuperDAO.jar}"/>
   1.102 +            <attribute name="jar-3-Extension-Name" value="${manifest.libs.Smack-XMPP.classpath}"/>
   1.103 +        </manifest>
   1.104      </target>
   1.105      <target depends="compile" name="library-inclusion-in-manifest">
   1.106          <copyfiles files="${reference.nekurak_net-lib.jar}" todir="${dist.ear.dir}/lib"/>
   1.107 @@ -635,6 +673,35 @@
   1.108      </target>
   1.109      <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
   1.110      <!--
   1.111 +            =================
   1.112 +            PROFILING SECTION
   1.113 +            =================
   1.114 +            -->
   1.115 +    <target description="Profile a J2EE project in the IDE." name="profile">
   1.116 +        <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
   1.117 +            <isset property="profiler.info.jvmargs.extra"/>
   1.118 +        </condition>
   1.119 +        <antcall target="${profiler.startserver.target}"/>
   1.120 +        <antcall target="run"/>
   1.121 +        <antcall target="start-loadgen"/>
   1.122 +    </target>
   1.123 +    <target name="start-profiled-server">
   1.124 +        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
   1.125 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   1.126 +            <jvmarg value="${profiler.j2ee.agentID}"/>
   1.127 +        </nbstartprofiledserver>
   1.128 +    </target>
   1.129 +    <target name="start-profiled-server-extraargs">
   1.130 +        <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
   1.131 +            <jvmarg value="${profiler.info.jvmargs.extra}"/>
   1.132 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   1.133 +            <jvmarg value="${profiler.j2ee.agentID}"/>
   1.134 +        </nbstartprofiledserver>
   1.135 +    </target>
   1.136 +    <target if="profiler.loadgen.path" name="start-loadgen">
   1.137 +        <loadgenstart path="${profiler.loadgen.path}"/>
   1.138 +    </target>
   1.139 +    <!--
   1.140                  JAVADOC SECTION
   1.141              -->
   1.142      <target depends="init" if="have.sources" name="javadoc-build">
   1.143 @@ -750,6 +817,35 @@
   1.144      </target>
   1.145      <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
   1.146      <!--
   1.147 +        =========================
   1.148 +        TESTS PROFILING  SECTION
   1.149 +        =========================
   1.150 +        -->
   1.151 +    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
   1.152 +        <nbprofiledirect>
   1.153 +            <classpath>
   1.154 +                <path path="${run.test.classpath}"/>
   1.155 +                <path path="${j2ee.platform.classpath}"/>
   1.156 +            </classpath>
   1.157 +        </nbprofiledirect>
   1.158 +        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
   1.159 +            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
   1.160 +            <jvmarg value="${profiler.info.jvmargs.agent}"/>
   1.161 +            <jvmarg line="${profiler.info.jvmargs}"/>
   1.162 +            <test name="${profile.class}"/>
   1.163 +            <classpath>
   1.164 +                <path path="${run.test.classpath}"/>
   1.165 +                <path path="${j2ee.platform.classpath}"/>
   1.166 +            </classpath>
   1.167 +            <syspropertyset>
   1.168 +                <propertyref prefix="test-sys-prop."/>
   1.169 +                <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.170 +            </syspropertyset>
   1.171 +            <formatter type="brief" usefile="false"/>
   1.172 +            <formatter type="xml"/>
   1.173 +        </junit>
   1.174 +    </target>
   1.175 +    <!--
   1.176                  CLEANUP SECTION
   1.177              -->
   1.178      <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">