「ANT」の版間の差分
ナビゲーションに移動
検索に移動
| 41行目: | 41行目: | ||
====親ディレクトリ==== | ====親ディレクトリ==== | ||
<property name="parentdir" value="${basedir}" location=".."/> | <property name="parentdir" value="${basedir}" location=".."/> | ||
| − | === | + | ===[[JSP]]作業ディレクトリの初期化=== |
<project basedir="../" ... | <project basedir="../" ... | ||
: | : | ||
| − | <target name="Clean JSP Working Directory" | + | <target name="Clean [[JSP]] Working Directory" |
| − | description=" | + | description="[[JSP]]作業ディレクトリ初期化"> |
<delete dir="../work"/> | <delete dir="../work"/> | ||
<mkdir dir="../work"/> | <mkdir dir="../work"/> | ||
</target> | </target> | ||
| − | ===JNI=== | + | ===[[JNI]]=== |
*Cヘッダーファイルを生成 | *Cヘッダーファイルを生成 | ||
*シグネチャ確認(標準出力に出力) | *シグネチャ確認(標準出力に出力) | ||
| 57行目: | 57行目: | ||
<target name="create c header file"> | <target name="create c header file"> | ||
<!-- | <!-- | ||
| − | + | [[JNI]]用のCヘッダーファイルを生成 | |
-eg batch file | -eg batch file | ||
| − | cd "C:\Program Files\eclipse3.3.2\workspace\ | + | cd "C:\Program Files\eclipse3.3.2\workspace\[[JNI]]Sample\bin" |
| − | javah -jni info.typea.jnisample.mem. | + | javah -jni info.typea.jnisample.mem.[[JNI]]MemoryManager |
--> | --> | ||
<exec executable="javah"> | <exec executable="javah"> | ||
| 66行目: | 66行目: | ||
<arg value="${cpdir}"/> | <arg value="${cpdir}"/> | ||
<arg value="-jni"/> | <arg value="-jni"/> | ||
| − | <arg value="info.typea.jnisample.mem. | + | <arg value="info.typea.jnisample.mem.[[JNI]]MemoryManager"/> |
</exec> | </exec> | ||
</target> | </target> | ||
<target name="print signeture"> | <target name="print signeture"> | ||
<!-- | <!-- | ||
| − | + | [[JNI]]用シグネチャ確認(標準出力に出力) | |
-eg batch file | -eg batch file | ||
| − | cd "C:\Program Files\eclipse3.3.2\workspace\ | + | cd "C:\Program Files\eclipse3.3.2\workspace\[[JNI]]Sample\bin" |
| − | javap -private -s -classpath . info.typea.jnisample.mem. | + | javap -private -s -classpath . info.typea.jnisample.mem.[[JNI]]MemoryManager |
--> | --> | ||
<exec executable="javap"> | <exec executable="javap"> | ||
| 81行目: | 81行目: | ||
<arg value="-classpath"/> | <arg value="-classpath"/> | ||
<arg value="${cpdir}"/> | <arg value="${cpdir}"/> | ||
| − | <arg value="info.typea.jnisample.mem. | + | <arg value="info.typea.jnisample.mem.[[JNI]]MemoryManager"/> |
</exec> | </exec> | ||
</target> | </target> | ||
</project> | </project> | ||
2020年2月16日 (日) 04:22時点における最新版
目次
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 矢木浩人