ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: If-Else For FileSets
Date Mon, 29 Sep 2003 17:03:27 GMT
Patterns support if and unless in ant 1.5.4 and higher (I dont know about
earlier versions)

from the manual :
http://ant.apache.org/manual/CoreTypes/patternset.html


<patternset id="sources">
  <include name="std/**/*.java"/>
  <include name="prof/**/*.java" if="professional"/>
  <exclude name="**/*Test*"/>
</patternset>

Antoine

-----Urspr√ľngliche Nachricht-----
Von: Vikas Phonsa [mailto:VPhonsa@suz.com]
Gesendet: Montag, 29. September 2003 18:41
An: 'Ant Users List'
Betreff: If-Else For FileSets


Hi Everybody,
I'm trying to make an ant script that would scan several different Project
folders, generate javadocs and place the docs in different destination
folders for each project. The scr and destination folders are under
different directory structures

Src: Projects/devSystem/Project1
     Projects/devBR/Project2

Destination: Javadoc/devSystem/Project1
		 Javadoc/devBR/Project2

I know if-else task exists in ant-contrib. But can I implement some if-else
functionality to do a selection based on directory structure or names so
that the docs go to the appropriate folders. Below is the script that I
could use to generate docs if all projects and docs were under the folder
where my build script is located:



<project name="build" default="init" basedir=".">
<target name="init">
<javadoc packagenames="com.suz.*"
           destdir="${basedir}/javadocs1"
           author="true"
           version="true"
           use="true"
           windowtitle="Test API">
<fileset dir="${basedir}" defaultexcludes="yes">
      <include name="**/src/com/**" />
</fileset>
</javadoc>
</target>
</project>




Any ideas, suggestions?

Thanks

Vikas






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message