ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schmid <fsc.t...@spree.de>
Subject Problems using the Javac task class
Date Mon, 27 Jan 2003 15:55:22 GMT
Hi all,

I am using the Javac class in my code to compile a list of generated .java 
files during program execution.
It works as long as I don't set the includes (which results in all .java 
files in the srcDir provided being
compiled).

However, I wan't to compile only the files generated, so I am trying like 
this (where 'compiler' is an instance of Javac):

         StringBuffer s = new StringBuffer();
         for(int i=0; i<filesToCompile.length; i++){
             log.debug("include: " + filesToCompile[i]);
             s.append(filesToCompile[i] + "  ");
         }

         String includes = s.toString().trim();
         log.debug("includes: " + includes);
         compiler.setIncludes(includes);

where 'filesToCompile' contains the names of the files to compile (with 
.java extension).
Unfortunately, this doesn't work. No files are compiled.

I also tried

	s.append(srcDir + File.separatorChar + filesToCompile[i] + " ");

which doesn't work either.

I went through the sources of Javac, MatchingTask, FileSet and PatternSet, 
however I don't see why it doesn't
work.

Can anyone help me with this?

regards
felix


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


Mime
View raw message