error upgrading aspectj-maven-plugin v1.8
Asked Answered
C

6

20

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

Chavira answered 7/10, 2015 at 16:7 Comment(2)
I found a bug in the plugin's Maven configuration and fixed it. Cross your fingers that my pull request will get into the next release.Slimsy
Would you terribly mind accepting and upvoting my answer? This question is still listed as unanswered and my answer really solves the root cause of the problem, no workaround needed.Slimsy
W
13

I had the same problem and I've just added in eclipse.ini the path to the JDK8.
In my case:

-vm
C:\Program Files (x86)\Java\jdk1.8.0_60\bin\javaw.exe

(must be before -vmargs)

Weakling answered 19/10, 2015 at 9:25 Comment(3)
it should be accepted as correct answer. JDK usually asks by default to install a JRE together and eclipse uses by default JRE if you don't point it on eclipse.ini to use JDK/jre.Rubble
Nut that is a path to a JRE.. no JDKMydriatic
Updated the pathWeakling
S
9

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.

Slimsy answered 4/12, 2016 at 10:42 Comment(3)
I verify that Mojo's AspectJ Maven Plugin version 1.9 does NOT display the described error message using Eclipse 4.6 Neon with JDK 1.8 update 101. Thanks.Kershaw
upgrading to AspectJ plugin 1.9 (from 1.8) in Spring Tool Suite 3.9 fixed my issue. Thanks.Rident
More specifically, I updated my pom as follows (changed from 1.8 to 1.10) and this worked for me:<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId><version>1.10</version>Costanzia
M
5

I solved the problem in eclipse by adding toolsjarSystemPath as a default vm argument

Windows-->Preferences-->Java-->InstalledJREs-->EditJRE Add default vm argument: -DtoolsjarSystemPath=%JAVA_HOME%\lib\tools.jar

Medullary answered 27/1, 2016 at 9:4 Comment(0)
B
3

I’m ashamed to admit that in my case this error was caused by wrong JAVA_HOME path: I point it out to jre, not jdk folder

Bicarb answered 18/7, 2016 at 9:28 Comment(0)
S
0

If you're from command line, you need to have a parameter passed to the maven command with the absolute path of the $JAVA_HOME/lib/tools.jar

So, the thing would end something like this:

mvn -DtoolsjarSystemPath=$JAVA_HOME/lib/tools.jar clean

In my case even a simple clean was failing.

Siloxane answered 2/10, 2021 at 1:18 Comment(0)
H
0

I was facing the same issue. Went to check my build path and realised its due to a lack of Maven Dependency in the library table. I follow here: Missing Maven dependencies in Eclipse project and matter was resolved. So perhaps check if Maven is present in the build path.

Halona answered 10/11, 2022 at 8:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.