forked from pool/dom4j
0cb7aa037c
- JPMS: Add the Automatic-Module-Name attribute to the manifest. OBS-URL: https://build.opensuse.org/request/show/1122658 OBS-URL: https://build.opensuse.org/package/show/Java:packages/dom4j?expand=0&rev=52
118 lines
4.5 KiB
XML
118 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="dom4j" default="package" basedir=".">
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Build environment properties -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<property name="project.groupId" value="org.dom4j"/>
|
|
<property name="project.artifactId" value="dom4j"/>
|
|
<property name="project.version" value="2.1.4"/>
|
|
|
|
<property name="compiler.source" value="1.8"/>
|
|
<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="**/*"/>
|
|
</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>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Javadoc target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="javadoc" description="Generates the Javadoc of the application">
|
|
<javadoc sourcepath="${build.srcDir}"
|
|
packagenames="*"
|
|
destdir="${reporting.outputDirectory}/apidocs"
|
|
access="protected"
|
|
encoding="utf-8"
|
|
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="${project.groupId}"/>
|
|
</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>
|