Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Ant
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Build.xml-Struktur== ===Project-Element=== '''<project '''['''name="'''<Name>'''"'''] ['''location="'''<Location>'''"'''] '''default="'''<DefaultTarget>'''"''' ['''basedir="'''<BaseDir>'''"'''] '''>''' {<Target>)}'''</project>''' {| border=1 cellpadding=2 cellspacing=0 |- |'''Attribute''' |'''Description''' |- |location |Sets the property to the absolute filename of the given file. If the value of this attribute is an absolute path, it is left unchanged (with / and \ characters converted to the current platforms conventions). Otherwise it is taken as a path relative to the project's basedir and expanded. |} ===Stardard-Properties=== <property environment="env" /> => ${env.PATH} ===Target-Element=== Ein Target enthält eine Menge von Tasks. '''<target name="'''<Name>'''"''' ['''depends="'''<Target> {''','''<Target>}'''"''' ['''if="'''<MustProperty>'''"'''] ['''unless="'''<MustNotProperty>'''"'''] ['''description="'''<Description>'''"'''] '''>''' {<Task>}'''</target>''' All other targets depend on "init," which means that "init" will always be run first. Ansonsten werden die Targets in der depends-Reihenfolge der Aufzählung ausgeführt. ===Task=== Ein Task ist ein Stück Code, das ausgeführt werden kann. Ein Task kann mehrere Attribute (oder Argumente, wenn man will) haben. Der Wert eines Attributs kann Referenzen auf eine Property enthalten. Diese Referenzierung wird aufgelöst, bevor der Task ausgeführt wird. Es gibt einen Satz von vorgefertigten Tasks. Some tasks use directory trees for the actions they perform. For example, the [javac|http://ant.apache.org/manual/CoreTasks/javac.html] task, which compiles a directory tree with .java files into .class files, is one of these directory-based tasks. Because some of these tasks do so much work with a directory tree, the task itself can act as an implicit [FileSet|http://ant.apache.org/manual/CoreTypes/fileset.html]. '*' matches zero or more characters, '?' matches one character. hen ** is used as the name of a directory in the pattern, it matches zero or more directories. For example: /test/** matches all files/directories under /test/, such as /test/x.java, or /test/foo/bar/xyz.html, but not /xyz.xml. There is one "shorthand" - if a pattern ends with / or \, then ** is appended. ====copy==== Beispiele: Copy a single file <copy file="myfile.txt" tofile="mycopy.txt"/> Copy a single file to a directory <copy file="myfile.txt" todir="../some/other/dir"/> Copy a directory to another directory <copy todir="../new/dir"> <fileset dir="src_dir"/> </copy> Copy a set of files to a directory <copy todir="../dest/dir"> <fileset dir="src_dir"> <exclude name="**/*.java"/> </fileset> </copy> <copy todir="../dest/dir"> <fileset dir="src_dir" excludes="**/*.java"/> </copy> Copy a set of files to a directory, appending .bak to the file name on the fly <copy todir="../backup/dir"> <fileset dir="src_dir"/> <globmapper from="*" to="*.bak"/> </copy> Copy a set of files to a directory, replacing @TITLE@ with Foo Bar in all files. <copy todir="../backup/dir"> <fileset dir="src_dir"/> <filterset> <filter token="TITLE" value="Foo Bar"/> </filterset> </copy> ====delete==== ====echo==== '''<echo''' ['''file="'''<Filename>'''"'''] ['''message="'''<Text>'''"''']'''>''' '''</echo>''' ====exec==== ====jar==== {| border=1 cellpadding=2 cellspacing=0 |- |destfile | |introduced after 1.4.1 |- |jarfile | |compatible 1.4.1 und 1.5.1 |- |basedir |.\\<Directory> | |} ====java ==== ====javac==== ====mkdir==== ====move==== ====replaceregexp==== * [https://ant.apache.org/manual/Tasks/replaceregexp.html task description] * uses [[RegularExpression|regular expressions]] ====sleep==== <sleep seconds="<Number>" />
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width