[
https://issues.apache.org/jira/browse/ARIES-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907338#action_12907338
]
Bartosz Kowalewski commented on ARIES-373:
------------------------------------------
Hi David,
Of course it makes sense. The issue was that Equinox Aspects is a project in
Eclipse incubator. It's not being actively developed and I wasn't able to find
its artifacts in any public Maven repo. The only way to get its plugins is to:
a) download them from an Eclipse update site;
b) downlaod the 'Eclipse feature' package (zip) for Equinox Aspects, unpack it
and copy a subset of the bundles that are available in this zip;
c) get these bundles from an existing Eclipse IDE instance
I went with the approach that you can see in my patch, because I had problems
with finding the same set of four bundles (2 AspectJ ones and 2 Equinox Weaving
ones) on the Internet. Those AspectJ bundles are also osgified by guys from
Eclipse. I wasn't able to find exactly those versions of AspectJ bundles that I
saw working together in my Eclipse IDE with Eq. Weaving that I downloaded from
the Eq. Weaving website. To be honest, I hoped that you might know some Maven
repo where all these artfiacts can be fetched from and that you'll fix this
patch before commiting :).
What I can do is:
a) as you suggested, use ant triggered from Maven to download the Eq. Weaving
zip, unpack it and copy two bundles
b) use AspectJ bundles from Spring bundle repo and download them suing Maven
directly.
The issue is that I'm not sure if they will work with each other properly. As I
said, Eq. Weaving is not really an active project. It's in Eclipse incubator
and it hasn't been updated for a year. I thought that it is safer to use it
with the same bundles as the ones that are present in Eclipse IDE (where it was
probably well tested).
Thanks,
Bartek
> Sample implementention of AspectJ-based SPI mechanisms for SPI-Fly
> ------------------------------------------------------------------
>
> Key: ARIES-373
> URL: https://issues.apache.org/jira/browse/ARIES-373
> Project: Aries
> Issue Type: Improvement
> Environment: SPI-Fly
> Reporter: Bartosz Kowalewski
> Attachments: aries-373-updated.patch, ARIES-373.patch,
> org.aspectj.runtime-1.6.7.20100105084524.jar,
> org.aspectj.weaver-1.6.7.20100105084524.jar,
> org.eclipse.equinox.weaving.aspectj-1.0.0.200906171200.jar,
> org.eclipse.equinox.weaving.hook-1.0.0.200905261348.jar
>
>
> David Bosschaert some time ago contributed a set of Equinox Aspects-based
> examples showing how to use aspects to make SPI work inside an OSGi
> container. I promised to contribute an enhanced version of these mechanisms
> and integrate these into SPI-Fly /Maven projects, Pax Exam, etc./. I'll
> attach a patch with those changes in a moment.
> Few important notes:
> 1. This is not intended to be committed directly to Aries SVN. The only
> purpose of this patch is to provide initial impl that could be used when
> doing additional experiments and evaluation. The patch is dirty, I was in
> hurry when doing it and there are lots of ugly pieces of code inside :). If
> we decide to go with this approach, I'll prepare a clean patch once I'm back
> from vacation - in two weeks' time.
> 2. The problems that were identified in the discussion about using AspectJ in
> SPI-Fly haven't been resolved yet. This includes (but is not limited to):
> - being tightly coupled to Equinox; this piece of code is based on Equinox
> Aspects/Weaving; this will not work wit any other container
> - inability to tell AspectJ to run an aspect on behalf of other bundle; each
> bundle that wants to use these new features, needs to contain an aspect and
> other settings like a Require-Bundle header
> 3. This patch introduces a SPI-Consumer header and enhances the SPI-Provider
> header. A Pax Exam test show how to use this new functionality once you copy
> the aspect to your bundle and configure Require-Bundle header.
> 4. I haven't found the latest version of Equinox Weaving in any of publicly
> available Maven repos. That is why, these libraries will need to be copied
> manually to the itests project (to the weaverBundles subdirectory). I'll
> attach these bundles to this JIRA.
> This patch is huge, so I guess there might some issues with applying it. If
> you have problems with that, let me know and I'll try to generate it again.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.