picocli/picocli-extras-build.xml

139 lines
5.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="picocli-extras" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.artifactId" value="picocli"/>
<property name="project.version" value="[UNKNOWN]"/>
<property name="compiler.release" value="8"/>
<property name="compiler.source" value="1.${compiler.release}"/>
<property name="compiler.target" value="${compiler.source}"/>
<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.srcDir9" value="src/main/java9"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<property name="jline3.jar" location="[UNKNOWN]"/>
<property name="picocli.jar" location ="[UNKNOWN]"/>
<!-- ====================================================================== -->
<!-- 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}"/>
<!-- Build all except module-info.java with source/target 8 -->
<mkdir dir="${project.artifactId}-shell-jline3/${build.outputDir}"/>
<javac destdir="${project.artifactId}-shell-jline3/${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
release="${compiler.release}"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}"
encoding="UTF-8"
createMissingPackageInfoClass="false">
<src>
<pathelement location="${project.artifactId}-shell-jline3/${build.srcDir}"/>
</src>
<classpath>
<pathelement location="${picocli.jar}"/>
<pathelement location="${jline3.jar}"/>
</classpath>
</javac>
<!-- Build module-info.java with release 9 -->
<javac destdir="${project.artifactId}-shell-jline3/${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
release="9"
verbose="false"
fork="false"
encoding="UTF-8"
createMissingPackageInfoClass="false">
<src>
<pathelement location="${project.artifactId}-shell-jline3/${build.srcDir9}"/>
</src>
<modulepath>
<pathelement location="${picocli.jar}"/>
<pathelement location="${jline3.jar}"/>
</modulepath>
</javac>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
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"
charset="UTF-8"
linksource="false"
breakiterator="false"
source="${compiler.source}">
<sourcepath>
<pathelement location="${project.artifactId}-shell-jline3/${build.srcDir}"/>
</sourcepath>
<classpath>
<pathelement location="${picocli.jar}"/>
<pathelement location="${jline3.jar}"/>
</classpath>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${project.artifactId}-shell-jline3-${project.version}.jar"
compress="true"
index="false"
basedir="${project.artifactId}-shell-jline3/${build.outputDir}"
excludes="**/package.html"/>
</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>