5
回答
AppFuse的代码检出
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

有人使用maven来把AppFuse的tapestry的代码下载到本地,然后使用eclipse打开吗?

我弄了好半天都没整成功,不好意思,我问题出在:test目标总是过不去。

谁能帮帮忙,给个详细一点的步骤。官网的那个总是出错,晕了。

 

出错位置的信息大概是这样的

alter table user_role drop foreign key FK143BF46A4FD90D75;

alter table user_role drop foreign key FK143BF46AF503D155;

drop table if exists app_user;

drop table if exists role;

drop table if exists user_role;

create table app_user (id bigint not null auto_increment, account_expired bit not null, account_locked bit not null, address varchar(1

create table role (id bigint not null auto_increment, description varchar(64), name varchar(20), primary key (id)) ENGINE=InnoDB;

create table user_role (user_id bigint not null, role_id bigint not null, primary key (user_id, role_id)) ENGINE=InnoDB;

alter table user_role add index FK143BF46A4FD90D75 (role_id), add constraint FK143BF46A4FD90D75 foreign key (role_id) references role

alter table user_role add index FK143BF46AF503D155 (user_id), add constraint FK143BF46AF503D155 foreign key (user_id) references app_u

[WARNING] 2 errors occurred while performing <hbm2ddl>.

[ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.user_role' doesn't exist

[ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.user_role' doesn't exist

[INFO]

[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ demo ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- dbunit-maven-plugin:1.0-beta-3:operation (test-compile) @ demo ---

312 [main] INFO org.dbunit.database.DatabaseDataSet -

        database name=MySQL

        database version=5.0.22-community-nt

        database major version=5

        database minor version=0

        jdbc driver name=MySQL-AB JDBC Driver

        jdbc driver version=mysql-connector-java-5.1.10 ( Revision: ${svn.Revision} )

        jdbc driver major version=5

        jdbc driver minor version=1

 

[INFO]

[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ demo ---

举报
阎王他爹
发帖于7年前 5回/1K+阅
共有5个答案 最后回答: 6年前

[WARNING] 2 errors occurred while performing <hbm2ddl>.

[ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.user_role' doesn't exist

[ERROR] Error #1: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'demo.user_role' doesn't exist

我今天尝试了下,编译过了的。创建项目的时候不会出错,我用的是命令

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-light-spring-archetype -DarchetypeVersion=2.1.1-SNAPSHOT -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse

然后是导入eclipse中,命令是:

mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse  -Dwtpversion=1.0,我用的是maven2.0

之前用maven3的时候也出错,后来看官网上用的是maven2。这里会有个小小的问题,依赖的问题,在.classpath文件中,修改成slf4j-log4j12-1.6.1.jar,原来好像1.4.2的。我也在试用中,希望能帮到你

顶部