blob: e756ee111879bd3ccf7c6a15dca7fa319336871c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="org.netbeans.modules.jackpot30.cmdline" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.cmdline.</description>
<import file="nbproject/build-impl.xml"/>
<!--<import file="${suite.dir}/../findbugs-import.xml"/>-->
<target name="-download-joptsimple">
<mkdir dir="build" />
<get src="https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/3.2/jopt-simple-3.2.jar"
dest="build/jopt-simple-3.2.jar"
skipexisting="true"/>
</target>
<target name="-download-diffparser">
<mkdir dir="build" />
<get src="https://repo1.maven.org/maven2/io/reflectoring/diffparser/diffparser/1.4/diffparser-1.4.jar"
dest="build/diffparser-1.4.jar"
skipexisting="true"/>
</target>
<target name="-download-slf4j">
<mkdir dir="build" />
<get src="https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar"
dest="build/slf4j-api-1.7.25.jar"
skipexisting="true"/>
<get src="https://repo1.maven.org/maven2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar"
dest="build/slf4j-nop-1.7.25.jar"
skipexisting="true"/>
</target>
<target name="build-init" depends="harness.build-init,-download-joptsimple,-download-diffparser,-download-slf4j,-setup.bootclasspath" />
<target name="create-standalone-tool" depends="init,netbeans">
<mkdir dir="${build.classes.dir}/../jackpot" />
<chmod dir="${build.classes.dir}/../jackpot" perm="ugo+x" includes="jackpot"/>
<ant target="test" inheritall="false" inheritrefs="false">
<property name="test.config.standalone.includes" value="org/netbeans/modules/jackpot30/cmdline/CreateTool.class"/>
<property name="test.config" value="standalone"/>
<property name="test-unit-sys-prop.outputDir" location="${build.classes.dir}/../jackpot" />
</ant>
<jar update="true" destfile="${build.classes.dir}/../jackpot/jackpot.jar">
<zipfileset dir="scripts" includes="LICENSE-bin-tool.txt" fullpath="META-INF/LICENSE" />
<zipfileset dir="scripts" includes="NOTICE-bin-tool.txt" fullpath="META-INF/NOTICE" />
</jar>
<ant target="jar" inheritall="false" inheritrefs="false" dir="../ant">
<property name="var.nbplatform.default.netbeans.dest.dir" location="${nbplatform.default.netbeans.dest.dir}" />
</ant>
<copy file="scripts/jackpot" todir="${build.classes.dir}/../jackpot" />
<copy file="../ant/dist/jackpot-ant.jar" todir="${build.classes.dir}/../jackpot"/>
<copy file="scripts/LICENSE-bin-tool.txt" tofile="${build.classes.dir}/../jackpot/LICENSE" />
<copy file="scripts/NOTICE-bin-tool.txt" tofile="${build.classes.dir}/../jackpot/NOTICE" />
<copy file="../README.md" tofile="${build.classes.dir}/../jackpot/README.md" />
<zip destfile="${build.classes.dir}/../jackpot.zip">
<zipfileset file="${build.classes.dir}/../jackpot/jackpot" filemode="755" fullpath="jackpot/jackpot"/>
<zipfileset dir="${build.classes.dir}/../jackpot" prefix="jackpot">
<exclude name="hints" />
<exclude name="jackpot" />
</zipfileset>
</zip>
<zip destfile="${build.classes.dir}/../jackpot-sources.zip">
<zipfileset dir="src"/>
<zipfileset dir="${jackpot.root}" includes="LICENSE" fullpath="META-INF/LICENSE" />
<zipfileset dir="${jackpot.root}" includes="NOTICE" fullpath="META-INF/NOTICE" />
</zip>
<echo file="${build.classes.dir}/../README-javadoc.md">This jar does not have any API.</echo>
<zip destfile="${build.classes.dir}/../jackpot-javadoc.zip">
<zipfileset file="${build.classes.dir}/../README-javadoc.md"/>
<zipfileset dir="${jackpot.root}" includes="LICENSE" fullpath="META-INF/LICENSE" />
<zipfileset dir="${jackpot.root}" includes="NOTICE" fullpath="META-INF/NOTICE" />
</zip>
</target>
<target name="test-build" depends="projectized-common.test-build,-prepare-scripted-tests" />
<target name="-prepare-scripted-tests" depends="-check-scripted-tests" if="has.scripted.tests">
<mkdir dir="build/test/scripted" />
<copy todir="build/test/scripted">
<fileset dir="test/scripted"/>
</copy>
<copy todir="build/test/scripted">
<fileset dir="../test/scripted"/>
</copy>
<chmod dir="build/test/scripted" perm="u+x" includes="**/*" />
</target>
<target name="-check-scripted-tests" depends="build-init">
<condition property="has.scripted.tests" value="true">
<available file="test/scripted/config" />
</condition>
</target>
<target name="-setup.bootclasspath" depends="harness.build-init">
<property name="test.nbjdk.home" location="${nbjdk.home}" />
<!--<condition property="test.bootclasspath.prepend.args"-->
<condition property="test.run.args"
value="--limit-modules=java.base,java.xml,java.prefs,java.management,java.logging,java.desktop,java.instrument,java.naming,jdk.zipfs --add-opens=java.base/java.net=ALL-UNNAMED"
else="-Xbootclasspath/p:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17-api.jar:${nbplatform.active.dir}/java/modules/ext/nb-javac-jdk-17.jar">
<or>
<available classpath="${test.nbjdk.home}/lib/ct.sym" resource="B/java.base/java/lang/String.sig" />
<available classpath="${test.nbjdk.home}/lib/ct.sym" resource="B/system-modules" />
</or>
</condition>
</target>
</project>