File testng-build.xml of Package testng

<?xml version="1.0" encoding="UTF-8"?>

<project name="testng" default="package" basedir=".">

  <!-- ====================================================================== -->
  <!-- Build environment properties                                           -->
  <!-- ====================================================================== -->

  <property file="build.properties"/>

  <property name="project.groupId" value="org.testng"/>
  <property name="project.artifactId" value="testng"/>
  <property name="project.name" value="TestNG"/>
  <property name="project.version" value="7.10.1"/>
  <property name="project.description" value="${project.name} is a testing framework."/>

  <property name="compiler.release" value="8"/>
  <property name="compiler.source" value="1.${compiler.release}"/>
  <property name="compiler.target" value="${compiler.source}"/>

  <property name="build.finalName" value="${project.artifactId}-${project.version}"/>
  <property name="build.dir" value="target"/>
  <property name="build.outputDir" value="${build.dir}/classes"/>
  <property name="build.srcDir" value="testng/src/main/java"/>
  <property name="build.srcDirCoreApi" value="testng-core-api/src/main/java"/>
  <property name="build.srcDirReflectionUtils" value="testng-reflection-utils/src/main/java"/>
  <property name="build.srcDirAsserts" value="testng-asserts/src/main/java"/>
  <property name="build.srcDirTestOsgi" value="testng-test-osgi/src/main/java"/>
  <property name="build.srcDirTestKit" value="testng-test-kit/src/main/java"/>
  <property name="build.srcDirRunnerApi" value="testng-runner-api/src/main/java"/>
  <property name="build.srcDirCollections" value="testng-collections/src/main/java"/>
  <property name="build.srcDirCore" value="testng-core/src/main/java"/>
  <property name="build.resourceDir" value="testng/src/main/resources"/>
  <property name="build.resourceDirCoreApi" value="testng-core-api/src/main/resources"/>
  <property name="build.resourceDirReflectionUtils" value="testng-reflection-utils/src/main/resources"/>
  <property name="build.resourceDirAsserts" value="testng-asserts/src/main/resources"/>
  <property name="build.resourceDirTestOsgi" value="testng-test-osgi/src/main/resources"/>
  <property name="build.resourceDirTestKit" value="testng-test-kit/src/main/resources"/>
  <property name="build.resourceDirRunnerApi" value="testng-runner-api/src/main/resources"/>
  <property name="build.resourceDirCollections" value="testng-collections/src/main/resources"/>
  <property name="build.resourceDirCore" value="testng-core/src/main/resources"/>

  <property name="reporting.outputDirectory" value="${build.dir}/site"/>

  <!-- ====================================================================== -->
  <!-- Defining classpaths                                                    -->
  <!-- ====================================================================== -->

  <path id="build.classpath">
    <fileset dir="lib">
      <!-- ant beust-jcommander bsh2/bsh google-guice jsr-305 junit snakeyaml -->
      <include name="**/*.jar"/>
    </fileset>
  </path>

  <!-- ====================================================================== -->
  <!-- Cleaning up target                                                     -->
  <!-- ====================================================================== -->

  <target name="clean" description="Clean the output directory">
    <delete dir="${build.dir}"/>
  </target>

  <!-- ====================================================================== -->
  <!-- Compilation target                                                     -->
  <!-- ====================================================================== -->

  <target name="compile" description="Compile the code">
    <mkdir dir="${build.outputDir}"/>
    <javac destdir="${build.outputDir}"
           nowarn="false"
           debug="true"
           encoding="utf-8"
           optimize="false"
           deprecation="true"
           release="${compiler.release}"
           target="${compiler.target}"
           verbose="false"
           fork="false"
           source="${compiler.source}">
      <src>
        <pathelement location="${build.srcDirCoreApi}"/>
        <pathelement location="${build.srcDirReflectionUtils}"/>
        <pathelement location="${build.srcDirAsserts}"/>
        <pathelement location="${build.srcDirTestKit}"/>
        <pathelement location="${build.srcDirRunnerApi}"/>
        <pathelement location="${build.srcDirCollections}"/>
        <pathelement location="${build.srcDirCore}"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
    <copy todir="${build.outputDir}">
      <fileset dir="${build.resourceDirCore}"/>
    </copy>
  </target>

  <!-- ====================================================================== -->
  <!-- Javadoc target                                                         -->
  <!-- ====================================================================== -->

  <target name="javadoc" description="Generates the Javadoc of the application">
    <javadoc sourcepath="${build.srcDirCoreApi}:${build.srcDirReflectionUtils}:${build.srcDirAsserts}:${build.srcDirTestKit}:${build.srcDirRunnerApi}:${build.srcDirCollections}:${build.srcDirCore}"
             packagenames="*"
             destdir="${reporting.outputDirectory}/apidocs"
             access="protected"
             source="${compiler.source}"
             verbose="false"
             version="true"
             use="true"
             author="true"
             splitindex="false"
             nodeprecated="false"
             nodeprecatedlist="false"
             notree="false"
             noindex="false"
             nohelp="false"
             nonavbar="false"
             serialwarn="false"
             encoding="utf-8"
             linksource="false"
             breakiterator="false">
      <classpath refid="build.classpath"/>
    </javadoc>
  </target>

  <!-- ====================================================================== -->
  <!-- Package target                                                         -->
  <!-- ====================================================================== -->

  <target name="package" depends="compile" description="Package the application">
    <jar jarfile="${build.dir}/${build.finalName}.jar"
         compress="true"
         index="false"
         basedir="${build.outputDir}"
         excludes="**/package.html">
      <manifest>
        <attribute name="Automatic-Module-Name" value="org.testng"/>
        <attribute name="Bundle-Description" value="${project.description}"/>
        <attribute name="Bundle-License" value="http://apache.org/licenses/LICENSE-2.0"/>
        <attribute name="Bundle-ManifestVersion" value="2"/>
        <attribute name="Bundle-Name" value="${project.name}"/>
        <attribute name="Bundle-SymbolicName" value="${project.groupId}"/>
        <attribute name="Bundle-Version" value="${project.version}"/>
        <attribute name="Export-Package" value="org.testng,org.testng.annotations,org.testng.asserts,org.testng.collections,org.testng.internal,org.testng.internal.annotations,org.testng.internal.collections,org.testng.internal.invokers,org.testng.internal.invokers.objects,org.testng.internal.objects,org.testng.internal.objects.pojo,org.testng.internal.reflect,org.testng.internal.thread,org.testng.internal.thread.graph,org.testng.log,org.testng.log4testng,org.testng.reporters,org.testng.reporters.jq,org.testng.reporters.util,org.testng.thread,org.testng.util,org.testng.xml,org.testng.xml.internal"/>
		    <attribute name="Implementation-Title" value="${project.name}"/>
		    <attribute name="Implementation-Url" value="https://testng.org"/>
		    <attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
		    <attribute name="Implementation-Vendor" value="${project.name}"/>
		    <attribute name="Implementation-Version" value="${project.version}"/>
		    <attribute name="Import-Package" value="*;resolution:=optional,bsh.*;version=&quot;[2.0.0,3.0.0)&quot;;resolution:=optional,com.beust.jcommander.*;version=&quot;[1.7.0,3.0.0)&quot;;resolution:=optional,com.google.inject.*;version=&quot;[1.2,1.3)&quot;;resolution:=optional,org.yaml.*;version=&quot;[1.6,2.0)&quot;;resolution:=optional"/>
        <attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
        <attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
        <attribute name="JavaPackages-Version" value="${project.version}"/>
        <attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
        <attribute name="Specification-Title" value="${project.name}"/>
        <attribute name="Specification-Vendor" value="${project.name}"/>
        <attribute name="Specification-Version" value="${project.version}"/>
      </manifest>
    </jar>
  </target>

  <!-- ====================================================================== -->
  <!-- A dummy target for the package named after the type it creates         -->
  <!-- ====================================================================== -->

  <target name="jar" depends="package" description="Builds the jar for the application"/>

</project>
openSUSE Build Service is sponsored by