> Date: Wed, 13 Jan 2016 16:29:03 +0200
> Subject: Re: Should I disable maven-compiler-plugin when using 
> aspectj-maven-compiler?
> From: dagansand...@gmail.com
> To: users@maven.apache.org
> 
> First, the link you gave redirects to a page saying CVS repositories have
> been migrated and it doesn't point forwardMG>complaining to the wrong person
MG>KINDLY ask the site admin of the site where this information is now 
hosted..MG>I would strongly suggest that your request to the site admin be more 
respectful than you are to me here
> 
> Second, the "proc" flag of the aspectj-maven-plugin is described also on
> the plugin's website
> http://www.mojohaus.org/aspectj-maven-plugin/compile-mojo.html#procMG>Glad to 
> hear that aspectj-maven-plugin has covered that base
> 
> Third, I don't see how this answers my questions? And which workaround does
> this apply to?MG>You have an approach which is the 30,000 foot view which is 
> what you need to go forwardMG>assuming you are using javac compiler?MG>your 
> end game is to implement javac with proc:only at some earlier phase to 
> generate the necessary classesMG>then later on in the build cycle implement 
> javac with proc:none at compile phase to do the actual compile for the new 
> classes
MG>The specific details on HOW you implement that using plain javac OR ANT OR 
maven OR Gradle is up to you 
MG>I dont know your environment since you didnt supply your environment details 
MG>also you did not supply your .gradle or build.xml or pom.xml so I cannot 
speculate which specific tasks/plugins would be usedMG>as there are 3 possible 
different distinctive ways to implement this solution
MG>if you dont understand implementation I would strongly suggest you 
RESPECTFULLY ask a senior resource on your team
MG>to craft a build script which will achieve this objective within the 
confines of your  .gradle/build.xml/pom.xml build environment
> 
>  
> On Wed, Jan 13, 2016 at 3:10 PM, Martin Gainty <mgai...@hotmail.com> wrote:
> 
> >   take a look athttp://
> > dev.eclipse.org/viewcvs/index.cgi/org.aspectj/?root=Tools_Project
> > find your way to this artifact:<groupId>org.aspectj</groupId>
> > <artifactId>aspectjtools</artifactId>  <packaging>jar</packaging>
> > <version>1.8.5</version>  <name>AspectJ tools</name>  <description>Tools
> > from the AspectJ project</description>  <url>http://www.aspectj.org</url>
> > take a gander at AjcTask.java and notice the setting of javac arg called
> > 'proc'
> > /**   * Controls whether annotation processing and/or compilation is
> > done.   * -proc:none means that compilation takes place without annotation
> > processing.   * -proc:only means that only annotation processing is done,
> > without any subsequent compilation.   */  public void setProc(String proc)
> > {    if (proc.equals("none")) {      cmd.addFlag("-proc:none", true);    }
> > else if (proc.equals("only")) {      cmd.addFlag("-proc:only", true);    }
> > }
> > -proc: {none,only}Controls whether annotation processing and/or
> > compilation is done. -proc:none means that compilation takes place without
> > annotation processing. -proc:only means that only annotation processing is
> > done, without any subsequent compilation.
> > javac -proc:only (needs to be set on any phase before compile such as
> > generate-sources) within aspectj environment this is enabled by argument
> > -Dorg.eclipse.jdt.core.compiler.generateClassFiles on command line
> >
> > javac -proc:none(needs to be set only on compile phase)
> > -Dorg.eclipse.jdt.core.compiler.generateClassFiles absent on command line
> >
> > HTH
> > Martin
> >
> >
> > > Date: Wed, 13 Jan 2016 13:42:53 +0200
> > > Subject: Re: Should I disable maven-compiler-plugin when using
> > aspectj-maven-compiler?
> > > From: dagansand...@gmail.com
> > > To: users@maven.apache.org
> > >
> > > Both, actually.
> > > In any case, using aspectj compiler through the maven-compiler-plugin
> > seems
> > > to be causing more issues (it depends on an older version of aspectj
> > tools,
> > > and raising it causes API errors) so it's definitely not the way for me.
> > >
> > > I'm guessing my issue comes mainly from the fact that
> > maven-compiler-plugin
> > > 3.1+ has an issue with incremental compilation, so a workaround is
> > > mandatory in the current situation...
> > > It is indeed peculiar that there isn't more info on that matter but then
> > > again I'm not sure how many people use aspectj and maven together
> > >
> > > Doing some more google work brought me to these:
> > > -
> > >
> > http://stackoverflow.com/questions/14614446/how-do-i-disable-the-maven-compiler-plugin
> > > -
> > >
> > http://stackoverflow.com/questions/24211943/aspectj-maven-plugin-declare-soft-how-to-compile
> > > - https://dev.eclipse.org/mhonarc/lists/aspectj-users/msg14431.html
> > >
> > > The last one is actually a post from the aspectj-users mailing list from
> > > about 2 years ago, asking about the same issue, although the person
> > didn't
> > > seem to get a response.
> > >
> > >
> > >
> > >
> > > On Wed, Jan 13, 2016 at 11:35 AM, Anders Hammar <and...@hammar.net>
> > wrote:
> > >
> > > > >
> > > > > Does this act differently though than the aspectj-maven-plugin? Does
> > it
> > > > > play well with AJDT and eclipse?
> > > > >
> > > >
> > > > I don't know; I don't use aspectj. Couldn't find any pointers on this
> > in
> > > > the aspact-maven-plugin docs so it might be the wrong path. However,
> > > > couldn't find any instructions on using your workaround either...:-)
> > > > As you stated "aspectj-compiler-plugin" in the subject, I thought that
> > you
> > > > wanted to use the aspectj compiler. But maybe I misunderstood and you
> > just
> > > > want to weave with aspectj?
> > > >
> > > > /Anders
> > > >
> > > >
> > > > >
> > > > >
> > > > > On Wed, Jan 13, 2016 at 10:59 AM, Anders Hammar <and...@hammar.net>
> > > > wrote:
> > > > >
> > > > > > Can't you just tell maven-compiler-plugin to use the aspectj
> > compiler?
> > > > > >
> > > > > >
> > > > >
> > > >
> > https://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
> > > > > >
> > > > > > /Anders
> > > > > >
> > > > > > On Wed, Jan 13, 2016 at 9:41 AM, Dagan Sandler <
> > dagansand...@gmail.com
> > > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I am in the process of updating my plugin definitions in all of
> > the
> > > > > > > projects I manage.
> > > > > > > Notably, I tried updating maven-compiler-plugin from 2.5.1 to
> > 3.3 but
> > > > > > > encountered an issue in a project that uses aspectj-maven-plugin.
> > > > > > >
> > > > > > > The issue is, it seems, that the maven-compiler-plugin is invoked
> > > > > before
> > > > > > > the aspectj-maven-plugin, and causes the build to fail.
> > > > > > >
> > > > > > > I have previously used a workaround for this issue by setting the
> > > > > > > aspectj-maven-plugin to execute in phase process-sources, so it's
> > > > > invoked
> > > > > > > before the maven plugin
> > > > > > > However, in maven-compiler-plugin 3.1+ there's this bug
> > > > > > > <https://issues.apache.org/jira/browse/MCOMPILER-209> which
> > causes
> > > > the
> > > > > > > maven-compiler-plugin to recompile all sources and to fail the
> > build,
> > > > > so
> > > > > > > you must set useIncrementalCompilation to *false*
> > > > > > >
> > > > > > > Another workaround I found before finding out about the
> > incremental
> > > > > build
> > > > > > > bug, is to disable the maven-compiler-plugin altogether in that
> > > > project
> > > > > > and
> > > > > > > let aspectj-maven-plugin do all the compilation by adding
> > > > > > > <execution>
> > > > > > > <id>default-compile</id>
> > > > > > > <phase>none</phase>
> > > > > > > </execution>
> > > > > > > to the maven-compiler-plugin definition
> > > > > > >
> > > > > > > Anyone knows the downsides of any of these workarounds? Is there
> > > > > another
> > > > > > > configuration that I should be using instead of these options?
> > > > > > >
> > > > > >
> > > > >
> > > >
> >
> >
                                          

Reply via email to