Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] [iajc] How to weave aspects into class directory structures rathe r than a jar

Hi -

> Unfortunatly we don't know
> who to get the aspects weaved into directorys containing class files.

There are (at least) two ways to go:

(1) ajc replaces compile:
- ajc compiles base and aspects

This is supported using the ${build.compiler} property,
assuming you can conditionally add the extra aspects.

(2) Separate weaves:
- produce binary aspects
- javac compile
- zip the results of that into some jar file results.jar
  removing all the classes in the dest dir
- ajc weave aspects plus results.jar,
  outputting classes to the dest dir
- when running tests, run against dest dir
  and binary aspects

This is provisionally supported in the task in the
current tree using the XWeaveDir option.  However, there's
also talk of including this feature in the next release,
as a -inpath option that is like -injars but also takes
directories.

Wes

http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/faq.html#q:buildingsource


Rademacher Tobias wrote:

Dear AspectJ Team,

thank you for the great tool.

Last week I had an email session with Vincent Massol author of the maven
aspectj plugin.

His current not released plugin version supports the new iajc ant tasks.
Unfortunatly we don't know
who to get the aspects weaved into directorys containing class files. It
seems that this is currenlt only possible with jars.
This would break the Unit-Test integration of maven, as you cannot test the
aspects you weaved in your
classes. So the standard usage aspectj in maven would be:

1) java:compile (compile the complete clases of a project
2) postgoal of java:compile (weave in the aspect using aspectj maven plugin)
3) test:test (run all unit tests __including__ the woven aspects)

Can you give us some hints so that we can soothly integrated aspectj into
maven?

Thx for your efforts

Toby

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




Back to the top