ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject <ant> and multiple targets
Date Fri, 07 Feb 2003 15:00:38 GMT
I have modified <ant> to support multiple targets like
	<ant target="target1,target2"/>
so the buildfile doesn´t have to parsed multiple times and
target-dependencies
should be


I have used the java.util.StringTokenizer for that. 


An "fc /L /N Ant.java Ant.java.original" gave me (on windows 2k):
***** Ant.java
  398:             if (target != null) {
  399:                 // Support for multiple targets separated by commas
  400:                 if (target.indexOf(",")>0) {
  401:                     java.util.StringTokenizer targetNames
  402:                         = new java.util.StringTokenizer(target, ",");
  403:                     java.util.Vector targets = new
java.util.Vector(targetNames.countTokens());
  404:
  405:                     while (targetNames.countTokens() > 0)
  406:                         targets.add(targetNames.nextToken());
  407:
  408:                     newProject.executeTargets(targets);
  409:                 } else {
  410:                     // single target
  411:                     newProject.executeTarget(target);
  412:                 }
  413:             } else {
  414:                 // default target
  415:                 newProject.executeTarget("");
***** ANT.JAVA.ORIGINAL
  398:             if (target != null) {
  399:                 newProject.executeTarget(target);
  400:             } else {
  401:                 newProject.executeTarget("");
*****

I have attached the Ant.java (modification based on Ant.java from CVS head
5.Feb 03 13:08). Should I spent
some more time for doc´s and code for contribution?


Jan Matèrne

 

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message