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
22
votes
3 answers

Mvn clean install tomcat7:deploy fails with "invalid byte tag in constant pool"

Every time that I run mvn clean install tomcat7:deploy in the command prompt, it fails. When I open the generated log file, it says that there is an invalid byte tag in constant pool. The file that it specifies is java/lang/CharSequence.class. Here…
Schizoreindeer
  • 229
  • 1
  • 3
  • 9
21
votes
5 answers

AspectJ Maven Plugin cannot compile my project

I try to use aspectj maven plugin for compile project with aspectj compiler and then I try to package classes into "war" file. Unfortunately, it doesn't work with following configuration (pom.xml):
dmitrievanthony
  • 1,501
  • 1
  • 15
  • 41
20
votes
6 answers

error upgrading aspectj-maven-plugin v1.8

Upgrading the maven plugin from 1.7 to 1.8 results in the following error message: [ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${toolsjarSystemPath} @ pom.xml /ash-domain line 1
aglavina
  • 375
  • 1
  • 5
  • 13
18
votes
1 answer

Spring + AspectJ weaving for java 8 using aspectj-maven-plugin

I'm migrating my project from java 7 to java 8 and the problem I have is related to aspectj weaving using aspectj-maven-plugin. I could configure successfuly the weaving using this plugin running on Java 6 and 7 according to Haus documentation. But…
Federico Piazza
  • 30,085
  • 15
  • 87
  • 123
17
votes
4 answers

Maven AspectJ plugin fails to build with Java 9 due to missing tools.jar

I switched my JDK version from 8 to 9 and the AspectJ plugin no longer works due to missing tools.jar: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.10:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.10 or one of…
MrkK
  • 873
  • 3
  • 12
  • 22
12
votes
2 answers

Aspectj bad version number warning in maven build

I am getting a warning during a maven build, that I would like to fix. The warning generated during a maven build: [INFO] --- aspectj-maven-plugin:1.4:compile (default) @ core --- [WARNING] bad version number found in…
NottmTony
  • 447
  • 1
  • 6
  • 28
12
votes
3 answers

How to Configure AspectJ in Android Studio

I am trying to configure AspectJ in Android Studio. But after all trial and error its not working ! Surprisingly I am able to make it work with Eclipse Kepler version The steps I followed for Android Studio Created sample Android Project File >…
Sreehari
  • 5,621
  • 2
  • 25
  • 59
12
votes
1 answer

AspectJ + Junit + Maven - pointcut recognized in tests but NoSuchMethodError: aspectOf() exception thrown

I have followed almost all JUnit + Maven + AspectJ questions here and even I am pretty sure I have everything set properly, I am unable to test it. I have a Maven module with just one aspect: @Aspect public class AssertionAspect { …
stewenson
  • 1,282
  • 3
  • 15
  • 34
10
votes
2 answers

AspectJ: How to weave an aspect library into a Java project

I build small library (Java and Maven) - using AspectJ. Library must be independent. Library deliver Aspects and Annotations. Function of library is - "call advice when executed a method with specific annotation". All is ok when I use everything in…
Patryk Kobus
  • 113
  • 1
  • 7
7
votes
1 answer

Does Mojo's AspectJ Maven Plugin work with jdk 9+?

I have a project that uses Mojo's AspectJ Maven Plugin. It works fine with jdk 8. When I try to switch to jdk14, the build fails with the following error: [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.11:compile (default)…
starboost
  • 93
  • 1
  • 3
7
votes
1 answer

Optimal @EnableTransactionManagement Configuration

I'm pretty confused by this topic and see very little advice in the Spring 4.x documentation. First off let me state that I can configure my project any way I want. Static weaving, compile time weaving, none, etc. I just want the optimal…
robert_difalco
  • 4,821
  • 4
  • 36
  • 58
6
votes
1 answer

aspectj-maven-plugin compilanceLevel for java 10

I've been trying to to compile a project that relies on aspectJ-maven-plugin it works fine with the compilanceLevel 1.9(java 9) but when it comes to java 10 apparently it is not supported? ERROR] Compliance options: [ERROR] -1.3 …
Eric Nascimento
  • 381
  • 3
  • 15
6
votes
1 answer

@Tansactional and @Aspect ordering

I would like to execute my code just before @Transactional transaction is started. @Aspect @Order(Ordered.HIGHEST_PRECEDENCE) //@Order(Ordered.LOWEST_PRECEDENCE) public class SynchronizerAspect { @Pointcut("execution(public *…
Marek Raki
  • 3,056
  • 3
  • 27
  • 50
6
votes
2 answers

Maven Aspectj plugin calls the JPA model generator again

I have a Maven project where I generate the JPA metamodel using the Hibernate metamodel generator.
Jens Baitinger
  • 2,230
  • 14
  • 34
6
votes
1 answer

AspectJ: Autowired fields are null in Initbinder

I just implemented AspectJ like described here: https://stackoverflow.com/a/10998044/2182503 This solution works fine, until I noticed that my @Autowired fields are null within @InitBinder. The fields are only null within the…
1
2 3
14 15