Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Specifying a different sourcepath from sourceroots

There's an RFE on point:

  https://bugs.eclipse.org/bugs/show_bug.cgi?id=54941

There's some question whether mapping from binary to text
source is the responsibility of the compiler or the IDE
integration.  On one hand, the mapping is only required
for messages (Javac uses sourcepath to find other
sources that need to be compiled) and the sourcepath
information is mostly available to IDE's.  On the other
hand, it would be very nice if you get the same results
from Ant, the command-line compiler, and any IDE
integration.

If you're like me and you need this, you can use something
like the code in the patch attached to the bug to create
your own MessageHandler that maps the binary source location
back to sources in the specified sourcepath.  See iajc
taskdef and org.aspectj.tools.ajc.Main for the API's to
attach a custom MessageHandler.

If you want to complain loudly, reply here (or better, in the
bug). However, it's unlikely to be added to AspectJ 1.2 at this
late hour unless there's a real groundswell and a{nother?}
correct implementation submitted as a patch to the bug.

Wes

Gerard Davison wrote:

Hi,

I am using 1.2rc1 to integrate aspectj into our build process as a verification step. So before I run ajc I have the following directories:

   * modelers/src - the primary source code
   * modelers/classes - the built classes, output from build system
   * modelers/ajsrc - aspectj constraints, at the moment just the
     standard no println(..) aspect
   * modelers/ajclasses - the output directory for the processed classes

So when I run ajc I set "classes" the inpath and "ajsrc" as the sourceroots. This would seem to work, except for a compiler error that I am reporting separately (60862), but the compiler repeatedly complains about not being able to find the source code for the contents of "classes".

The problem is that there doesn't seem to be the equivalent of a javac "sourcepath" for the ajc compiler when working in this mode. I don't want to at "src" to the sourceroots as this would make ajc recompile the code again. Is this a bug, an enhancement request or have I just misread the instructions.

Thanks in advance for any feedback,

G.
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev




Back to the top