【发布时间】:2014-06-28 13:11:59
【问题描述】:
我的 settings.xml 中有以下内容
<profile>
<id>default</id>
<activation>
<activeByDefault>true></activeByDefault>
</activation>
<properties>
<eclipse.location>/Applications/eclipse</eclipse.location>
</properties>
</profile>
但是我在我的项目中的 pom.xml 中的这一行不断收到错误:
<systemPath>$(eclipse.location)/plugins/com.google.appengine.eclipse.sdkbundle_${appengine.target.version}/appengine-java-sdk-${appengine.target.version}/lib/impl/appengine-local-runtime.jar</systemPath>
项目构建错误:com.google.appengine:appengine-local-runtime:jar 的“dependencies.dependency.systemPath”必须指定绝对路径,但为 $(eclipse.location)/plugins/com.google.appengine。 eclipse.sdkbundle_1.9.6/appengine-java-sdk-1.9.6/lib/impl/appengine-local-runtime.jar
从 mvn clean 的输出中,我可以看到 settings.xml 文件已被读取。
[DEBUG] Reading global settings from /usr/local/apache-maven/apache-maven-3.2.1/conf/settings.xml
[DEBUG] Reading user settings from /Users/xxx/.m2/settings.xml
[DEBUG] Using local repository at /Users/xxx/.m2/repository
但我得到与上面相同的错误:
[ERROR] 'dependencies.dependency.systemPath' for com.google.appengine:appengine-local-runtime:jar must specify an absolute path but is $(eclipse.location)/plugins/com.google.appengine.eclipse.sdkbundle_1.9.6/appengine-java-sdk-1.9.6/lib/impl/appengine-local-runtime.jar @ line 274, column 16
【问题讨论】:
-
你不会失败
<activeByDefault>true></activeByDefault>这看起来不对。 -
我建议不要使用 systemPath。您最好开始使用存储库管理器并将您的工件放在那里。