141 lines
8.6 KiB
XML
141 lines
8.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="junit" default="package" basedir=".">
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Build environment properties -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<property file="build.properties"/>
|
|
|
|
<property name="project.artifactId" value="junit"/>
|
|
<property name="project.groupId" value="junit"/>
|
|
<property name="project.version" value="4.13.2"/>
|
|
|
|
<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="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">
|
|
<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}"
|
|
encoding="ISO-8859-1"
|
|
nowarn="true"
|
|
debug="true"
|
|
optimize="false"
|
|
deprecation="true"
|
|
release="${compiler.release}"
|
|
target="${compiler.target}"
|
|
verbose="false"
|
|
fork="true"
|
|
memoryInitialSize="128m"
|
|
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"
|
|
charset="ISO-8859-1"
|
|
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="junit"/>
|
|
<attribute name="Bundle-Description" value="JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck."/>
|
|
<attribute name="Bundle-DocURL" value="http://www.junit.org"/>
|
|
<attribute name="Bundle-License" value="http://www.eclipse.org/legal/epl-v10.html"/>
|
|
<attribute name="Bundle-ManifestVersion" value="2"/>
|
|
<attribute name="Bundle-Name" value="JUnit"/>
|
|
<attribute name="Bundle-SymbolicName" value="org.junit"/>
|
|
<attribute name="Bundle-Vendor" value="JUnit"/>
|
|
<attribute name="Bundle-Version" value="${project.version}"/>
|
|
<attribute name="Export-Package" value="junit.extensions;version="${project.version}",junit.framework;version="${project.version}",junit.runner;version="${project.version}",junit.textui;version="${project.version}",org.junit.experimental.categories;version="${project.version}",org.junit.experimental.max;version="${project.version}",org.junit.experimental.results;version="${project.version}",org.junit.experimental.runners;version="${project.version}",org.junit.experimental.theories.internal;x-internal:=true;version="${project.version}",org.junit.experimental.theories.suppliers;version="${project.version}",org.junit.experimental.theories;version="${project.version}",org.junit.experimental;version="${project.version}",org.junit.function;version="${project.version}",org.junit.internal.builders;x-internal:=true;version="${project.version}",org.junit.internal.management;x-internal:=true;version="${project.version}",org.junit.internal.matchers;x-internal:=true;version="${project.version}",org.junit.internal.requests;x-internal:=true;version="${project.version}",org.junit.internal.runners.model;x-internal:=true;version="${project.version}",org.junit.internal.runners.rules;x-internal:=true;version="${project.version}",org.junit.internal.runners.statements;x-internal:=true;version="${project.version}",org.junit.internal.runners;x-internal:=true;version="${project.version}",org.junit.internal;x-internal:=true;version="${project.version}",org.junit.matchers;version="${project.version}",org.junit.rules;version="${project.version}",org.junit.runner.manipulation;version="${project.version}",org.junit.runner.notification;version="${project.version}",org.junit.runner;version="${project.version}",org.junit.runners.model;version="${project.version}",org.junit.runners.parameterized;version="${project.version}",org.junit.runners;version="${project.version}",org.junit.validator;version="${project.version}",org.junit;version="${project.version}""/>
|
|
<attribute name="Implementation-Title" value="JUnit"/>
|
|
<attribute name="Implementation-URL" value="http://junit.org"/>
|
|
<attribute name="Implementation-Vendor" value="JUnit"/>
|
|
<attribute name="Implementation-Vendor-Id" value="junit"/>
|
|
<attribute name="Implementation-Version" value="${project.version}"/>
|
|
<attribute name="Import-Package" value="junit.extensions,junit.framework,junit.runner,org.hamcrest.core,org.hamcrest,org.junit,org.junit.experimental.theories,org.junit.experimental.theories.internal,org.junit.function,org.junit.internal,org.junit.internal.builders,org.junit.internal.management,org.junit.internal.matchers,org.junit.internal.requests,org.junit.internal.runners,org.junit.internal.runners.model,org.junit.internal.runners.rules,org.junit.internal.runners.statements,org.junit.matchers,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners,org.junit.runners.model,org.junit.runners.parameterized,org.junit.validator"/>
|
|
<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>
|