「Androidの入門」Antコマンドのフォーマット基本操作知識とxmlコード定義

 

1.available
xmlコード:
<available property="prefix"
value="${basedir}/.."
file="${basedir}/../build/jetty-build.xml"/>

2.condition
xmlコード:
<condition property="prefix" value="${basedir}">
<not>
<isset property="prefix"/>
</not>
</condition>
3.javac
xmlコード:
<javac source="${JAVAC_SOURCE}" target="${JAVAC_TARGET}"
executable="${JAVAC_EXE}" fork="yes" destdir="classes"
classpath="${outDir}" classpathref="libraries"
optimize="off" verbose="off" debug="on"
memoryInitialSize="256M" memoryMaximumSize="512M">
<src path="${srcDir}"/>
<include name="**/*.java"/>
</javac>

4.nbjpdastart
xmlコード
<nbjpdastart name="My application" addressproperty="jpda.address2″ transport="dt_socket">
<sourcepath>
<pathelement path="src"/>
</sourcepath>
</nbjpdastart>

5.java
xmlコード:
<java jar="start.jar" fork="yes" dir="bin" failonerror="true" jvm="${java.executable}">
<jvmarg value="-Xdebug"/>
<jvmarg value="-mx256M"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djetty.home=."/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address2}"/>
<jvmarg value="-DSTOP.PORT=-1″/>
<jvmarg value="-Xverify:none"/>
<jvmarg value="-Xbootclasspath/a:${jettyOutDir}\\ext\\mail.jar"/》
<jvmarg value="-Dprimary.address=10.123.146.10″/>
<jvmarg value="-Dprimary.port=8080″/>
</java>

6.for
xmlコード:
<for param="fileName">
<path>

</path>
<sequential>
<echo>@{filename}</echo>
</sequential>
</for>

7.mxmlc
xmlコード:
<mxmlc file="@{filename}" keep-generated-actionscript="true">
<source-path path-element="flex/locale"/>
<compiler.include-libraries dir="${FLEX_HOME}/frameworks/libs">
<include name="automation.swc"/>
<include name="automation_agent.swc"/>
<include name="automation_charts.swc"/>
</compiler.include-libraries>
<compiler.include-libraries dir="flex/lib">
<include name="graphLayout.swc"/>
<include name="unComponentToolbox.swc"/>
<include name="PrimitiveIcons.swc"/>
</compiler.include-libraries>
<compiler.include-libraries dir="${rftBinDir}">
<include name="rft.swc"/>
<include name="rftProp.swc"/>
</compiler.include-libraries>
</mxmlc>
8.sequential
xmlコード:
<sequential>
<mkdir … />
<copy … />
<nbjpdastart … />
</sequential>

9.echo
xmlコード:
<echo message="Fire crews" />
<echo>Fire crews</echo>

<echo file="containment.txt" append="false">Fire crews</echo>
<echo message="Fire crews" file="containment.txt" append="false" />

<echo level="debug">Are hoping</echo>
10.signjar
xmlコード:
<signjar jar="crew.jar" alias="containment" storepass="123456″ keystore="cert.p12″ storetype="pkcs12″ />

11.project
xmlコード:
<project name="WebApplication" default="init" basedir="."></project>

12.jar
xmlコード:
<jar update="true" compress="true" jarfile="${outDir}/tag-1.0.jar">
<manifest>
<attribute name="Build-User" value="John"/>
</manifest>
<metainf dir="${srcDir}/META-INF/">
<include name="**/*.xml" />
</metainf>
<fileset dir="${outDir}">
<include name="**/*.class" />
</fileset>
</jar>

13.path
xmlコード:
<path id="build.classpath">
<fileset dir="${outDir}">
<include name="**/*.class" />
</fileset>
<pathelement location="${basedir}\..\encryption\build" />
</path>

14.taskdef
xmlコード:
<taskdef name="wlst" classname="weblogic.ant.taskdefs.management.WLSTTask">
<classpath>
<pathelement location="${weblogic.jar.location}"/>
</classpath>
</taskdef>

<wlst debug="true" failonerror="true" filename="${weblogicscriptlocation}">
<classpath>
<pathelement location="${weblogic.jar.location}"/>
</classpath>
</wlst>

Android

Posted by arkgame