Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Developers List »

AW: ProjectHelper (was Re: EasyAnt project)

Jan Materne

2008-10-30


Author LoginPost Reply
>My "build file" is going to look like this (I'm making up half of it):
>
>@(protected)")
>public class BuildFile extends JavaFrontBuildFile {
>   public BuildFile(Project p) {
>     super(p);
>   }
>
>   @Target
>   public void echo() {
>     getProject().log("Hello world");
>   }
>
>   @Target(Name="-setproperty")
>   public void setProperty() {
>     taskBuilder().newProperty().withName("world").andValue("world")
>       .execute();
>   }
>
>   @Target(Depends="-setproperty")
>   public void moreComplexExample() {
>     taskBuilder().newEcho().withMessage("Hello
${world}").execute();
>   }
>}


Looks like Leafcutter: https://leafcutter.dev.java.net/

<target name="backup" depends="init" if="backup.enabled">
 <property name="source.dir" value="src/main"/>
 <copy todir="home/backups" verbose=true>
   <fileset dir=${source.dir}" includes="**/*.txt"/>
 </copy>
</target>

public void backup(boolean enabled){
 init();
 if (enabled){
   File sourceDir = new File("src/main");
   TaskRunner.run("copy todir=home/backups verbose=true (fileset
dir=${1} includes=**/*.txt)", sourceDir);
 }
}


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.