Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ 1.5.2 Compiler Error?

Hi,

Bug 143903 is currently open to cover some limitations between the
iajc and javac tasks.
However, moving a source folder to your classpath doesnt mean that
AspectJ will be able to resolve the types in it - it will be looking
for .class files on the classpath, not .java or .aj files.  If the
aspects depend on your local codebase, you will need a built version
of your local codebase in order to compile the aspects.  So, you can
either put the local codebase in sourceroots (like you are at the
moment) or compile it earlier/separately and put it on the classpath.

Andy.

On 11/07/06, doug.gschwind@xxxxxxxxxxx <doug.gschwind@xxxxxxxxxxx> wrote:


Hello,

I am trying to weave into a third party jar an aspect that depends on my
local codebase, but I want to defer the compilation of my local codebase
until a later time and simply reference the previously woven jar file.
However, I am getting a compile error with that approach. The following ant
target works fine, but weaves into the third party jar and compiles my local
codebase at the same time:

<target name="weave.thirdparty.jar" depends="weave.setup">
  <iajc outjar="${woven_thirdparty_jar}" source="1.5"
target="1.5" debug="on" verbose="true"
XlintFile="${basedir}/xlint.properties" fork="true"
maxmem="512m">
   <classpath>
    <pathelement location="${aspectj_runtime_jar}"/>
   </classpath>
   <sourceroots>
    <pathelement location="${thirdparty_advice_src}"/>
    <pathelement location="${monitored_codebase_src}"/>
   </sourceroots>
   <inpath>
    <pathelement location="${original_thirdparty_jar}"/>
   </inpath>
  </iajc>
 </target>

If I move the <pathelement
location="${monitored_codebase_src}"/> element from
<sourceroots> to <classpath> though, I get a compilation error about an
unknown type from my local codebase when compiling one of the aspects I
intend to introduce.

Does this appear to be a compiler defect to anyone?

Thanks,

Doug
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users





Back to the top