我从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} @
Run Code Online (Sandbox Code Playgroud)
我使用的是java1.8和sts 3.6.4
JAVA_HOME 环境变量很可能指向 JDK 而不是 JRE。更改环境变量并重新启动 Eclipse。
spectj-maven-plugin 包含以下内容:
<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>
Run Code Online (Sandbox Code Playgroud)
我认为失败的原因是 activeByDefault 不会触发,因为 java8 配置文件激活被触发。由于 ${java.home} 不正确,file->exists 条件不会触发。${toolsjarSystemPath} 将不会被设置,并且尝试使用它会导致异常。
| 归档时间: |
|
| 查看次数: |
2944 次 |
| 最近记录: |