「ANT」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「==Ant== ====マニュアル==== http://www.jajakarta.org/ant/ant-1.5/docs/ant-1.5/j/docs/manual/ http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/index.html…」) |
|||
| 7行目: | 7行目: | ||
==用例== | ==用例== | ||
===native2ascii=== | ===native2ascii=== | ||
| − | + | <project basedir="../" ... | |
: | : | ||
| − | + | <target name="n2a" | |
| − | description="Native2Ascii 実行" | + | description="Native2Ascii 実行"> |
| − | + | <native2ascii src="${basedir}\src" | |
dest="${basedir}\classes" | dest="${basedir}\classes" | ||
| − | includes="**/*.native" ext=".properties"/ | + | includes="**/*.native" ext=".properties"/> |
| − | + | </target> | |
===Timestamp === | ===Timestamp === | ||
====1==== | ====1==== | ||
| − | + | <project basedir="./"> | |
| − | + | <target name="release"> | |
| − | + | <tstamp/> | |
| − | + | <property name="outdir" value="c:\work\out_${DSTAMP}_${TSTAMP}"/> | |
: | : | ||
====2==== | ====2==== | ||
| − | + | <tstamp> | |
| − | + | <format property="timestamp.sufix" pattern="_yyyyMMdd_HHmmss" locale="ja"/> | |
| − | + | </tstamp> | |
| − | + | <property name="output.dir" value="C:/work/ams/batch${timestamp.sufix}"/> | |
===ファイルコピー=== | ===ファイルコピー=== | ||
: | : | ||
| − | + | <copy todir="${appdir}"> | |
| − | + | <fileset dir="${basedir}\src\${appid}" /> | |
| − | + | </copy> | |
| − | + | <copy todir="${appdir}"> | |
| − | + | <fileset dir="${basedir}\src\${appid}" includes="**/*.java"/> | |
| − | + | </copy> | |
===ディレクトリ操作=== | ===ディレクトリ操作=== | ||
====親ディレクトリ==== | ====親ディレクトリ==== | ||
| − | + | <property name="parentdir" value="${basedir}" location=".."/> | |
===JSP作業ディレクトリの初期化=== | ===JSP作業ディレクトリの初期化=== | ||
| − | + | <project basedir="../" ... | |
: | : | ||
| − | + | <target name="Clean JSP Working Directory" | |
| − | description="JSP作業ディレクトリ初期化" | + | description="JSP作業ディレクトリ初期化"> |
| − | + | <delete dir="../work"/> | |
| − | + | <mkdir dir="../work"/> | |
| − | + | </target> | |
===JNI=== | ===JNI=== | ||
*Cヘッダーファイルを生成 | *Cヘッダーファイルを生成 | ||
*シグネチャ確認(標準出力に出力) | *シグネチャ確認(標準出力に出力) | ||
| − | + | <project basedir="./"> | |
| − | + | <property name="cpdir" value="${basedir}\bin"/> | |
| − | + | <target name="create c header file"> | |
| − | + | <!-- | |
JNI用のCヘッダーファイルを生成 | JNI用のCヘッダーファイルを生成 | ||
-eg batch file | -eg batch file | ||
cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin" | cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin" | ||
javah -jni info.typea.jnisample.mem.JNIMemoryManager | javah -jni info.typea.jnisample.mem.JNIMemoryManager | ||
| − | -- | + | --> |
| − | + | <exec executable="javah"> | |
| − | + | <arg value="-classpath"/> | |
| − | + | <arg value="${cpdir}"/> | |
| − | + | <arg value="-jni"/> | |
| − | + | <arg value="info.typea.jnisample.mem.JNIMemoryManager"/> | |
| − | + | </exec> | |
| − | + | </target> | |
| − | + | <target name="print signeture"> | |
| − | + | <!-- | |
JNI用シグネチャ確認(標準出力に出力) | JNI用シグネチャ確認(標準出力に出力) | ||
-eg batch file | -eg batch file | ||
cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin" | cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin" | ||
javap -private -s -classpath . info.typea.jnisample.mem.JNIMemoryManager | javap -private -s -classpath . info.typea.jnisample.mem.JNIMemoryManager | ||
| − | -- | + | --> |
| − | + | <exec executable="javap"> | |
| − | + | <arg value="-private"/> | |
| − | + | <arg value="-s"/> | |
| − | + | <arg value="-classpath"/> | |
| − | + | <arg value="${cpdir}"/> | |
| − | + | <arg value="info.typea.jnisample.mem.JNIMemoryManager"/> | |
| − | + | </exec> | |
| − | + | </target> | |
| − | + | </project> | |
2020年2月15日 (土) 08:00時点における版
目次
Ant
マニュアル
http://www.jajakarta.org/ant/ant-1.5/docs/ant-1.5/j/docs/manual/ http://www.jajakarta.org/ant/ant-1.6.1/docs/ja/manual/index.html
用例
native2ascii
<project basedir="../" ...
:
<target name="n2a"
description="Native2Ascii 実行">
<native2ascii src="${basedir}\src"
dest="${basedir}\classes"
includes="**/*.native" ext=".properties"/>
</target>
Timestamp
1
<project basedir="./">
<target name="release">
<tstamp/>
<property name="outdir" value="c:\work\out_${DSTAMP}_${TSTAMP}"/>
:
2
<tstamp>
<format property="timestamp.sufix" pattern="_yyyyMMdd_HHmmss" locale="ja"/>
</tstamp>
<property name="output.dir" value="C:/work/ams/batch${timestamp.sufix}"/>
ファイルコピー
:
<copy todir="${appdir}">
<fileset dir="${basedir}\src\${appid}" />
</copy>
<copy todir="${appdir}">
<fileset dir="${basedir}\src\${appid}" includes="**/*.java"/>
</copy>
ディレクトリ操作
親ディレクトリ
<property name="parentdir" value="${basedir}" location=".."/>
JSP作業ディレクトリの初期化
<project basedir="../" ...
:
<target name="Clean JSP Working Directory"
description="JSP作業ディレクトリ初期化">
<delete dir="../work"/>
<mkdir dir="../work"/>
</target>
JNI
- Cヘッダーファイルを生成
- シグネチャ確認(標準出力に出力)
<project basedir="./">
<property name="cpdir" value="${basedir}\bin"/>
<target name="create c header file">
<!--
JNI用のCヘッダーファイルを生成
-eg batch file
cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin"
javah -jni info.typea.jnisample.mem.JNIMemoryManager
-->
<exec executable="javah">
<arg value="-classpath"/>
<arg value="${cpdir}"/>
<arg value="-jni"/>
<arg value="info.typea.jnisample.mem.JNIMemoryManager"/>
</exec>
</target>
<target name="print signeture">
<!--
JNI用シグネチャ確認(標準出力に出力)
-eg batch file
cd "C:\Program Files\eclipse3.3.2\workspace\JNISample\bin"
javap -private -s -classpath . info.typea.jnisample.mem.JNIMemoryManager
-->
<exec executable="javap">
<arg value="-private"/>
<arg value="-s"/>
<arg value="-classpath"/>
<arg value="${cpdir}"/>
<arg value="info.typea.jnisample.mem.JNIMemoryManager"/>
</exec>
</target>
</project>
© 2006 矢木浩人