appFuse 2.1.0 跳過表刪除重建操作

在網上搜了好久發現的都是些好舊的方法大多不能用了 今天瀏覽pom文件的時候忽然發現這麼一塊:

                         <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>target/classes/jdbc.properties</propertyfile>
						<skip>${skipTests}</skip>
					</componentProperties>
				</configuration>
				<executions>
					<execution>
						<phase>process-test-resources</phase>
						<goals>
							<goal>hbm2ddl</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>${jdbc.groupId}</groupId>
						<artifactId>${jdbc.artifactId}</artifactId>
						<version>${jdbc.version}</version>
					</dependency>
				</dependencies>
			</plugin>
原來這個修改表的測試操作是可以跳過的,只要把上面的
<skip>${skipTests}</skip>
中的
${skipTests}
改成true就可以了,但是貌似更好的方法是在執行run或者install的命令的時候加一個參數,如下圖:


這樣就可以不用修改pom文件了,而且在需要的時候只要去掉這個參數就可方便的重新建立表結構了



不知道自己是不是又小白了…………貌似大蝦們都會這一步……= =!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章