225 lines
8.2 KiB
XML
225 lines
8.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="picocli" 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="jline2.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 -->
|
|
<javac destdir="${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="${build.srcDir}"/>
|
|
</src>
|
|
</javac>
|
|
<!-- Build module-info.java with release 9 -->
|
|
<javac destdir="${build.outputDir}"
|
|
nowarn="false"
|
|
debug="true"
|
|
optimize="false"
|
|
deprecation="true"
|
|
release="9"
|
|
verbose="false"
|
|
fork="false"
|
|
encoding="UTF-8"
|
|
createMissingPackageInfoClass="false">
|
|
<src>
|
|
<pathelement location="${build.srcDir9}"/>
|
|
</src>
|
|
</javac>
|
|
<!-- Build all except module-info.java with source/target 8 -->
|
|
<mkdir dir="picocli-codegen/${build.outputDir}"/>
|
|
<javac destdir="picocli-codegen/${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="picocli-codegen/${build.srcDir}"/>
|
|
</src>
|
|
<classpath>
|
|
<pathelement location="${build.outputDir}"/>
|
|
</classpath>
|
|
</javac>
|
|
<!-- Build module-info.java with release 9 -->
|
|
<javac destdir="picocli-codegen/${build.outputDir}"
|
|
nowarn="false"
|
|
debug="true"
|
|
optimize="false"
|
|
deprecation="true"
|
|
release="9"
|
|
verbose="false"
|
|
fork="false"
|
|
encoding="UTF-8"
|
|
createMissingPackageInfoClass="false">
|
|
<src>
|
|
<pathelement location="picocli-codegen/${build.srcDir9}"/>
|
|
</src>
|
|
<include name="**/module-info.java"/>
|
|
<modulepath>
|
|
<pathelement location="${build.outputDir}"/>
|
|
</modulepath>
|
|
</javac>
|
|
<!-- Build all except module-info.java with source/target 8 -->
|
|
<mkdir dir="picocli-shell-jline2/${build.outputDir}"/>
|
|
<javac destdir="picocli-shell-jline2/${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="picocli-shell-jline2/${build.srcDir}"/>
|
|
</src>
|
|
<classpath>
|
|
<pathelement location="${build.outputDir}"/>
|
|
<pathelement location="${jline2.jar}"/>
|
|
</classpath>
|
|
</javac>
|
|
<!-- Build module-info.java with release 9 -->
|
|
<javac destdir="picocli-shell-jline2/${build.outputDir}"
|
|
nowarn="false"
|
|
debug="true"
|
|
optimize="false"
|
|
deprecation="true"
|
|
release="9"
|
|
verbose="false"
|
|
fork="false"
|
|
encoding="UTF-8"
|
|
createMissingPackageInfoClass="false">
|
|
<src>
|
|
<pathelement location="picocli-shell-jline2/${build.srcDir9}"/>
|
|
</src>
|
|
<modulepath>
|
|
<pathelement location="${build.outputDir}"/>
|
|
<pathelement location="${jline2.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="${build.srcDir}"/>
|
|
<pathelement location="picocli-codegen/${build.srcDir}"/>
|
|
<pathelement location="picocli-shell-jline2/${build.srcDir}"/>
|
|
</sourcepath>
|
|
<classpath>
|
|
<pathelement location="${build.outputDir}"/>
|
|
<pathelement location="${jline2.jar}"/>
|
|
</classpath>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Package target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="package" depends="compile" description="Package the application">
|
|
<jar jarfile="${build.dir}/${project.artifactId}-${project.version}.jar"
|
|
compress="true"
|
|
index="false"
|
|
basedir="${build.outputDir}"
|
|
excludes="**/package.html"/>
|
|
<jar jarfile="${build.dir}/${project.artifactId}-codegen-${project.version}.jar"
|
|
compress="true"
|
|
index="false"
|
|
basedir="picocli-codegen/${build.outputDir}"
|
|
excludes="**/package.html">
|
|
<service type="javax.annotation.processing.Processor"
|
|
provider="picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor"/>
|
|
</jar>
|
|
<jar jarfile="${build.dir}/${project.artifactId}-shell-jline2-${project.version}.jar"
|
|
compress="true"
|
|
index="false"
|
|
basedir="picocli-shell-jline2/${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>
|