Maven 1.x AspectJ Plugin

Weaving classes not jars, and many other features

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 3.0
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 1.0-rc1
    AspectJ 1.1.1
  • Number of attachments :
    3

Description

Ability to automatically weave aspects on the classes generated on java:compile
Ability to add dependencies on libraries with aspects.

Proposed new way to reuse aspects as done in ejb, cactus and war plugins

<dependency>
<groupId>groupid</groupId>
<artifactId>jarid</artifactId>
<version>jarversion</version>
<properties>
<aspectj.weave>true</aspectj.weave>
</properties>
</dependency>

although maintaining old way.

Also added installation of jar and snapshot with reusable aspects but not needed with this new way to define dependencies.

Updated and improved documentation, check it for more info, also in http://oness.sourceforge.net/maven-aspectj-plugin

(I've called it version 3.0)

Issue Links

Activity

Hide
. added a comment -

Updated changes.xml

Show
. added a comment - Updated changes.xml
Hide
. added a comment -

I suggest changing
<aspectj.weave>true</aspectj.weave>
to
<aspectj.weaveWith>true</aspectj.weaveWith>

so it's less confusing

Show
. added a comment - I suggest changing <aspectj.weave>true</aspectj.weave> to <aspectj.weaveWith>true</aspectj.weaveWith> so it's less confusing
Hide
. added a comment -

New full patch that cleans up code and uses AspectJ 1.2rc1.
Documentation added.
Added weaving of libraries.

Show
. added a comment - New full patch that cleans up code and uses AspectJ 1.2rc1. Documentation added. Added weaving of libraries.
Hide
Vincent Massol added a comment -

Thanks for the patch Carlos. I'm currently in Las Vegas, attending the TSSS2004 conference. I'll apply the patch in 3-4 days when I'm back if no one beats me to it.

Show
Vincent Massol added a comment - Thanks for the patch Carlos. I'm currently in Las Vegas, attending the TSSS2004 conference. I'll apply the patch in 3-4 days when I'm back if no one beats me to it.
Hide
Vincent Massol added a comment -

Hi Carlos,

I've looked at the patch and it looks very cool! I think there is a bug in the following code:

<j:if test="${aspectSourcesPresent == null}">
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<j:if test="${dep.getProperty('aspectj.weave')=='true' and dep.type=='jar'}">
<j:set var="aspectLibrariesPresent" value="true"/>
<j:break/>
</j:if>
</j:forEach>
</j:if>

<j:if test="${(aspectSourcesPresent == 'true') || (aspectLibrariesPresent == 'true')}">
<j:set var="shouldWeave" value="true"/>
</j:if>

Shouldn't this piece of code use the aspectj.weaveWith or aspectj.weaveInto properties rather?

Show
Vincent Massol added a comment - Hi Carlos, I've looked at the patch and it looks very cool! I think there is a bug in the following code: <j:if test="${aspectSourcesPresent == null}"> <j:forEach var="artifact" items="${pom.artifacts}"> <j:set var="dep" value="${artifact.dependency}"/> <j:if test="${dep.getProperty('aspectj.weave')=='true' and dep.type=='jar'}"> <j:set var="aspectLibrariesPresent" value="true"/> <j:break/> </j:if> </j:forEach> </j:if> <j:if test="${(aspectSourcesPresent == 'true') || (aspectLibrariesPresent == 'true')}"> <j:set var="shouldWeave" value="true"/> </j:if> Shouldn't this piece of code use the aspectj.weaveWith or aspectj.weaveInto properties rather?
Hide
Vincent Massol added a comment -

applied. Thanks!

Show
Vincent Massol added a comment - applied. Thanks!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
5m
Original Estimate - 5 minutes
Remaining:
5m
Remaining Estimate - 5 minutes
Logged:
Not Specified
Time Spent - Not Specified