You could try prefixing that with file if using an absolute path:

> org.aspectj.weaver.loadtime.configuration=file:/full/path/to/aop.xml


If you have tracing turned on your will see if it picks up these files in 
references to a method called ‘parseDefinitions’.

But I also looked around a bit, found this:

https://eclipse.googlesource.com/equinox/rt.equinox.incubator/+/refs/tags/M20120905-1500/aspects/tests/org.eclipse.equinox.weaving.tests.performance/config.ini
 
<https://eclipse.googlesource.com/equinox/rt.equinox.incubator/+/refs/tags/M20120905-1500/aspects/tests/org.eclipse.equinox.weaving.tests.performance/config.ini>

and that ties up with what I see in that code, if you don’t specify the ‘file:’ 
prefix then it assumes it is a relative path and will attempt to access it via 
a getResources() call on the class loaders involved.

The fact that the .ini I just linked includes that setting makes me think it 
will work under OSGi.

cheers,
Andy


> On Apr 18, 2018, at 12:16 AM, Bogus Abuser <bogusabu...@gmail.com> wrote:
> 
> Hi Andy,
> Thanks for your response. I tried what you proposed but it didn't seem to 
> work.
> I added this property:
> 
> org.aspectj.weaver.loadtime.configuration=/full/path/to/aop.xml
> 
> And I have this in aop.xml:
> 
> <aspectj>
>     <weaver options="-warn:none -Xlint:ignore">
> 
>     </weaver>
> </aspectj>
> 
> If the above is correct then maybe your suspicion about possible 
> class-loading issue is also correct.
> Do you have other ideas how can I suppress warn/lint messages?
> 
> Cheers
> 
> 
> On Wed, Apr 18, 2018 at 1:09 AM, Andy Clement <andrew.clem...@gmail.com 
> <mailto:andrew.clem...@gmail.com>> wrote:
> I thought there was something in for that but I can't find it!
> 
> There is a property for pointing at a file URL that is your config file 
> (aop.xml):
> 
> org.aspectj.weaver.loadtime.configuration
> 
> But I'm not 100% sure how the class loader model under OSGi interferes with 
> the code that checks that property. Have you looked at Equinox Aspects that 
> discusses OSGi+AspectJ ( 
> https://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php
>  
> <https://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php>
>  - it might be a bit out of date).
> 
> Andy
> 
> On 17 April 2018 at 06:49, Bogus Abuser <bogusabu...@gmail.com 
> <mailto:bogusabu...@gmail.com>> wrote:
> Hi friends,
> I'm using AspectJ 1.8 in OSGi with LTW and I'm wondering how to turn off all 
> the Xlint messages.
> I've tried:
> 
> aj.weaving.verbose=false
> org.aspectj.weaver.showWeaveInfo=false
> org.aspectj.osgi.verbose=false
> 
> but didn't seem to help.
> 
> As far as I can see in the doc I can declare -Xlint:ignore in aop.xml but I'd 
> like to do the same with a system property. Is it possible?
> If not how can I use aop.xml in OSGi?
> 
> Cheers!
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users 
> <https://dev.eclipse.org/mailman/listinfo/aspectj-users>
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users 
> <https://dev.eclipse.org/mailman/listinfo/aspectj-users>
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to