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
2
votes
1 answer

Strange issue with aspectj-maven-plugin's compile goal

I have a spring roo project that I can build and run under sts/eclipse. However, when I run maven [mvn package], I systematically get the following errors: [INFO] Scanning for projects... [INFO] …
balteo
  • 23,602
  • 63
  • 219
  • 412
2
votes
1 answer

Exceptions not caught inside @Around (AspectJ)

My idea is to use AspectJ to catch exceptions in annotated methods and if any exceptions are thrown, the annotated method should try to run again. I have mostly followed this tutorial…
Samuel
  • 2,430
  • 5
  • 31
  • 41
2
votes
1 answer

Not able to bind plugin goals to maven lifecycle phases

I am using maven sql plugin. I am using the plugin to setup the my test db before executing integration tests. Here is my plugin configuration from my project pom. When I execute mvn clean install I expect the plugin goals to execute. But they are…
Prashant Kalkar
  • 602
  • 1
  • 7
  • 19
1
vote
1 answer

java.lang.IllegalStateException: Per-clause not recognized: pmAspect

I have a problem with the configuration tag. I have added aspectjrt.jar and aspectjweaver.jar, but my setup still is not working. org.aspectj aspectjweaver
1
vote
1 answer

Need to exclude AspectJ closure classes from Jacoco coverage

We need to use AspectJ compile time weaving and that is creating the AjcClosure classes. Somehow the package weaving is not working for us. We need to exclude these AjcClosure classes from the coverage calculation in jacoco maven plugin as it has…
1
vote
1 answer

Aspect not getting called on non-spring maven project

I'm using Java 8, testng, maven and selenium for UI automation frame work and trying to use aspectj to execute aspects before and after for switching iframes(entry and exit) when any method in an object is called. Aspect never gets called when i…
gamelover
  • 15
  • 4
1
vote
1 answer

Aspectj with Lombok

There are two different projects in which we need to use AspectJ. Plugin in pom.xml: org.codehaus.mojo aspectj-maven-plugin 1.10
Mary
  • 35
  • 5
1
vote
1 answer

Integrate Spring AOP as a maven dependency in a spring boot application

Application 1 : (Contains AOP code. A Spring boot application) LogAspect.Java @Aspect @Component public class LogAspect { private final Logger log = LoggerFactory.getLogger(this.getClass()); …
1
vote
1 answer

Aspectj weaving : how to create a jar with dependencies

I use the aspectj-maven-plugin in order to weave my aspect in the existing dependencies of my project (in my case, the org.apache.spark jars). Than I use the maven-assembly-plugin to generate a standalone jar containing all the dependencies. The…
1
vote
2 answers

NoSuchMethodException: com.aspectj.in.spring.boot.aop.aspect.auditlog.interceptor.LoggingInterceptorAspect.aspectOf()

I have a code that uses AspectJ. I use the compile-time weaving mode. During context initialization, I get an error. Although everything worked before that. annotation @Retention(RUNTIME) @Target(METHOD) @Documented public @interface…
skyho
  • 1,438
  • 2
  • 20
  • 47
1
vote
0 answers

aspectj - pointcut on interface not getting triggered on Implementation class handle

I have following code where my pointcut is based on annotation on interface. It does not work if object variable on caller method is defined as implementation class. But if I cast (same object) it to Interface then it works !! package sample; public…
Jags
  • 799
  • 7
  • 19
1
vote
1 answer

aspecj accessing sun packages in java 11

I am using ValidatorException class which is inside the package sun.security.validator.ValidatorException in java 11. But I am getting the following error : AJC compiler errors: The type sun.security.validator.ValidatorException is not…
1
vote
1 answer

AspectJ inside a testing framework

I'm trying to apply a cross cutting concern which is logging with AspectJ and a test framework called Katalon which uses Groovy and Java. I found that the best weaving type appropriate here is load-time weaving which requires a META-INF folder and…
1
vote
1 answer

Could not find artifact com.sun:tools:jar:14.0.1

I upgraded my Mac OS from Sierra to Catalina. Ever since I did that, my work environment has been broken. When I run maven verify on my local, I get this error - Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.9:compile (default) on…
Sankalp
  • 1,182
  • 2
  • 17
  • 22
1
vote
1 answer

External library load time weaving as library

I have a jar with a main class. I execute it with command java -jar my.jar This main jar depends on another.jar (e.g. joda-time.jar). Now I want to intercept a method of another.jar and say I want to print log. By the way, I want to use my.jar as…
Ricardo Cristian Ramirez
  • 1,194
  • 3
  • 20
  • 42