用maven创建spring项目的时候运行了mvn appfuse:full-source 之后修改 pom.xml文件的<jdbc.password/>和plugin hibernate3-maven-plugin之后运行mvn jetty:run系统不能正常运行,系统报错找不到表“user_role” 原因是不能删除hibernate3-maven-plugin插件的<executions>,删除了之后导致不能正常生成表,系统找不到该表,报错,所以应先mvn jetty:run ,这样运行的项目刚开始会乱码,但是没关系,运行了之后在修改插件hibernate3-maven-plugin的<executions>就可以了,把插件里面绑定的<executions>删除掉,然后就可以正常运行了,hibernate3-maven-plugin的配置如下:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>annotationconfiguration</implementation>
<!-- Use 'jpaconfiguration' if you're using JPA. -->
<!--<implementation>jpaconfiguration</implementation>-->
</component>
</components>
<componentProperties>
<drop>true</drop>
<jdk5>true</jdk5>
<propertyfile>${project.build.outputDirectory}/jdbc.properties</propertyfile>
<skip>${skipTests}</skip>
</componentProperties>
</configuration>
<executions>
<execution>
<phase>process-test-resources</phase>
<goals>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>