Weitere ähnliche Inhalte
Ähnlich wie Any tutor (20)
Any tutor
- 5. buildfile (XML)
=
Project
Target Target Target
Task Task Task Task Task Task Task Task
- 7. Setup Basic Properties
of
Certain Project
but not necessary
- 8. •name
•default as Properties
•basedir
• description as Element
but not necessary
- 9. e.g.
<project name="myPro" default="build" basedir=".">
<description>This is my first project</description>
...
</project>
- 14. e.g.
2 <target name=”A” />
1 <target name=”B” />
3 <target name=”C” depends=”B, A” />
1 <target name=”A” />
2 <target name=”B” depends=”A”/>
3 <target name=”C” depends=”B, A” />
- 15. e.g.
<condition property="myTarget.run">
<and>
<available file="foo.txt"/>
<available file="bar.txt"/>
</and>
</condition>
=
if( fileExist(foo.txt) && fileExist(bar.txt))
setProperty(myTarget.run)
- 16. e.g.
<target name="myTarget" depends="myTarget.check" if="myTarget.run">
<echo>Files foo.txt and bar.txt are present.</echo>
</target>
<target name="myTarget.check">
<condition property="myTarget.run">
<and>
<available file="foo.txt"/>
<available file="bar.txt"/>
</and>
</condition>
</target>
- 19. dirname unjar
property
echo fail javadoc
javac java jar
checksum delete move
copy mkdir chmod manifest
- 20. e.g.
<property name="betadir" location="${basedir}/beta"/>
<property name=”alphadir” location=”${betadir}/alpha”>
- 22. e.g.
<property name="scala.dir" location="scala-2.8.0.r18549-b20090823020847"/>
<property name="scala.lib.dir" location="${scala.dir}/lib"/>
<path id="project.classpath">
<pathelement location="${scala.lib.dir}/scala-library.jar"/>
</path>
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<pathelement location="${scala.lib.dir}/scala-compiler.jar"/>
<pathelement location="${scala.lib.dir}/scala-library.jar"/>
</classpath>
</taskdef>
<target name="compile">
<mkdir dir="${cls.build.dir}"/>
<fsc srcdir="${src.dir}" destdir="${cls.build.dir}" classpathref="project.classpath"
force="never" deprecation="yes" unchecked="yes">
<include name="**/*.scala"/>
</fsc>
</target>