バッチ・コンパイラー ant タスク
ant タスク JspC は、 すべてのバッチ・コンパイラー構成オプションを公開します。 バッチ・コンパイラーの実行は、非公開で行います。これは、 JspC ant タスクの WebSphere® Application Server 5.x バージョンと後方互換性があります。 以下の表に、すべての ant タスク属性とそれらに相当するバッチ・コンパイラーをリストします。
| JspC 属性 | 相当するバッチ・コンパイラー・パラメーター |
|---|---|
| earPath | -ear.path |
| warPath | -war.path |
| src 後方互換に関して、warPath と同じ |
-war.path |
| enterpriseAppName | -enterpriseapp.name |
| responseFile | -response.file |
| webmoduleName | -webmodule.name |
| fileName | -filename -config.root |
| configRoot | -config.root |
| cellName | -cell.name |
| nodeName | -node.name |
| serverName | -server.name |
| profileName | -profileName |
| extractToDir | -extractToDir |
| compileToDir 後方互換に関して、compileToDir と同じ |
-compileToDir -compileToDir |
| compileToWebInf | -compileToWebInf |
| compilerOptions | -compilerOptions |
| recurse | -recurse |
| removeTempDir | -removeTempDir |
| translate | -translate |
| compile | -compile |
| forceCompilation | -forceCompilation |
| useFullPackageNames | -useFullPackageNames |
| trackDependencies | -trackDependencies |
| createDebugClassfiles | -createDebugClassfiles |
| keepgenerated | -keepgenerated |
| keepGeneratedclassfiles | -keepGeneratedclassfiles |
| usePageTagPool | -usePageTagPool |
| useThreadTagPool | -useThreadTagPool |
| classloaderParentFirst | -classloader.parentFirst |
| classloaderSingleWarClassloader | -classloader.singleWarClassloader |
| additionalClasspath | -additional.classpath |
| classpath 後方互換に関して、additionalClasspath と同じ |
-additional.classpath |
| verbose | -verbose |
| deprecation | -deprecation |
| javaEncoding | -javaEncoding |
| compileWithAssert | -compileWithAssert |
| useJikes | -useJikes |
| jspFileExtensions | -jsp.file.extensions |
| logLevel | -log.level |
| wasHome | none |
| Classpathref | none |
| jdkSourceLevel | -jdkSourceLevel |
以下に、それぞれ異なる属性を持つ、複数のターゲットとビルド・スクリプトの例を示します。 以下のコマンドは、スクリプトを起動するために使用します。
Windows の場合:
ws_ant -Dwas.home=%WAS_HOME% -Dear.path=%EAR_PATH% -Dextract.dir=%EXTRACT_DIR%
ws_ant jspc2 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME%
ws_ant jspc3 -Dwas.home=%WAS_HOME% -Dapp.name=%APP_NAME% -Dwebmodule.name=%MOD_NAME% -Ddir.name=%DIR_NAME%
UNIX または i5/OS™ の場合:
ws_ant -Dwas.home=$WAS_HOME -Dear.path=$EAR_PATH -Dextract.dir=$EXTRACT_DIR
ws_ant jspc2 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME
ws_ant jspc3 -Dwas.home=$WAS_HOME -Dapp.name=$APP_NAME -Dwebmodule.name=$MOD_NAME -Ddir.name=$DIR_NAME
JspC タスクを使用した build.xml ファイルの例
<project name="JSP Precompile" default="jspc1" basedir=".">
<taskdef name="wsjspc" classname="com.ibm.websphere.ant.tasks.JspC"/>
<target name="jspc1" description="example using a path to an EAR, and extracting the EAR to a directory">
<wsjspc wasHome="${was.home}"
earpath="${ear.path}"
forcecompilation="true"
extractToDir="${extract.dir}"
useThreadTagPool="true"
keepgenerated="true"
/>
</target>
<target name="jspc2" description="example using an enterprise app and webmodule">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
removeTempDir="true"
forcecompilation="true"
keepgenerated="true"
/>
</target>
<target name="jspc3" description="example using an enterprise app, webmodule and specific directory">
<wsjspc wasHome="${was.home}"
enterpriseAppName="${app.name}"
webmoduleName="${webmodule.name}"
fileName="${dir.name}"
recurse="false"
forcecompilation="true"
keepgenerated="true"
/>
</target>
</project>
参照トピック