从github导入最新代码后出现maven错误

从github导入最新代码后出现maven错误,maven,Maven,在从githud存储库中提取最新代码后,我得到了以下信息 为org.codehaus.mo构建有效模型时遇到的问题 错误的完整描述如下 1在为构建有效模型时遇到问题 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

在从githud存储库中提取最新代码后,我得到了以下信息

为org.codehaus.mo构建有效模型时遇到的问题

错误的完整描述如下

1在为构建有效模型时遇到问题

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} @ 

我使用的是java1.8和STS3.6.4,最有可能的JAVA_HOME环境变量指向JDK而不是JRE。更改环境变量并重新启动Eclipse

aspectj maven插件包含以下内容:

<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>

标准刀具轮廓
真的
${java.home}/./lib/tools.jar
${java.home}/./lib/tools.jar
appleJdkToolsJar配置文件
假的
${java.home}/./Classes/Classes.jar
${java.home}/./Classes/Classes.jar
爪哇8
1.8
-Xdoclint:无

我认为失败的原因是activeByDefault不会触发,因为java8概要文件激活被触发。由于不正确的${java.home},将不会触发文件->存在条件${toolsjarsyst移情}将无法设置,尝试使用它将导致异常。

找到解决方案了吗?这个问题似乎与tools.jar在JDK中有关,而不是在JRE中。在我的例子中,我的java8jdk被搞砸了。一旦它被修复,我就把我的JAVA_主页指向JDK,一切都正常了。