Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » AspectJ Maven and AjcClosure classes
AspectJ Maven and AjcClosure classes [message #1482137] Fri, 21 November 2014 14:22 Go to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,
I have an Eclipse Maven project with compile time weaving, based on Spring. When I compile my project in Eclipse, sometimes classes with suffix $AjcClosure are created, sometimes not. I don't understand why? It seem like the behaviour is random.


  • $AjcClosure are created, but they are not copied to Tomcat by AJDT m2e, so project is not working.
  • $AjcClosure are not created. Aspects and all project work ok in Tomcat.


I use Eclipse Kepler, AJDT 2.2.3e43, AJDT m2e 0.14.

Thanks for any help.

[Updated on: Wed, 17 December 2014 08:28]

Report message to a moderator

Re: AspectJ Maven and AjcClosure classes [message #1496688 is a reply to message #1482137] Wed, 03 December 2014 07:30 Go to previous messageGo to next message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
According to this advice http://aspectj.2085585.n4.nabble.com/AJDT-configurator-for-m2e-td3862183.html I have added a line with org.eclipse.ajdt.aspectpath to my .classpath

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
	<attributes>
		<attribute name="maven.pomderived" value="true"/>
		<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
       </attributes>
</classpathentry>


And $AjcClosure are created and they are copied to Tomcat, so the project is working OK.

However, the line is deleted every time I update Maven configuration. Is there any way to make AJDT, Maven and WTP working without manual edit of .classpath? Or is this a bug of AJDT or AJDT m2e?
Re: AspectJ Maven and AjcClosure classes [message #1514421 is a reply to message #1496688] Wed, 17 December 2014 09:26 Go to previous message
Ondrej Medek is currently offline Ondrej MedekFriend
Messages: 23
Registered: July 2009
Junior Member
Problem is probably that the target folder is not refreshed when $AjcClosure classes are created, see http://stackoverflow.com/questions/16283268/how-to-deploy-generated-resources-to-tomcat-with-m2e-wtp

When I manually refresh the target folder after build, or set Eclipse
Window > Preferences > Workspace > Refresh using native hooks or polling
then the $AjcClosure are properly copied into the Tomcat even without modyfying .classpath file.

Is this a bug of m2e or m2e-ajdt?
Previous Topic:org.eclipse.ui error
Next Topic:How many methods does a pointcut add?
Goto Forum:
  


Current Time: Fri Apr 19 20:51:33 GMT 2024

Powered by FUDForum. Page generated in 0.02839 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top