Ant関連のメモ

ディレクトリ構造・ファイル配置

build.xml

これ見りゃだいたい想像つくやろ?(・_・ )
build.xml
<?xml version="1.0" encoding="utf-8"?>
<project name="foo" default="jar" basedir=".">
  <property name="build.src"    value="src" />
  <property name="build.dest"   value="classes" />
  <property name="javadoc.dest" value="api" />
  <property name="project"      value="joo" />
  <property name="version"      value="1.0" />
  <property name="build.jar"    value="${project}-${version}.jar" />

  <target name="jar" depends="compile">
    <jar jarfile="${build.jar}" basedir="${build.dest}" />
  </target>

  <target name="compile">
    <mkdir dir="${build.dest}" />
    <javac srcdir="${build.src}" debug="${debug}" destdir="${build.dest}"
           includeantruntime="false"
           classpath="sugoi.jar" />
  </target>

  <target name="javadoc">
    <delete dir="${javadoc.dest}" />
    <mkdir  dir="${javadoc.dest}" />
    <javadoc packagenames="*" sourcepath="${build.src}" destdir="${javadoc.dest}"
             additionalparam="-noqualifier all">
        <fileset dir="${build.src}" casesensitive="yes">
            <include name="**/*.java"/>
        </fileset>
    </javadoc>
  </target>

  <target name="clean">
    <delete dir="${build.dest}" />
    <delete file="${build.jar}" />
  </target>
</project>

includeantruntime="false"

Javadocタスク

Links


はたいたかし
http://exlight.net/
2017-02-15
Home > Dev > Java > Ant