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,
> >
> >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: 
> jueves, 22 
> >>de 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 
> parameters that come 
> >>into account, one of them being the fact that the new version of 
> >>AspectJ supports weaving aspects into directories (and not 
> only jars).
> >>
> >>Anyway, 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 
> should also 
> >>include updates to xdocs and the changes.xml file.
> >>
> >>Many thanks
> >>-Vincent
> >>
> >>    
> >>
> >>>-----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
> >>>      
> >>>
> >>aspecj
> >>    
> >>
> >>>plugin and its been going great.  It gives me the ability
> >>>      
> >>>
> >>to weave an
> >>    
> >>
> >>>aspect into a pre-compiled jar.  This feature is available
> >>>      
> >>>
> >>when using
> >>iajc
> >>    
> >>
> >>>so it is not something I made up.
> >>>
> >>>Thing is, each time I upgrade or build from CVS I completely forget
> >>>      
> >>>
> >>that
> >>    
> >>
> >>>I had added it and my builds stop working.  Is there any way to get
> >>>      
> >>>
> >>this
> >>    
> >>
> >>>added to the maven-aspectj-plugin/plugin.jelly file 
> permanently?  It
> >>>      
> >>>
> >>would
> >>    
> >>
> >>>be part of the weave-internal task.
> >>>
> >>>
> >>>  <!-- Private goal used to that when the jar:jar postgoal 
> is called
> >>>      
> >>>
> >>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
> >>>      
> >>>
> >>-->
> >>    
> >>
> >>>        <ant:iajc fork="true" debug="${maven.aspectj.debug}"
> >>>            outjar="${maven.aspectj.outjar}"
> >>>            injars="${maven.aspectj.injar.nonweaved}"
> >>>
> >>>      
> >>>
> >>sourceRootCopyFilter="${maven.aspectj.sourceRootCopyFilters}"
> >>    
> >>
> >>>            emacssym="${maven.aspectj.emacssym}">
> >>>
> >>>          <!-- 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
> >>>      
> >>>
> >>test="${dep.getProperty('aspect.injar')=='true'}">
> >>    
> >>
> >>>                <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
> >>>      
> >>>
> >><property>
> >>    
> >>
> >>>defined in the project.xml.  I have called this property
> >>>      
> >>>
> >>"aspect.injar".
> >>    
> >>
> >>>So:
> >>>
> >>>        <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
> >>>      
> >>>
> >>list good
> >>    
> >>
> >>>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 this
> >>>      
> >>>
> >>get added.
> >>    
> >>
> >>>Thanks a lot.
> >>>
> >>>
> >>>Charlie
> >>>
> >>>
> >>>Vincent Massol wrote:
> >>>
> >>>      
> >>>
> >>>>Yes, that's required. I guess we should add a check in the
> >>>>        
> >>>>
> >>plugin to
> >>    
> >>
> >>>>verify it's defined. Maybe you could file a JIRA issue on
> >>>>        
> >>>>
> >>the aspectj
> >>    
> >>
> >>>>plugin for this.
> >>>>
> >>>>Thanks
> >>>>-Vincent
> >>>>
> >>>>
> >>>>
> >>>>        
> >>>>
> >>>>>-----Original Message-----
> >>>>>From: Daniel Henrique Alves Lima
> >>>>>          
> >>>>>
> >>[mailto:[EMAIL PROTECTED]
> >>    
> >>
> >>>>>Sent: 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
> >>>>>          
> >>>>>
> >>error seems
> >>to
> >>    
> >>
> >>>>>stop :
> >>>>>
> >>>>>   <aspectSourceDirectory>src/java</aspectSourceDirectory>
> >>>>>
> >>>>>
> >>>>>Daniel Henrique Alves Lima wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>          
> >>>>>
> >>>>>>  Now i'm getting this "already defined" message for all my
> >>>>>>
> >>>>>>
> >>>>>>            
> >>>>>>
> >>>>classes...
> >>>>
> >>>>
> >>>>        
> >>>>
> >>>>>>  Can be a configuration problem ? I don't have any
> >>>>>>            
> >>>>>>
> >>aspectj plugin
> >>    
> >>
> >>>>>>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]

Reply via email to