SpringRoo GWT脚手架Maven依赖重复错误

时间:2012-09-13 21:04:21

标签: java spring gwt maven spring-roo

我试图浏览本教程:

http://gwtsts.blogspot.sk/2011/03/part-ii-generating-gwt-project-using.html

因为我需要知道如何从现有数据库生成GWT前端(在我的案例中是Postgre,但这个例子也很适合我)。

这是我执行的pizzashop.roo的脚本:

project --topLevelPackage com.blogspot.gwtsts.pizzashop

persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId pizzashopexample

enum type --class ~.shared.PaymentType
enum constant --name CC_ONLINE
enum constant --name CASH_ON_DELIVERY
enum constant --name CC_ON_DELIVERY

entity jpa --class ~.server.domain.Topping --testAutomatically
field string --fieldName name --notNull --sizeMin 2

entity jpa --class ~.server.domain.Base --testAutomatically
field string --fieldName name --notNull --sizeMin 2

entity jpa --class ~.server.domain.Pizza --testAutomatically
field string --fieldName name --notNull --sizeMin 2
field number --fieldName price --type java.lang.Float
field set --fieldName toppings --type ~.server.domain.Topping
field reference --fieldName base --type ~.server.domain.Base

entity jpa --class ~.server.domain.PizzaOrder --testAutomatically
field string --fieldName name --notNull --sizeMin 2
field string --fieldName address --sizeMax 30
field number --fieldName total --type java.lang.Float
field enum --fieldName paymentType --type ~.shared.PaymentType
field date --fieldName deliveryDate --type java.util.Date
field set --fieldName pizzas --type ~.server.domain.Pizza

gwt setup

logging setup --level INFO

整个脚本执行没有任何问题。但是当我运行命令perform tests时,它会给我以下错误消息(某些依赖项已成功下载但构建失败并以错误结束):

[ERROR] Failed to execute goal org.datanucleus:maven-datanucleus-plugin:3.0.2:en
hance (default) on project pizzashop: Error executing DataNucleus tool org.datan
ucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: Plugin (Bundle)
"org.datanucleus.enhancer" is already registered. Ensure you dont have multiple
JAR versions of the same plugin in the classpath. The URL "file:/C:/Users/jakub/
.m2/repository/org/datanucleus/datanucleus-enhancer/3.1.0-m2/datanucleus-enhance
r-3.1.0-m2.jar" is already registered, and you are trying to register an identic
al plugin located at URL "file:/C:/Users/jakub/.m2/repository/org/datanucleus/da
tanucleus-enhancer/3.0.1/datanucleus-enhancer-3.0.1.jar." -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

我正在尝试在stackoverflow上找到的技巧来编辑datanucleus-core所在的pom.xml,具体是将标签<scope>runtime</scope>添加到datanucleus-core依赖,但结果是相同的。

我使用的是Windows 7 Ultimate 64位。 Spring Roo 1.2.2,apache maven 3.0.3,spring tools suite 3.0.0,vfabric-tc-server-developer 2.7.1。我已经设置了所有系统环境变量(JAVA_HOME,spring roo,maven)。

非常感谢你的帮助:)

我的pom.xml: pom.xml

0 个答案:

没有答案