LoginSignup
0
0

More than 5 years have passed since last update.

AntでDoma1をビルドする

Posted at


    <!-- META-INFのコピー -->
    <target name="copy">
        <copy todir="WEB-INF/classes" filtering="true">
            <fileset dir="WEB-INF/src">
                <include name="META-INF/**" />
            </fileset>
        </copy>
    </target>

    <!-- プロジェクトのビルド -->
    <target depends="copy" name="build-project">
        <javac destdir="WEB-INF/classes" includeantruntime="false" encoding="UTF-8" debug="true">
            <src path="WEB-INF/src" />
            <classpath refid="hogehoge.classpath"/>
            <compilerarg line="-Adao.subpackage=impl -Adao.suffix=Impl -Adebug=false "/>
            <compilerarg line="-s .apt_generated" />
        </javac>
    </target>

ポイント

  • META-INF(SQLがあるディレクトリ) は ビルド先のディレクトリにコピー
  • <compilerarg line="-s .apt_generated" /> 注釈処理で生成したソースファイルは適当なディレクトリに吐き出す
  • <compilerarg line="-Adao.subpackage=impl -Adao.suffix=Impl -Adebug=false "/> を指定する

最後のがないとうまくうごかなかった

参考

http://doma.seasar.org/reference/app_build.html#Ant%E3%81%AB%E3%82%88%E3%82%8B%E3%83%93%E3%83%AB%E3%83%89
http://doma.seasar.org/reference/apt.html

公式の注釈処理のサンプルコードが間違っている気がする

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0