Show
Ignore:
Timestamp:
11/29/11 17:16:47 (12 years ago)
Author:
František Kučera <franta-hg@…>
Branch:
default
Message:

drobnosti: lgoování, formátování, netbeans…

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • java/SuperPostak/nbproject/build-impl.xml

    r7 r13  
    5757    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> 
    5858        <available file="${manifest.file}" property="manifest.available"/> 
    59         <available file="${application.splash}" property="splashscreen.available"/> 
     59        <condition property="splashscreen.available"> 
     60            <and> 
     61                <not> 
     62                    <equals arg1="${application.splash}" arg2="" trim="true"/> 
     63                </not> 
     64                <available file="${application.splash}"/> 
     65            </and> 
     66        </condition> 
    6067        <condition property="main.class.available"> 
    6168            <and> 
     
    7279            </and> 
    7380        </condition> 
     81        <condition property="do.archive"> 
     82            <not> 
     83                <istrue value="${jar.archive.disabled}"/> 
     84            </not> 
     85        </condition> 
    7486        <condition property="do.mkdist"> 
    7587            <and> 
     88                <isset property="do.archive"/> 
    7689                <isset property="libs.CopyLibs.classpath"/> 
    7790                <not> 
     
    8699            </and> 
    87100        </condition> 
    88         <condition property="manifest.available+main.class+mkdist.available+splashscreen.available"> 
    89             <and> 
    90                 <istrue value="${manifest.available+main.class+mkdist.available}"/> 
    91                 <istrue value="${splashscreen.available}"/> 
    92             </and> 
    93         </condition> 
    94         <condition property="do.archive"> 
    95             <not> 
    96                 <istrue value="${jar.archive.disabled}"/> 
    97             </not> 
    98         </condition> 
    99101        <condition property="do.archive+manifest.available"> 
    100102            <and> 
     
    103105            </and> 
    104106        </condition> 
     107        <condition property="do.archive+main.class.available"> 
     108            <and> 
     109                <isset property="main.class.available"/> 
     110                <istrue value="${do.archive}"/> 
     111            </and> 
     112        </condition> 
     113        <condition property="do.archive+splashscreen.available"> 
     114            <and> 
     115                <isset property="splashscreen.available"/> 
     116                <istrue value="${do.archive}"/> 
     117            </and> 
     118        </condition> 
    105119        <condition property="do.archive+manifest.available+main.class"> 
    106120            <and> 
     
    109123            </and> 
    110124        </condition> 
    111         <condition property="do.archive+manifest.available+main.class+mkdist.available"> 
    112             <and> 
    113                 <istrue value="${manifest.available+main.class+mkdist.available}"/> 
    114                 <istrue value="${do.archive}"/> 
    115             </and> 
    116         </condition> 
    117         <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available"> 
    118             <and> 
    119                 <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/> 
    120                 <istrue value="${do.archive}"/> 
    121             </and> 
     125        <condition property="manifest.available-mkdist.available"> 
     126            <or> 
     127                <istrue value="${manifest.available}"/> 
     128                <isset property="do.mkdist"/> 
     129            </or> 
     130        </condition> 
     131        <condition property="manifest.available+main.class-mkdist.available"> 
     132            <or> 
     133                <istrue value="${manifest.available+main.class}"/> 
     134                <isset property="do.mkdist"/> 
     135            </or> 
    122136        </condition> 
    123137        <condition property="have.tests"> 
     
    175189            <length length="0" string="${endorsed.classpath}" when="greater"/> 
    176190        </condition> 
    177         <property name="javac.fork" value="false"/> 
     191        <condition else="false" property="jdkBug6558476"> 
     192            <and> 
     193                <matches pattern="1\.[56]" string="${java.specification.version}"/> 
     194                <not> 
     195                    <os family="unix"/> 
     196                </not> 
     197            </and> 
     198        </condition> 
     199        <property name="javac.fork" value="${jdkBug6558476}"/> 
    178200        <property name="jar.index" value="false"/> 
     201        <property name="jar.index.metainf" value="${jar.index}"/> 
    179202        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> 
    180203    </target> 
     
    304327                    <files includesfile="${javac.includesfile.binary}"/> 
    305328                </delete> 
    306                 <delete file="${javac.includesfile.binary}"/> 
     329                <delete> 
     330                    <fileset file="${javac.includesfile.binary}"/> 
     331                </delete> 
    307332            </sequential> 
    308333        </macrodef> 
     
    314339            <attribute default="**" name="testincludes"/> 
    315340            <sequential> 
    316                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> 
     341                <property name="junit.forkmode" value="perTest"/> 
     342                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> 
    317343                    <batchtest todir="${build.test.results.dir}"> 
    318344                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 
     
    330356                    <formatter type="xml"/> 
    331357                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 
     358                    <jvmarg value="-ea"/> 
    332359                    <jvmarg line="${run.jvmargs}"/> 
    333360                </junit> 
    334361            </sequential> 
    335362        </macrodef> 
     363    </target> 
     364    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/> 
     365    <target name="-profile-pre-init"> 
     366        <!-- Empty placeholder for easier customization. --> 
     367        <!-- You can override this target in the ../build.xml file. --> 
     368    </target> 
     369    <target name="-profile-post-init"> 
     370        <!-- Empty placeholder for easier customization. --> 
     371        <!-- You can override this target in the ../build.xml file. --> 
     372    </target> 
     373    <target name="-profile-init-macrodef-profile"> 
     374        <macrodef name="resolve"> 
     375            <attribute name="name"/> 
     376            <attribute name="value"/> 
     377            <sequential> 
     378                <property name="@{name}" value="${env.@{value}}"/> 
     379            </sequential> 
     380        </macrodef> 
     381        <macrodef name="profile"> 
     382            <attribute default="${main.class}" name="classname"/> 
     383            <element name="customize" optional="true"/> 
     384            <sequential> 
     385                <property environment="env"/> 
     386                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> 
     387                <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> 
     388                    <jvmarg value="${profiler.info.jvmargs.agent}"/> 
     389                    <jvmarg line="${profiler.info.jvmargs}"/> 
     390                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> 
     391                    <arg line="${application.args}"/> 
     392                    <classpath> 
     393                        <path path="${run.classpath}"/> 
     394                    </classpath> 
     395                    <syspropertyset> 
     396                        <propertyref prefix="run-sys-prop."/> 
     397                        <mapper from="run-sys-prop.*" to="*" type="glob"/> 
     398                    </syspropertyset> 
     399                    <customize/> 
     400                </java> 
     401            </sequential> 
     402        </macrodef> 
     403    </target> 
     404    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> 
     405        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> 
     406        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> 
    336407    </target> 
    337408    <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> 
     
    429500    <target name="-init-macrodef-copylibs"> 
    430501        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> 
     502            <attribute default="${manifest.file}" name="manifest"/> 
    431503            <element name="customize" optional="true"/> 
    432504            <sequential> 
     
    444516                </pathconvert> 
    445517                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> 
    446                 <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> 
     518                <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> 
    447519                    <fileset dir="${build.classes.dir}"/> 
    448520                    <manifest> 
     
    587659        <!-- You can override this target in the ../build.xml file. --> 
    588660    </target> 
    589     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available"> 
     661    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> 
    590662        <j2seproject1:jar/> 
    591663    </target> 
    592     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> 
     664    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> 
    593665        <j2seproject1:jar manifest="${manifest.file}"/> 
    594666    </target> 
     
    599671            </j2seproject1:manifest> 
    600672        </j2seproject1:jar> 
    601         <echo>To run this application from the command line without Ant, try:</echo> 
     673        <echo level="info">To run this application from the command line without Ant, try:</echo> 
    602674        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> 
    603675        <property location="${dist.jar}" name="dist.jar.resolved"/> 
     
    606678            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> 
    607679        </pathconvert> 
    608         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
    609     </target> 
    610     <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen"> 
     680        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> 
     681    </target> 
     682    <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> 
     683        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
     684        <touch file="${tmp.manifest.file}" verbose="false"/> 
     685    </target> 
     686    <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> 
     687        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> 
     688        <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> 
     689    </target> 
     690    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> 
     691        <manifest file="${tmp.manifest.file}" mode="update"> 
     692            <attribute name="Main-Class" value="${main.class}"/> 
     693        </manifest> 
     694    </target> 
     695    <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> 
    611696        <basename file="${application.splash}" property="splashscreen.basename"/> 
    612697        <mkdir dir="${build.classes.dir}/META-INF"/> 
    613698        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> 
    614         <j2seproject3:copylibs> 
    615             <customize> 
    616                 <attribute name="Main-Class" value="${main.class}"/> 
    617                 <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> 
    618             </customize> 
    619         </j2seproject3:copylibs> 
    620         <echo>To run this application from the command line without Ant, try:</echo> 
     699        <manifest file="${tmp.manifest.file}" mode="update"> 
     700            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> 
     701        </manifest> 
     702    </target> 
     703    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> 
     704        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> 
     705        <echo level="info">To run this application from the command line without Ant, try:</echo> 
    621706        <property location="${dist.jar}" name="dist.jar.resolved"/> 
    622         <echo>java -jar "${dist.jar.resolved}"</echo> 
    623     </target> 
    624     <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available"> 
    625         <j2seproject3:copylibs> 
    626             <customize> 
    627                 <attribute name="Main-Class" value="${main.class}"/> 
    628             </customize> 
    629         </j2seproject3:copylibs> 
    630         <echo>To run this application from the command line without Ant, try:</echo> 
    631         <property location="${dist.jar}" name="dist.jar.resolved"/> 
    632         <echo>java -jar "${dist.jar.resolved}"</echo> 
    633     </target> 
     707        <echo level="info">java -jar "${dist.jar.resolved}"</echo> 
     708    </target> 
     709    <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> 
     710        <delete> 
     711            <fileset file="${tmp.manifest.file}"/> 
     712        </delete> 
     713    </target> 
     714    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> 
    634715    <target name="-post-jar"> 
    635716        <!-- Empty placeholder for easier customization. --> 
    636717        <!-- You can override this target in the ../build.xml file. --> 
    637718    </target> 
    638     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/> 
     719    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/> 
    639720    <!-- 
    640721                ================= 
     
    702783    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> 
    703784    <!-- 
     785                ================= 
     786                PROFILING SECTION 
     787                ================= 
     788            --> 
     789    <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> 
     790        <nbprofiledirect> 
     791            <classpath> 
     792                <path path="${run.classpath}"/> 
     793            </classpath> 
     794        </nbprofiledirect> 
     795        <profile/> 
     796    </target> 
     797    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> 
     798        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> 
     799        <nbprofiledirect> 
     800            <classpath> 
     801                <path path="${run.classpath}"/> 
     802            </classpath> 
     803        </nbprofiledirect> 
     804        <profile classname="${profile.class}"/> 
     805    </target> 
     806    <!-- 
     807                ========================= 
     808                APPLET PROFILING  SECTION 
     809                ========================= 
     810            --> 
     811    <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> 
     812        <nbprofiledirect> 
     813            <classpath> 
     814                <path path="${run.classpath}"/> 
     815            </classpath> 
     816        </nbprofiledirect> 
     817        <profile classname="sun.applet.AppletViewer"> 
     818            <customize> 
     819                <arg value="${applet.url}"/> 
     820            </customize> 
     821        </profile> 
     822    </target> 
     823    <!-- 
     824                ========================= 
     825                TESTS PROFILING  SECTION 
     826                ========================= 
     827            --> 
     828    <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> 
     829        <nbprofiledirect> 
     830            <classpath> 
     831                <path path="${run.test.classpath}"/> 
     832            </classpath> 
     833        </nbprofiledirect> 
     834        <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> 
     835            <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> 
     836            <jvmarg value="${profiler.info.jvmargs.agent}"/> 
     837            <jvmarg line="${profiler.info.jvmargs}"/> 
     838            <test name="${profile.class}"/> 
     839            <classpath> 
     840                <path path="${run.test.classpath}"/> 
     841            </classpath> 
     842            <syspropertyset> 
     843                <propertyref prefix="test-sys-prop."/> 
     844                <mapper from="test-sys-prop.*" to="*" type="glob"/> 
     845            </syspropertyset> 
     846            <formatter type="brief" usefile="false"/> 
     847            <formatter type="xml"/> 
     848        </junit> 
     849    </target> 
     850    <!-- 
    704851                =============== 
    705852                JAVADOC SECTION 
     
    712859                <path path="${javac.classpath}"/> 
    713860            </classpath> 
    714             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> 
     861            <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> 
    715862                <filename name="**/*.java"/> 
    716863            </fileset> 
    717864            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> 
    718865                <include name="**/*.java"/> 
     866                <exclude name="*.java"/> 
    719867            </fileset> 
    720868        </javadoc> 
     
    747895        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> 
    748896    </target> 
    749     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> 
     897    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> 
    750898        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> 
    751899        <copy todir="${build.test.classes.dir}"> 
     
    762910        <!-- You can override this target in the ../build.xml file. --> 
    763911    </target> 
    764     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> 
     912    <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> 
    765913        <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> 
    766914        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>