136 lines
9.9 KiB
XML
136 lines
9.9 KiB
XML
<?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="6.14.3"/>
|
|
<property name="project.description" value="TestNG is a testing framework."/>
|
|
|
|
<property name="compiler.source" value="1.7"/>
|
|
<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="src/main/java"/>
|
|
<property name="build.resourceDir" value="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"
|
|
target="${compiler.target}"
|
|
verbose="false"
|
|
fork="false"
|
|
source="${compiler.source}">
|
|
<src>
|
|
<pathelement location="${build.srcDir}"/>
|
|
</src>
|
|
<classpath refid="build.classpath"/>
|
|
</javac>
|
|
<copy todir="${build.outputDir}">
|
|
<fileset dir="${build.resourceDir}"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Javadoc target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="javadoc" description="Generates the Javadoc of the application">
|
|
<javadoc sourcepath="${build.srcDir}"
|
|
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="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="com.beust.testng;uses:="org.testng";version="${project.version}",org.testng;uses:="com.beust.jcommander,com.beust.jcommander.converters,com.google.inject,javax.xml.parsers,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.apache.tools.ant.types,org.testng.annotations,org.testng.internal,org.testng.internal.annotations,org.testng.internal.junit,org.testng.internal.thread.graph,org.testng.xml,org.xml.sax";version="${project.version}",org.testng.annotations;uses:="com.google.inject,org.testng,org.testng.internal.annotations";version="${project.version}",org.testng.asserts;version="${project.version}",org.testng.collections;version="${project.version}",org.testng.internal;uses:="com.google.inject,javax.annotation,org.testng,org.testng.annotations,org.testng.collections,org.testng.internal.annotations,org.testng.internal.thread,org.testng.internal.thread.graph,org.testng.junit,org.testng.reporters,org.testng.xml";version="${project.version}",org.testng.internal.annotations;uses:="org.testng,org.testng.annotations,org.testng.internal,org.testng.xml";version="${project.version}",org.testng.internal.collections;version="${project.version}",org.testng.internal.invokers;uses:="org.testng";version="${project.version}",org.testng.internal.junit;version="${project.version}",org.testng.internal.reflect;uses:="org.testng";version="${project.version}",org.testng.internal.thread;version="${project.version}",org.testng.internal.thread.graph;uses:="org.testng,org.testng.internal";version="${project.version}",org.testng.junit;uses:="junit.framework,org.junit.runner,org.testng,org.testng.internal,org.testng.internal.annotations,org.testng.xml";version="${project.version}",org.testng.log;version="${project.version}",org.testng.log4testng;version="${project.version}",org.testng.mustache;version="${project.version}",org.testng.reporters;uses:="javax.annotation,org.testng,org.testng.internal,org.testng.xml";version="${project.version}",org.testng.reporters.jq;uses:="org.testng,org.testng.reporters,org.testng.xml";version="${project.version}",org.testng.reporters.util;uses:="org.testng";version="${project.version}",org.testng.util;uses:="org.testng";version="${project.version}",org.testng.xml;uses:="org.testng,org.testng.reporters,org.testng.xml.dom,org.xml.sax,org.xml.sax.helpers";version="${project.version}",org.testng.xml.dom;uses:="javax.xml.parsers,javax.xml.xpath,org.testng,org.testng.internal.collections,org.testng.xml,org.w3c.dom,org.xml.sax";version="${project.version}",org.testng.xml.internal;uses:="org.testng.xml";version="${project.version}""/>
|
|
<attribute name="Import-Package" value="com.beust.jcommander;version="[1.7.0,3.0.0)",com.beust.jcommander.converters;version="[1.7.0,3.0.0)",bsh;version="[2.0.0,3.0.0)";resolution:=optional,com.google.inject;version="[1.2,1.3)";resolution:=optional,junit.framework;version="[3.8.1,5.0.0)";resolution:=optional,org.junit;resolution:=optional;version="[4.12,5)",org.junit.runner;resolution:=optional;version="[4.12,5)",org.junit.runner.manipulation;resolution:=optional;version="[4.12,5)",org.junit.runner.notification;resolution:=optional;version="[4.12,5)",org.apache.tools.ant;version="[1.7.0,2.0.0)";resolution:=optional,org.apache.tools.ant.taskdefs;version="[1.7.0,2.0.0)";resolution:=optional,org.apache.tools.ant.types;version="[1.7.0,2.0.0)";resolution:=optional,org.apache.tools.ant.types.resources;version="[1.7.0,2.0.0)";resolution:=optional,org.apache.tools.ant.types.selectors;version="[1.7.0,2.0.0)";resolution:=optional,org.yaml.snakeyaml;version="[1.6,2.0)";resolution:=optional,org.yaml.snakeyaml.constructor;version="[1.6,2.0)";resolution:=optional,org.yaml.snakeyaml.nodes;version="[1.6,2.0)";resolution:=optional,javax.annotation,javax.xml.parsers,javax.xml.xpath,org.w3c.dom,org.xml.sax,org.xml.sax.helpers"/>
|
|
<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:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
|
</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>
|