[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] useage of -Dorg.aspectj.weaver.loadtime.configuration
|
Hi,
That option is for specifying the location of the config file
(typically aop.xml) when you don't have it in one of the expected
places. A typical aop.xml file looking like this:
<aspectj>
<aspects>
<aspect name="MyAspect"/>
</aspects>
</aspectj>
and normally the loadtime weaver will expect to find it in the
META-INF folder (so META-INF/aop.xml).
By specifying that config option you can change where it is:
java -ea -Xbootclasspath/p:../out/classes/production/boot -Xmx192m
-XX:MaxPermSize=150m -Xmx512m
-Dorg.aspectj.weaver.loadtime.configuration=someSpecialDirectory/aop.xml
-javaagent:C:\aspectj1.6\lib\aspectjweaver.jar
I agree it might be nicer if you could squish a simple aop.xml into a
single command line option and remove the need for the config file.
cheers,
Andy
On 20 April 2012 13:35, trhouse <trhouse@xxxxxxxxx> wrote:
> IN the resource I have, the Manning book AspectJ In Action, it mentions only
> in passing that it's possible to use the runtime option
> -Dorg.aspectj.weaver.loadtime.configuration to specify the exact files to be
> used during LoadtimeWeaving.
>
> Unfortunately no examples are given and I can't locate any documentation on
> the AspectJ site regarding this option.
>
> My questions is what exactly would a specification of a particular aspectJ
> file look like? For instance, here's a hypothetical runtime invocation:
>
>
>
>>>java -ea -Xbootclasspath/p:../out/classes/production/boot -Xmx192m
>>> -XX:MaxPermSize=150m -Xmx512m -javaagent:C:\aspectj1.6\lib\aspectjweaver.jar
>
> and with additional specification of the aspects, I *think* it turns into
> this:
>
>>>java -ea -Xbootclasspath/p:../out/classes/production/boot -Xmx192m
>>> -XX:MaxPermSize=150m -Xmx512m
>>> -javaagent:C:\aspectj1.6\lib\aspectjweaver.jar
>>> -Dorg.aspectj.weaver.loadtime.configuration ????
>
>
>
> What do I type at the ????? The FQN of the aspect ? The path+ FQN to the
> aspect? If I want more than one aspect do I separate them with anything like
> a comma or a semicolon or a space?
>
> Thanks!
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>