Welcome,
I have problem with packaging aspectj program. Using this piece of code in pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/log4j.properties</exclude>
</excludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.mkyong.core.utils.App</mainClass>
<classpathPrefix>dependency-jars/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<ajdtBuildDefFile>build-1-5.ajproperties</ajdtBuildDefFile>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- OTHER PLUGINS -->
</plugins>
</build>
Using this commands on console:
mvn aspectj:compile
mvn exec:java
Running program well with all aspects. But execute this route:
mvn package
java -jar target\<my-package>.jar
Hasn't worked. In exception is information about:
Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.Signature
What is the problem?