[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] Cflow and enums
|
Oops!! You are right, we forgot
to update the ANT task to accept the new
java source level. I will do
that now. In the meantime, there is a way to pass
the option through if you use a .lst
file, so if your ANT task looked like this:
<project name="simple-example"
default="compile" >
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement
location="c:/aspectj1.5.0-dev/lib/aspectjtools.jar"/>
</classpath>
</taskdef>
<target name="compile"
>
<iajc sourceroots="src"
classpath="c:/aspectj1.5.0-dev/lib/aspectjrt.jar"/>
</target>
</project>
you can move the options into a .lst
file and add the -1.5 flag to it:
Here is my x.lst:
-sourceroots
src
-1.5
And then change the ANT task to :
<project name="simple-example"
default="compile" >
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement
location="c:/aspectj1.5.0-dev/lib/aspectjtools.jar"/>
</classpath>
</taskdef>
<target name="compile"
>
<iajc argfiles="x.lst"
classpath="c:/aspectj1.5.0-dev/lib/aspectjrt.jar"/>
</target>
</project>
But, if you can wait - the fix for
the ANT task to allow through source="1.5"
should be available this afternoon.
Andy.
"Nitzan Volman"
<nitzan@xxxxxxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx
19/01/2005 10:28
Please respond to
aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| RE: [aspectj-users] Cflow and enums |
|
I am using iajc ant task.
how can i specify the "-1.5"
flag equivalent there?
using source=1.5 does not work
...
-----Original Message-----
From: aspectj-users-admin@xxxxxxxxxxx [mailto:aspectj-users-admin@xxxxxxxxxxx]
On Behalf Of Andrew Clement
Sent: Tuesday, January 18, 2005 7:33 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Cflow and enums
Hi,
'Cant find type' is perhaps our most painful error message as in many
cases it omits any useful context. As you are using enums and a recent
dev build, I presume you are binary weaving some aspects into some java5
code you have previously built with javac? Can you download the most
recent dev build and give it a go compiling completely from source? Since
last nights build the ajc dev builds can now process all Java 5 features
from source if you supply the '-1.5' flag. You should run ajc on
a 1.5
JRE if you are going to use 1.5 features.
It is only looking for the types in doing it's analysis, it won't
necessarily weave into them - are you able to ensure they are on
the classpath (they don't have to be on the inpath or anything) to
keep type resolution happy?
Perhaps think of it like this, in order to compile any Java
program you need rt.jar (or equivalent) and any other classes
you reference on your classpath so the java compiler can
perform type analysis. Ajc is expecting the same (even if binary
weaving), it needs access to types you have referenced in
order to determine what is/isnt a match.
cheers,
Andy.
---
Andy Clement
AspectJ
clemas@xxxxxxxxxx
"Nitzan Volman"
<nitzan@xxxxxxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx
18/01/2005 16:52
Please respond to
aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| [aspectj-users] Cflow and enums |
|
Hi,
I have encountered the following problem.
When defining a pointcut which includes either
cflow or call it seems the weaver attempts to find/advise every enum I
defined in my code,
and fails with the following message:
..\MyClass.class [error] can't find type …MyEnum
(no source information available)
I am using a Dev build downloaded a few days
ago.
What am I doing wrong?
/Nitzan