Questions tagged [aspectj-maven-plugin]

Handles AspectJ usage within Maven.

Handles AspectJ usage within Maven.

The following functionalities are provided: weaving of aspects (or existing aspects from libraries) with the test and/or main classes, weaving of pre-existing jars and ajdoc reporting.

Check the official usage page for a first look at it.

More Info

212 questions
5
votes
1 answer

How to use AspectJ Maven for binary weaving after Javac + Lombok phase

I have a project that uses compiled aspects and weaves them at compile time. I want to add Lombok, but unfortunately AJC is not supported by Lombok. Since this project doesn't have any sources of aspects on its own i configured AspectJ Maven plugin…
Yaroslav Buhaiev
  • 1,187
  • 11
  • 16
5
votes
1 answer

Maven + AspectJ weaving for Java8

I Cannot mvn package with the minimal sample below. Eclipse (Mars.2 Release 4.5.2) compiles and weaves without a problem. What do I have to do to make it work? The output: [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ test…
hansi
  • 2,278
  • 6
  • 34
  • 42
4
votes
2 answers

AspectJ advice does not fire in Maven multi-module setup

I'm trying to do AOP with Aspectj, but I don't know why is not executing my aspect, it just runs the main class. Is the first time I do this, so I might be doing something wrong. This is my code: The Aspect: @Aspect public class YourAspect { …
Motomine
  • 4,205
  • 5
  • 20
  • 23
4
votes
2 answers

Eclipse aspectj-maven-plugin missing tools.jar

I have a project that uses aspectj-maven-plugin: org.codehaus.mojo aspectj-maven-plugin 1.8 In eclipse(mars) I try to import the project as a maven project but I get error below. problem was encountered while building the effective model…
bobK
  • 704
  • 2
  • 7
  • 24
4
votes
2 answers

Using AspectJ Without Spring on Maven

I am still beginner in Java. I would like to build a simple Maven project and implement AspectJ to monitor some stuffs. I followed this tutorial and this tutorialbut it all points to use Spring in the Maven, which will complicate some stuffs in the…
Ihsan Haikal
  • 1,085
  • 4
  • 16
  • 42
4
votes
1 answer

IntelliJ ajc: how to make exclusions from aspectj-maven-plugin work?

I'm using the ajc compiler in IntelliJ, as well as the aspectj-maven-plugin, where I declare the following exclusions: org.codehaus.mojo aspectj-maven-plugin
Guillaume
  • 1,814
  • 1
  • 13
  • 29
4
votes
0 answers

Aspectj getting compile error when using the Java 8 class Supplier

I'm trying to use some nifty lazy logging tricks in my logging layer but AspectJ is choking on it. I have a facade in front of log4j. Here's the code: public void debug ( Supplier message ) { if( isDebugEnabled() ) { debug(…
darrickc
  • 1,872
  • 6
  • 27
  • 38
4
votes
1 answer

Compile-time aspects throwing NoSuchMethodError in Spring Boot

I am getting an error when running my "compile-time-weaver" classes from Maven on a JAR file that is included in my Spring Boot 1.2.2 WAR. So, I have a jar, ctms-components.jar, that I run my aspect (e.g., a method timing profiler) on using MAVEN. …
Jason
  • 2,006
  • 3
  • 21
  • 36
3
votes
2 answers

How to resolve java.lang.ClassNotFoundException: org.aspectj.lang.ProceedingJoinPoint exception?

Hey guys I am getting the following error on Spring-Boot when running an App I have: java.lang.IllegalStateException: Failed to load ApplicationContext at…
3
votes
2 answers

Aspectj BootstrapMethodError when using Java 8 stream API

so here i am - running a spring application with spring roo behind. i use to cut my controllers into aspects, so my main controller will look like this: @Controller @RequestMapping("/apples") @SessionAttributes(types = {Apple.class}) public class…
user1386375
  • 223
  • 2
  • 4
  • 18
3
votes
1 answer

How to configure Maven to compile current AWS SWF code

For a good recent version of AWS SDK such as 1.11.28, what do I put in my pom.xml so that Maven can weave and compile everything? This topic is discussed in several places, but all answers I can find are YEARS OLD and I can only get them to work…
MartinThurn
  • 327
  • 1
  • 3
  • 13
3
votes
1 answer

Dependency Error AspectJ Maven Plugin Installation For com:sun:tools:jar

I would like to run the Maven project that I have on https://github.com/ihsanhaikalz/testMaven in the Eclipse 4.5 (Mars) but it gave me an error in the pom.xml as follow: 1 problem was encountered while building the effective model for …
Ihsan Haikal
  • 1,085
  • 4
  • 16
  • 42
3
votes
1 answer

Jacoco code coverage affected by AspectJ compile time weaving

I am using maven to build my current project. I have Jacoco for code coverage and aspectJ for compile time weaving for my aspects. Right now I am facing the issue where aspectJ weaved code affecting the code coverage. It is 100% when we don't weave…
3
votes
0 answers

Warnings when using aspectj in my Maven project

I’m trying to use aspect seaving in my Maven/Spring (3.2.11.RELEASE) project. I have this configured for my plugin … org.codehaus.mojo aspectj-maven-plugin
Dave
  • 15,639
  • 133
  • 442
  • 830
3
votes
3 answers

advice defined has not been applied : Aspectj Pointcut

I'm trying to create an annotation to log all methods in annotated class, but I have a problem with my pointcut, it's not applied (AspectJ version 1.7.4, aspectj-maven-plugin version 1.7). (advice defined in com.test.util.log.Logger has not been…
Anas Lachheb
  • 441
  • 4
  • 17
1
2
3
14 15