Community
Participate
Working Groups
We use Bitkeeper for our source control at my company which creates SCCS directories in our source. These directories confuse the ajc compiler and cause errors. It would be very useful if we could specify directories to prune (besides CVS). As suggested by Wes Isberg, perhaps a syntax like: ajc -sourceroots . -XomitSourceroots=SCCS,temp
*** Bug 49756 has been marked as a duplicate of this bug. ***
Just wanted to add that specifying the -sourceRoots option does not exclude **/CVS/** either. The workaround is to use nested <src> elements. As a result, sourceRootCopyFilter attribute to iajc cannot be used to copy through non-class resources. C:\work\aspectj\bugs\sourceroots-CVS>type Test.java public class Test { } C:\work\aspectj\bugs\sourceroots-CVS>mkdir CVS\Base # Simulating 'cvs edit Test.java' C:\work\aspectj\bugs\sourceroots-CVS>copy Test.java CVS\Base 1 file(s) copied. C:\work\aspectj\bugs\sourceroots-CVS>ajc -sourceroots . C:\work\aspectj\bugs\sourceroots-CVS\Test.java:1 The type Test is already defined public class Test { ^^^^ 1 error
reclassified as an enhancement request
(somewhat regrettably) I checked in a hack workaround to omit sccs and cvs directories when gathering sourceroots. It can be disabled by specifying -Dorg.aspectj.util.FileUtil.PERMIT_CVS=true on the java command line. Tests checked in as org.aspectj.systemtest.ajc150.SCCSFixTests. Properly, the fix belongs in BuildArgParser.collectSourceRootFiles(..) with support for a command-line option and proper documentation.
I was not aware that the the <iajc/> does not allow for traditional fileset features like exclude (but I will soon stumble into this limitation too). This is a VERY important feature if AspectJ is used in a normal business enviroment with CVS/Subversion. I would like this missing feature to have high priority!
Adrian, would you mark this bug FIXED? (In reply to comment #5) > I was not aware that the the <iajc/> does not allow for traditional fileset > features like exclude (but I will soon stumble into this limitation too). This > is a VERY important feature if AspectJ is used in a normal business enviroment > with CVS/Subversion. I would like this missing feature to have high priority! That's not the bug. iajc (the Ant task) does allow you to specify sources using filesets. The bug is that when using the ajc (compiler) sourceroots option, there is no way to prune directories. But since January, both CVS and SCCS are automatically pruned from sourceroots in ajc, so this bug is fixed for the CVS/SCCS case. I haven't seen a use case for other pruning that couldn't be handled using iajc filesets or by specifying files, so I think this bug should be closed. Someone who has a use case for more general pruning when using -sourceroots can reopen it for evaluation. In any case, the workaround is to specify the files directly, on the command line or using .lst files, so this would always be a convenience feature, not a necessary one.
resolved fixed as per wes' comment.