Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse aspectj-maven-plugin missing tools.jar [duplicate]

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 for org.codehaus.mojo:aspectj-maven-plugin:1.8 [ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${toolsjarSystemPath} @

I have tried adding toolsjarSystemPath to my properties in my Settings.xml. No luck. I have tried adding "-vm C:\Program Files\Java\jdk1.7.0_79\lib" to eclipse.ini. Again, no luck. Does anyone know any other solutions for this problem? I have set my JAVA_HOME to: "C:\Program Files\Java\jdk1.7.0_79"

I have no clue anymore... The solutions of [error upgrading aspectj-maven-plugin v1.8

[1]: error upgrading aspectj-maven-plugin v1.8 don't work

like image 938
bobK Avatar asked Dec 18 '22 17:12

bobK


2 Answers

As I already wrote in another answer (but StackOverflow answers which are just links get deleted, so I repeat myself here):

I found a problem in AspectJ Maven plugin and fixed it. My pull request was finally merged and is contained in the new plugin version 1.9. Just upgrade your POM and enjoy.

P.S.: The real problem is in Eclipse, but it was easier to put a workaround into the Maven plugin than to get it fixed upstream.

like image 171
kriegaex Avatar answered Jan 13 '23 11:01

kriegaex


What worked for me, was removing all JRE's and only have a JDK installed. This removed the problem, as apparently Eclipse uses the JRE by default.

like image 20
bobK Avatar answered Jan 13 '23 12:01

bobK