Vincent, fair point.  Seems we need aspects/interception applied to goals, so users of 
maven can customize behaviour as they please.

Cheers,
Mike.

> -----Original Message-----
> From: ext Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: 27 September, 2003 11:07
> To: 'Maven Users List'
> Subject: RE: Compiling a WAR with aspects - how?
> 
> 
> Hi Mike,
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: 27 September 2003 09:58
> > To: [EMAIL PROTECTED]
> > Subject: RE: Compiling a WAR with aspects - how?
> > 
> > Vincent, thanks for this.  I saw maven.compile.aspects here:
> > 
> http://maven.apache.org/reference/plugins/java/properties.html . Like
> you
> > I did not find it in any b10 plugin.  So I changed the java 
> plugin to
> do
> > this:
> > 
> >     <goal name="java:compile">
> >         <j:choose>
> >             <j:when test="${maven.compile.aspects}">
> >                 <echo>Compiling with aspect support</echo>
> >                 <attainGoal name="aspectj"/>
> >             </j:when>
> >             <j:otherwise>
> >                 <echo>Compiling without aspect support</echo>
> >                 <attainGoal name="java:compile_actual"/>
> >             </j:otherwise>
> >         </j:choose>
> >     </goal>
> > 
> > I think that is nicer, because then I can just do "maven 
> war" and the
> > decision about whether to use ajc or javac is not something 
> I have to
> > worry about.  I figured this is what maven.compile.aspects was meant
> to
> > do.  What ya reckon?
> 
> Please see my email titled "[Proposal] Interface plugin" that I sent
> today on the Maven developer mailing list.
> 
> I'm not a fan of the change you made because it ties the java 
> plugin to
> the aspectj plugin and is not scaleable (what happens when I'm
> developing a maven plugin on my business project at work and I want to
> use my own goal for java compilation - for whatever reason?).
> 
> Thanks!
> -Vincent
> 
> > 
> > Cheers,
> > Mike.
> > 
> > > -----Original Message-----
> > > From: ext Vincent Massol [mailto:[EMAIL PROTECTED]
> > > Sent: 26 September, 2003 22:24
> > > To: 'Maven Users List'
> > > Subject: RE: Compiling a WAR with aspects - how?
> > >
> > >
> > > Ok, I've had a look at the maven b10 aspectj plugin. First, I
> haven't
> > > found any maven.compile.aspects property either in the aspectj
> plugin
> > > nor in the java plugin.
> > >
> > > You simply need to call aspect:compile (or aspectj for short). For
> > > example, here's what you have to do to generate an aspected war:
> > >
> > > maven clean aspectj war
> > >
> > > This will compile the source code with aspectj. Then a trick will
> > > happen... the war plugin will call java:compile but as javac
> > > will verify
> > > the timestamp of the generated classes vs the timestamp of the
> source
> > > classes, it will not recompile the classes and the war 
> will then be
> > > created.
> > >
> > > <ot>
> > > Actually, this looks better than the new aspectj plugin I
> > > have committed
> > > this week. I tried to do binary weaving using aspectj 1.1 but this
> is
> > > only possible on jars and thus it is no longer working on 
> wars, etc.
> > > I'll upgrade the plugin this week end to make it work again on
> sources
> > > instead of bytecode.
> > > </ot>
> > >
> > > Thanks
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: Vincent Massol [mailto:[EMAIL PROTECTED]
> > > > Sent: 26 September 2003 17:56
> > > > To: 'Maven Users List'
> > > > Subject: RE: Compiling a WAR with aspects - how?
> > > >
> > > > Forget what I said then. The "new" version is the one 
> in CVS HEAD.
> I
> > > > don't remember how the aspectj plugin in beta 10 worked.
> > > I'll need to
> > > > check that later on (you just need to read the 
> plugin.jelly file -
> a
> > > > very useful trick to understand how a plugin works BTW).
> > > >
> > > > -Vincent
> > > >
> > > > > -----Original Message-----
> > > > > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> > > > > Sent: 26 September 2003 16:53
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: RE: Compiling a WAR with aspects - how?
> > > > >
> > > > > Vincent,
> > > > >
> > > > > Thanks for the quick reply.  I am working with beta-10, just
> > > > downloaded it
> > > > > now.  But I am happy to go back to an earlier version if
> > > you reckon
> > > > that
> > > > > will work.  Can you tell me which version works?
> > > > >
> > > > > Thanks,
> > > > > Mike.
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: ext Vincent Massol [mailto:[EMAIL PROTECTED]
> > > > > > Sent: 26 September, 2003 17:50
> > > > > > To: 'Maven Users List'
> > > > > > Subject: RE: Compiling a WAR with aspects - how?
> > > > > >
> > > > > >
> > > > > > Are you using the new aspecj plugin or the old one? With the
> new
> > > one
> > > > > > this is currently known limitation (I'm working on it but
> > > > > > it'll take at
> > > > > > least 1-2 weeks before I get it solved).
> > > > > >
> > > > > > Thanks
> > > > > > -Vincent
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > > > > > Sent: 26 September 2003 16:00
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: Compiling a WAR with aspects - how?
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Can anybody guide me on how to compile a WAR file
> > > > > containing aspects?
> > > > > I
> > > > > > have set "maven.compile.aspects" to true, and I have a .aj
> > > > > file in my
> > > > > src
> > > > > > tree, but it compiles using javac.  Any advice?  Haha - that
> was
> > > > > > unintended.
> > > > > >
> > > > > > Thanks,
> > > > > > Mike.
> > > > > >
> > > > > >
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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