Building and running the Broadleaf Commerce demo site

按照[url=http://docs.broadleafcommerce.org/current/Getting-Started.html]Getting Started[/url]的指引,最后运行时还是出现了以下问题:

[artifact:dependencies] Downloading: com/ptp/core/1.0/core-1.0.jar from repository public releases at http://www.broadleafcommerce.org/nexus/content/repositories/snapshots/
[artifact:dependencies] Unable to locate resource in repository
[artifact:dependencies] [INFO] Unable to find resource 'com.ptp:core:jar:1.0' in repository public releases (http://www.broadleafcommerce.org/nexus/content/repositories/snapshots/)
[artifact:dependencies] Downloading: com/ptp/core/1.0/core-1.0.jar from repository central at http://repo1.maven.org/maven2
[artifact:dependencies] Unable to locate resource in repository
[artifact:dependencies] [INFO] Unable to find resource 'com.ptp:core:jar:1.0' in repository central (http://repo1.maven.org/maven2)
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
[artifact:dependencies] Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Unable to resolve artifact: Missing:
[artifact:dependencies] ----------
[artifact:dependencies] 1) com.ptp:core:jar:1.0
[artifact:dependencies]
[artifact:dependencies] Try downloading the file manually from the project website.
[artifact:dependencies]
[artifact:dependencies] Then, install it using the command:
[artifact:dependencies] mvn install:install-file -DgroupId=com.ptp -DartifactId=core -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file
[artifact:dependencies]
[artifact:dependencies] Alternatively, if you host your own repository you can deploy the file there:
[artifact:dependencies] mvn deploy:deploy-file -DgroupId=com.ptp -DartifactId=core -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[artifact:dependencies]
[artifact:dependencies] Path to dependency:
[artifact:dependencies] 1) com.ptp:site:war:1.0
[artifact:dependencies] 2) com.ptp:core:jar:1.0
[artifact:dependencies]
[artifact:dependencies] ----------
[artifact:dependencies] 1 required artifact is missing.
[artifact:dependencies]
[artifact:dependencies] for artifact:
[artifact:dependencies] com.ptp:site:war:1.0
[artifact:dependencies]
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies] central (http://repo1.maven.org/maven2),
[artifact:dependencies] public releases (http://www.broadleafcommerce.org/nexus/content/repositories/snapshots/)


但实际上com.ptp:core:jar已经install到本地仓库了,那么为什么不能找到这个依赖呢?
打开ant的详细日志,即运行时加上-v参数,可以看到:

[code]
Using local repository: C:\Users\Administrator\.m2\repository
[/code]
而我本地使用的库存路径是:F:\MavenRepository\m3\repository
那么问题就找到了,是因为没有使用正确的本地库存,所以在build.xml的<artifact:dependencies>加上settingsFile="${maven.home}/conf/settings.xml",问题得到解决。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值