5

I get the following after i pull the latest code from the githud repository.

problem encountered while building effective model for org.codehaus.mo

The full description of the error is below.

1 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 am using java1.8 and sts 3.6.4

Jens
  • 67,715
  • 15
  • 98
  • 113
java2890
  • 201
  • 1
  • 4
  • 10

1 Answers1

0

Most likely JAVA_HOME environmental variable points to JDK instead of JRE. Change the environment variable and restart Eclipse.

aspectj-maven-plugin contains following:

<profile>
  <id>standardToolsJar-profile</id>
  <activation>
    <activeByDefault>true</activeByDefault>
    <file>
      <exists>${java.home}/../lib/tools.jar</exists>
    </file>
  </activation>
  <properties>
    <toolsjarSystemPath>${java.home}/../lib/tools.jar</toolsjarSystemPath>
  </properties>
</profile>
<profile>
  <id>appleJdkToolsJar-profile</id>
  <activation>
    <activeByDefault>false</activeByDefault>
    <file>
      <exists>${java.home}/../Classes/classes.jar</exists>
    </file>
  </activation>
  <properties>
    <toolsjarSystemPath>${java.home}/../Classes/classes.jar</toolsjarSystemPath>
  </properties>
</profile>
<profile>
  <id>java8</id>
  <activation>
    <jdk>1.8</jdk>
  </activation>
  <properties>
    <additionalparam>-Xdoclint:none</additionalparam>
  </properties>
</profile>

I think the reason this fails is that activeByDefault will not trigger because java8 profile activation is triggered. file->exists condition will not trigger because of incorrect ${java.home}. ${toolsjarSystemPath} will not get set, and attempt to use it will cause the exception.

Teemu Ilmonen
  • 316
  • 1
  • 5
  • The tools.jar is in the JDK, not the JRE. In my case, my Java8 JDK was messed up. Once it was fixed I pointed my JAVA_HOME at the JDK and everything just worked. – Dave Jul 08 '16 at 17:18