Community
Participate
Working Groups
In Eclipse the JDT compiler enables different source folders in the same project to be built into separate output folders. The AJDT project has had several bugs raised requesting this feature for AspectJ projects. This requires some compiler changes to be able to implement.
Upping the severity as lots of people are hitting this. I'm going to put a temporary dialog in AJDT to warn people when this situation is detected
we're not going to make 1.5.0 with this, but will try to get something for AJDT right afterwards.
This would also be a useful feature for tests with load-time weaving. Then you could define one set of production aspects in src/META-INF/aop.xml and just add some testing aspects to testsrc/META-INF/aop.xml, allowing separate maintenance. Of course even better for that use case would be automatically running load-time weaving with the generated list of aspects (which doesn't work for me in AJDT...)
I need this feature as well.
Funny, for some reason I can't vote for this bug because the link is not there (is this a bug in the bug report tool? :-))
Re comment #5: No, it's a feature :) See bug 119593 - voting has to be enabled per project, and the default now seems to be off. I had to request voting to be enabled for AJDT.
take a look for 1.5.2
Matt, I've implemented initial support for this feature. ProjectProperties now has an additional method, getOutputLocationManager(). If this returns a non-null value, the location manager will be asked for output locations for compilation results and resources. You'll need to implement an OutputLocationManager: public interface OutputLocationManager { File getOutputLocationForClass(String compilationUnitName); File getOutputLocationForResource(String resourceName); } See the javadoc comments in the interface in CVS for details. We can iterate on this if it doesn't quite fit your needs...
Sounds good, I'll pull it into AJDT and see if I can connect it with JDT's separate output folder settings.
Adrian, this is looking promising. Some minor comments: - We have to check for output folders each time you call getOutputLocationManager() as we don't know when they might change, so it would be more efficient if you only called it once each build, not twice. - The String arg to getOutputLocationForClass() seems to be the absolute file, which is fine, but wasn't obvious from the javadoc (fully qualified compilation unit name could be taken as e.g. com.foo.ClassName). So as this and the resourceName are really files, wouldn't be better for the arg to be a File instead of a String? - In AJDT we don't need to distinguish classes from other resources - so either the interface could be reduced to a single method, or we can just delegate one to the other in AJDT.
ok great. I'll look into those today, get some test cases in place for generated closure classes etc. and then hopefully get this support finished off from the AspectJ side.
work now completed and committed to CVS: * getOutputLocationManager only called once * parameter type changed to File * but I left in the separate resource method - it's easy to delegate as you say See org.aspectj.systemtest.incremental.tools.OutputLocationManagerTests for an example of a project that writes the contents on one source folder to "target/main/classes" and the contents of a second source folder to "target/test/classes".
fixed as of May-19, forgot to close out the bug report at the time.