broadleaf:转向mysql - 获取错误

时间:2015-12-24 15:06:49

标签: mysql broadleaf-commerce

我正试图从hsql迁移到mysql db for demosite。我已按照broadleaf网站中提到的说明进行操作,但我面临以下错误

Buildfile: B:\dummy\eclipse-my-workspace\DemoSite\site\build.xml
tomcat:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] [INFO] Scanning for projects...
[artifact:mvn] [INFO]                                                                         
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Building site 1.0
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Downloading: repo.maven.apache.org/maven2/mysql/mysql-connector-java/5.1.15-bin/mysql-connector-java-5.1.15-bin.pom
[artifact:mvn] [WARNING] The POM for mysql:mysql-connector-java:jar:5.1.15-bin is missing, no dependency information available
[artifact:mvn] [INFO] Downloading: repo.maven.apache.org/maven2/mysql/mysql-connector-java/5.1.15-bin/mysql-connector-java-5.1.15-bin.jar
[artifact:mvn] [INFO] ----------------------------------------------------------
Buildfile: B:\dummy\eclipse-my-workspace\DemoSite\site\build.xml
tomcat:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] [INFO] Scanning for projects...
[artifact:mvn] [INFO]                                                                         
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Building site 1.0
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Downloading: repo.maven.apache.org/maven2/mysql/mysql-connector-java/5.1.15-bin/mysql-connector-java-5.1.15-bin.pom
[artifact:mvn] [WARNING] The POM for mysql:mysql-connector-java:jar:5.1.15-bin is missing, no dependency information available
[artifact:mvn] [INFO] Downloading: repo.maven.apache.org/maven2/mysql/mysql-connector-java/5.1.15-bin/mysql-connector-java-5.1.15-bin.jar
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] BUILD FAILURE
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [INFO] Total time: 8.661 s
[artifact:mvn] [INFO] Finished at: 2015-12-24T18:57:34+05:30
[artifact:mvn] [INFO] Final Memory: 13M/31M
[artifact:mvn] [INFO] ------------------------------------------------------------------------
[artifact:mvn] [ERROR] Failed to execute goal on project site: Could not resolve dependencies for project com.mycompany:site:war:1.0: Failure to find mysql:mysql-connector-java:jar:5.1.15-bin in nexus.broadleafcommerce.org/nexus/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of public snapshots has elapsed or updates are forced -> [Help 1]

请帮忙。

2 个答案:

答案 0 :(得分:0)

很难说你提供的信息很少,但你的root pom.xml似乎是一个问题,你已经为mysql-connector指定了依赖关系。请参阅最新的broadleaf文档以切换到mysql - http://www.broadleafcommerce.com/docs/core/current/tutorials/getting-started-tutorials/switch-to-mysql-tutorial

然后在根项目上进行maven安装,那么你应该很好。

答案 1 :(得分:0)

错误说无法通过应用程序找到mysql:mysql-connector-java:jar:5.1.15-bin jar。

我相信,你需要在root pom.xml中添加mysql连接器的依赖项。构建完成后,只需确保tomcat / bin文件夹中的maven工具下载了mysql连接器。

希望这有帮助。

谢谢, Sridhar C