I'm trying to wave org.apache.camel-camel-xmpp-2.20.2.jar maven artifact so that in the end my web application (war packaging) to include it into WEB-INF/lib. After building I'm decompiling target/my-web-app-exploded-war/WEB-INF/lib/org.apache.camel-camel-xmpp-2.20.2.jar/org/apache/camel/component/xmpp/XmppMessage.class hoping to find my modification or at least some aspecj processing trace but I don't.
Q: what should I do in order to have org.apache.camel-camel-xmpp-2.20.2.jar changed according to my aspect?
Using java 8, aspectj 1.8.9.
excerpt from building log:
[INFO] --- aspectj-maven-plugin:1.10:compile (default) @ ddcapplication-ddcwebservice ---
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.BatchProcessingEnvImpl
Lombok supports: sun/apple javac 1.6, ECJ
<unknown source file>:<no line information>
[WARNING] advice defined in org.apache.camel.component.xmpp.XmppMessageAspect has not been applied [Xlint:adviceDidNotMatch]
/home/adrianpetre/SAGS/DDCWorkspace/ddc/ddcapplication/ddcwebservice/src/main/java/org/apache/camel/component/xmpp/XmppMessageAspect.aj:16
src/main/java/org/apache/camel/component/xmpp/XmppMessageAspect.aj:
package org.apache.camel.component.xmpp;
public aspect XmppMessageAspect {
pointcut newInstancePointcut():
call(public * org.apache.camel.component.xmpp.XmppMessage.newInstance());
Object around(): newInstancePointcut() {
return new XmppMessage();
}
}
src/main/resources/META-INF/aop.xml:
<aspectj>
<weaver options="-verbose -showWeaveInfo">
<include within="org.apache.camel.component.xmpp.XmppMessage"/>
</weaver>
<aspects>
<aspect name="XmppMessageAspect"/>
</aspects>
</aspectj>
aspectj-maven-plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration combine.self="override">
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
<privateScope>true</privateScope>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<complianceLevel>${maven.compiler.target}</complianceLevel>
<xmlConfigured>src/main/resources/META-INF/aop.xml</xmlConfigured>
<weaveMainSourceFolder>false</weaveMainSourceFolder>
<weaveDependencies>
<weaveDependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xmpp</artifactId>
</weaveDependency>
</weaveDependencies>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<!--
I tried with these too:
generate-resources, compile, prepare-package, package
-->
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
My pom.xml includes:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xmpp</artifactId>
<version>2.20.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
</dependency>