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
1
vote
3 answers

mp4parser - how to start using?

I want to merge multiple videos sequentially and get one video with mp4parser but can't start using it... I added in file gradle - implementation 'org.mp4parser:isoparser:1.9.27' and following the example, it is impossible to find Movie() then I…
RusyaMed
  • 151
  • 2
  • 11
1
vote
0 answers

java.lang.NoSuchFieldError: ajc$cflowCounter$0

Hi I am using AspectJ maven plugin and weaved the classes successfully at compile time however I am getting following issue: java.lang.NoSuchFieldError: ajc$cflowCounter$0 Also pointcut as follows: @Pointcut("execution(* *(..)) &&…
1
vote
1 answer

Compiling with maven-compiler-plugin and aspectj-maven-plugin

When i use maven-apsectj-plugin and maven-compiler-plugin compile phase will execute both plugins compile goal. This results in compilation with javac first and then full recompilation with ajc. Is this double compilation necessary? It seems like i…
Yaroslav Buhaiev
  • 1,187
  • 11
  • 16
1
vote
1 answer

IntelliJ ApectJ post-compile time weaving

I have the following aspect: @Aspect public class DefaultStringAspect { @Around(value = "execution(* org.apache.commons.lang3.StringUtils.defaultString(..))") public Object defaultString(ProceedingJoinPoint pjp) { return "DEF"; …
aleshka-batman
  • 187
  • 1
  • 13
1
vote
2 answers

Does anyone have references on how to port aspectj based maven module to bazel

Currently I am porting a maven based project to bazel and looking for documentation on how to port aspectj-maven-plugin related configurations to bazel Ported java modules to bazel, tried adding jvmflags to tests java_library( …
Krishna
  • 19
  • 3
1
vote
2 answers

AspectJ Maven plugin corrupting Groovy classes built by GMaven

I am trying to run Groovy and AspectJ on a module but when I add AspectJ, the classes seem to return very diferent values than I expected: junit.framework.ComparisonFailure: null expected:<2011-04-03> but…
Mick Knutson
  • 2,297
  • 3
  • 25
  • 48
1
vote
1 answer

Xlint:adviceDidNotMatch warnings due aspectj-maven-plugin in pom.xml file

Below are the warnings I receive : Description Resource Path Location Type advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch] Location Type advice defined…
1
vote
2 answers

maven jar not including main in manifest

I had to revive an old project that worked about a year and a half ago, but now when I do: mvn clean install either on the command line or via eclipse, it compiles fine but does not add the main-class in the manifest AND I do have the proper…
Jerry Skidmore
  • 400
  • 2
  • 7
  • 20
1
vote
1 answer

How to run my java tests with AspectJ maven plugin

I want to log my tests through AOP. I have class AspectLogger where I have defined pointcut and advices. When I run aspectj:test-compile, in output I see that advices were added to tests. Like [INFO] Join point 'method-execution(void…
Igor Vlasuyk
  • 514
  • 2
  • 10
  • 22
1
vote
2 answers

Using AspectJ annotations in maven project: weaving is not working

I am trying to use AspectJ in a simple project without using Spring, and while I have seen similar questions and my code seems to be correct, I don't understand why it's not working. I'm using Eclipse Oxygen 4.7.3 (not using AJDT tools), JDK 7,…
1
vote
1 answer

Include AspectJ support to VS Code

In my current project I'm working with Java, Spring Boot and .aj files. However, the main problem about work with AspectJ is that there are not a lot of IDEs that supports this feature. Eclipse (and i think that netbeans too) supports the AspectJ…
1
vote
0 answers

aspectj weaving already compiled JAR artifacts for war web application

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…
Adrian
  • 3,321
  • 2
  • 29
  • 46
1
vote
0 answers

AspectJ Compiler problems with kotlin delegation in type hierarchy

NOTICE TLDR; I discovered that this was simply an environmental problem. The JAR with the kotlin code had old class files that caused unexpected problems that the compiler was 100% handling correctly. I think that there was another class file in the…
1
vote
1 answer

Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (default) on project greenhouse: Compiler errors:

I have done all the researches I can online to solve this problem but I still cannot figure it out. Could anyone help me solve this? I don't even know what is happening as I am new to programming. Let me know if you need any code else I will edit…
Leo Li
  • 73
  • 1
  • 3
  • 10
1
vote
1 answer

Is it possible to weave some classes from a jar while excluding the rest of the classes?

I am trying to to extend a 3rd lib code with new capabilities. And since I only need to inject some code around one method from one class, I figured I can either: Fork the project and apply my changes (seems sloppy, and will definitely require lots…
Younes Regaieg
  • 4,156
  • 2
  • 21
  • 37