perform the weaving. So, referring to the example below, it would create projectC.jar
with all of projectA.jar's .class files.
The thing that really drives me nuts, it only copies .class files. No .properties
or .xml or anything. I _really_ want that to be fixed.
You are also right about the <injars> being deprecated for <inpath>, I had no idea.
Easy enough to replace though, and it supposedly works on directories as well.
This is for 1.2 right? Because so far all I've used is 1.1.1. I wasn't sure if
1.2 was released yet or if I had to build from cvs. I just checked the site, 1.2rc1
was made available last week.
Best to plan for that then. Do we need to keep settings for older versions? Or should
we make people get 1.2 since it has much better features?
Charlie
Carlos Sanchez wrote:
That's right, but now I have a doubt: when you weave a jar with <aspectj.weave> you don't weave directly the jar in the repository? Is it copied somewhere?
Also check the new AspectJ 1.2 that seems to have been improved and http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/dev guide/antTasks-iajc.html because injars has been deprecated.
Thanks
-----Mensaje original-----
De: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Enviado el: viernes, 23 de abril de 2004 2:33
Para: Maven Users List
Asunto: Re: aspectj plugin & maven 1.0 rc2
I should be able to get to this next week. I'm flexible with the <aspectj.weave> and <aspectj.weaveWith>. But I'm not exactly clear on what each one does.
ProjectA: creates projectA.jar - only .class files. ProjectB: creates projectB.jar - aspects and .class files. ProjectC: creates projectC.war - uses projectA.jar and projectB.jar
So, in ProjectC's project.xml we would have: -------------------------------------------------------------- ---------------- <dependencies> <dependency> <groupId>aspect-test</groupId> <type>jar</type> <artifactId>projectA</artifactId> <version>1.0</version> <properties> <war.bundle>true</war.bundle> <aspectj.weave>true</aspectj.weave> </properties> </dependency> <dependency> <groupId>aspect-test</groupId> <type>jar</type> <artifactId>projectB</artifactId> <version>1.0</version> <properties> <war.bundle>true</war.bundle> <aspectj.weaveWith>true</aspectj.weaveWith> </properties> </dependency> <dependency> <groupId>aspectj</groupId> <type>jar</type> <artifactId>aspectjtools</artifactId> <version>1.1.1</version> <properties> <classloader>root</classloader> </properties> </dependency> <dependency> <groupId>aspectj</groupId> <type>jar</type> <artifactId>aspectjrt</artifactId> <version>1.1.1</version> <properties> <classloader>root</classloader> <war.bundle>true</war.bundle> </properties> </dependency> </dependencies> -------------------------------------------------------------- ----------------
<aspectj.weave>: This would use the aspects in ProjectC and weave them into
projectB.jar?
<aspectj.weaveWith>: This will look in projectB.jar for aspects to use for
weaving in ProjectC classes?
Just wanted to be absolutely clear. I hope this is making sense. Let me know if I am on the mark or if I am off on these things. Thanks a lot.
Charlie
Carlos Sanchez wrote:
Charles,jueves, 22
Can you apply the patch I've made (
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MPASPECTJ-8 ) and then change aspectj:weave-internal and the xdocs to reflect your changes and submit it again to Jira?
I think the only thing we should think about are the name of the dependency properties. I had though about <aspectj.weave> and <aspectj.weaveWith> but, what do you think?
-----Mensaje original-----
De: Vincent Massol [mailto:[EMAIL PROTECTED] Enviado el:
parameters that comede abril de 2004 18:22 Para: 'Maven Users List' CC: [EMAIL PROTECTED] Asunto: RE: aspectj plugin & maven 1.0 rc2
Hi Charles / Carlos,
Carlos has sent a big patch a few days back. I'm still fighting to find some time to read it, analyze it and decide whether we should apply it as is or with some tweaks (I think we agree to remove the autoweave feature for example). There are several
only jars).into account, one of them being the fact that the new version of AspectJ supports weaving aspects into directories (and not
should alsoAnyway, I have to admit I am a bit overwhelmed and would appreciate help on this. If Carlos and you could talk this over and jointly submit a patch that satisfies everyone (possibly using the latest version of AspectJ), it would help tremendously. The patch
permanently? Itinclude updates to xdocs and the changes.xml file.
Many thanks -Vincent
aspecj-----Original Message----- From: Charles N. Harvey III [mailto:[EMAIL PROTECTED] Sent: 22 April 2004 18:11 To: Maven Users List Subject: Re: aspectj plugin & maven 1.0 rc2
A while back I inserted <injars> into my plugin.jelly file for the
plugin and its been going great. It gives me the abilityto weave an
aspect into a pre-compiled jar. This feature is availablewhen using
iajc
so it is not something I made up.that
Thing is, each time I upgrade or build from CVS I completely forget
I had added it and my builds stop working. Is there any way to getthis
added to the maven-aspectj-plugin/plugin.jelly file
is calledwould
be part of the weave-internal task.
<!-- Private goal used to that when the jar:jar postgoal
----------we
-->don't have to call aspectj:init and jar:jar twice --> <goal name="aspectj:weave-internal">
<!-- fork to avoid BCEL library version conflict with maven
sourceRootCopyFilter="${maven.aspectj.sourceRootCopyFilters}"<ant:iajc fork="true" debug="${maven.aspectj.debug}" outjar="${maven.aspectj.outjar}" injars="${maven.aspectj.injar.nonweaved}"
emacssym="${maven.aspectj.emacssym}">test="${dep.getProperty('aspect.injar')=='true'}">
<!-- Look for aspect libraries to weave into -->
<ant:injars>
<j:forEach var="artifact" items="${pom.artifacts}">
<j:set var="dep" value="${artifact.dependency}"/>
<j:if
<property><ant:pathelement location="${artifact.path}"/> </j:if> </j:forEach> </ant:injars>
</ant:iajc>
</goal>
It would require jars that are being weaved into to have a
defined in the project.xml. I have called this property"aspect.injar".
So:list good
<dependency> <groupId>myjar</groupId> <type>jar</type> <artifactId>myjar</artifactId> <version>2.0</version> <properties> <aspect.injar>true</aspect.injar> </properties> </dependency>
How 'bout it? Should I file this in JIRA? Is the mailing
enough?
Also, you can get rid of
copyInjars="true"
from the <ant:iajc> task since it is no longer required by
aspectj-1.1.1.
Let me know your thoughts, I would really like to see thisget added.
Thanks a lot.plugin to
Charlie
Vincent Massol wrote:
Yes, that's required. I guess we should add a check in the
the aspectjverify it's defined. Maybe you could file a JIRA issue on
[mailto:[EMAIL PROTECTED]plugin for this.
Thanks -Vincent
-----Original Message-----
From: Daniel Henrique Alves Lima
error seemsSent: 22 April 2004 00:11 To: Maven Users List Subject: Re: aspectj plugin & maven 1.0 rc2
I've added the following line in my project.xml and the
to
aspectj pluginstop :classes...
<aspectSourceDirectory>src/java</aspectSourceDirectory>
Daniel Henrique Alves Lima wrote:
Now i'm getting this "already defined" message for all my
Can be a configuration problem ? I don't have any
---------------------------------------------------------------------property defined in my project.properties and i'm trying to run "maven aspectj:compile" or just "maven aspectj".
[iajc] couldn't find aspectjrt.jar on classpath, checked: [iajc] /projects/new_project/database/RowIterator.jav a:14 The type RowIterator is already defined [iajc] public interface RowIterator extends Iterator { [iajc] Vincent Massol wrote:
-----------------------------------------------------------To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
---------
To unsubscribe, e-mail: [EMAIL PROTECTED]------------------------------------------------------------
For additional commands, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
