Skip to content

Commit 9fbb219

Browse files
author
Calvin
committed
update archetype
1 parent 7bcb464 commit 9fbb219

File tree

24 files changed

+527
-481
lines changed

24 files changed

+527
-481
lines changed

support/maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<directory>bin</directory>
6262
<includes>
6363
<include>**/*.bat</include>
64+
<include>**/*.sh</include>
6465
</includes>
6566
</fileSet>
6667
</fileSets>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
@echo off
2-
echo [INFO] Use maven jetty-plugin run the project.
3-
4-
cd %~dp0
5-
cd ..
6-
7-
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8-
call mvn jetty:run -Djetty.port=8080
9-
10-
cd bin
1+
@echo off
2+
echo [INFO] Use maven jetty-plugin run the project.
3+
4+
cd %~dp0
5+
cd ..
6+
7+
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8+
call mvn jetty:run -Djetty.port=8080
9+
10+
cd bin
1111
pause
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "[INFO] Use maven jetty-plugin run the project."
4+
5+
cd ..
6+
7+
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8+
9+
mvn jetty:run -Djetty.port=8080
10+
11+
cd bin
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
@echo off
2-
echo [INFO] Package the war in target dir.
3-
4-
cd %~dp0
5-
cd ..
6-
call mvn clean package -Dmaven.test.skip=true
7-
cd bin
1+
@echo off
2+
echo [INFO] Package the war in target dir.
3+
4+
cd %~dp0
5+
cd ..
6+
call mvn clean package -Dmaven.test.skip=true
7+
cd bin
88
pause
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
echo "[INFO] Package the war in target dir."
4+
5+
cd ..
6+
7+
mvn clean package -Dmaven.test.skip=true
8+
9+
cd bin
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@echo off
2-
echo [INFO] Re-create the schema and provision the sample data.
3-
4-
cd %~dp0
5-
cd ..
6-
7-
call mvn antrun:run -Prefresh-db
8-
9-
cd bin
1+
@echo off
2+
echo [INFO] Re-create the schema and provision the sample data.
3+
4+
cd %~dp0
5+
cd ..
6+
7+
call mvn antrun:run -Prefresh-db
8+
9+
cd bin
1010
pause
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
echo "[INFO] Re-create the schema and provision the sample data."
4+
5+
cd ..
6+
7+
mvn antrun:run -Prefresh-db
8+
9+
cd bin
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
@echo off
2-
echo [INFO] run smoking functional test.
3-
4-
cd %~dp0
5-
cd ..
6-
7-
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8-
call mvn clean test -Pfunctional-test,run-smoke
9-
10-
cd bin
1+
@echo off
2+
echo [INFO] run smoking functional test.
3+
4+
cd %~dp0
5+
cd ..
6+
7+
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8+
call mvn clean test -Pfunctional-test,run-smoke
9+
10+
cd bin
1111
pause
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "[INFO] run smoking functional test."
4+
5+
cd ..
6+
7+
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m
8+
9+
mvn clean test -Pfunctional-test,run-smoke
10+
11+
cd bin

support/maven-archetype/src/main/resources/archetype-resources/pom.xml

+41-36
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
<properties>
1111
<!-- 主要依赖库的版本定义 -->
1212
<springside.version>4.2.3-GA</springside.version>
13-
<spring.version>4.0.2.RELEASE</spring.version>
14-
<hibernate.version>4.3.1.Final</hibernate.version>
15-
<spring-data-jpa.version>1.4.4.RELEASE</spring-data-jpa.version>
16-
<tomcat-jdbc.version>7.0.52</tomcat-jdbc.version>
13+
<spring.version>4.0.5.RELEASE</spring.version>
14+
<hibernate.version>4.3.5.Final</hibernate.version>
15+
<spring-data-jpa.version>1.6.0.RELEASE</spring-data-jpa.version>
16+
<tomcat-jdbc.version>7.0.53</tomcat-jdbc.version>
1717
<sitemesh.version>2.4.2</sitemesh.version>
18-
<shiro.version>1.2.2</shiro.version>
18+
<shiro.version>1.2.3</shiro.version>
1919
<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
20-
<jackson.version>2.3.1</jackson.version>
20+
<jackson.version>2.4.0</jackson.version>
2121
<aspectj.version>1.7.4</aspectj.version>
22-
<slf4j.version>1.7.6</slf4j.version>
23-
<logback.version>1.1.1</logback.version>
24-
<commons-lang3.version>3.2.1</commons-lang3.version>
25-
<guava.version>16.0.1</guava.version>
22+
<slf4j.version>1.7.7</slf4j.version>
23+
<logback.version>1.1.2</logback.version>
24+
<commons-lang3.version>3.3.2</commons-lang3.version>
25+
<guava.version>17.0</guava.version>
2626
<junit.version>4.11</junit.version>
27-
<assertj.version>1.5.0</assertj.version>
27+
<assertj.version>1.6.1</assertj.version>
2828
<mockito.version>1.9.5</mockito.version>
29-
<selenium.version>2.40.0</selenium.version>
30-
<jetty.version>7.6.14.v20131031</jetty.version>
31-
<h2.version>1.3.175</h2.version>
29+
<selenium.version>2.42.2</selenium.version>
30+
<jetty.version>7.6.15.v20140411</jetty.version>
31+
<h2.version>1.3.176</h2.version>
3232

3333
<!-- Plugin的属性定义 -->
3434
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -38,28 +38,28 @@
3838
<jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
3939
<jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
4040
<jdbc.driver.version>${h2.version}</jdbc.driver.version>
41-
<!--
42-
<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
43-
<jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
44-
<jdbc.driver.version>5.1.22</jdbc.driver.version>
41+
<!--
42+
<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
43+
<jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
44+
<jdbc.driver.version>5.1.22</jdbc.driver.version>
4545
-->
4646
</properties>
4747

4848
<prerequisites>
4949
<maven>3.0.0</maven>
5050
</prerequisites>
5151

52-
<!-- 设定插件仓库, 如有Nexus私服, 取消注释并指向正确的服务器地址.
53-
<pluginRepositories>
54-
<pluginRepository>
55-
<id>nexus</id>
56-
<name>Team Nexus Repository</name>
57-
<url>http://localhost:8081/nexus/content/groups/public</url>
58-
<snapshots>
59-
<enabled>false</enabled>
60-
</snapshots>
61-
</pluginRepository>
62-
</pluginRepositories>
52+
<!-- 设定插件仓库, 如有Nexus私服, 取消注释并指向正确的服务器地址.
53+
<pluginRepositories>
54+
<pluginRepository>
55+
<id>nexus</id>
56+
<name>Team Nexus Repository</name>
57+
<url>http://localhost:8081/nexus/content/groups/public</url>
58+
<snapshots>
59+
<enabled>false</enabled>
60+
</snapshots>
61+
</pluginRepository>
62+
</pluginRepositories>
6363
-->
6464

6565
<!-- 依赖项定义 -->
@@ -154,6 +154,11 @@
154154
<artifactId>shiro-ehcache</artifactId>
155155
<version>${shiro.version}</version>
156156
</dependency>
157+
<dependency>
158+
<groupId>commons-codec</groupId>
159+
<artifactId>commons-codec</artifactId>
160+
<version>1.9</version>
161+
</dependency>
157162
<!-- SECURITY end -->
158163

159164
<!-- JSR303 BeanValidator -->
@@ -315,12 +320,12 @@
315320
</exclusions>
316321
</dependency>
317322

318-
<!-- h2 如果生产数据库不是H2,解开下面的注释
319-
<dependency>
320-
<groupId>com.h2database</groupId>
321-
<artifactId>h2</artifactId>
322-
<version>${h2.version}</version>
323-
</dependency>
323+
<!-- h2 如果生产数据库不是H2,解开下面的注释
324+
<dependency>
325+
<groupId>com.h2database</groupId>
326+
<artifactId>h2</artifactId>
327+
<version>${h2.version}</version>
328+
</dependency>
324329
-->
325330

326331
<!-- jetty -->
@@ -351,7 +356,7 @@
351356
<dependency>
352357
<groupId>net.sf.ehcache</groupId>
353358
<artifactId>ehcache-core</artifactId>
354-
<version>2.6.8</version>
359+
<version>2.6.9</version>
355360
</dependency>
356361
</dependencies>
357362
</dependencyManagement>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#set( $symbol_pound = '#' )
22
#set( $symbol_dollar = '$' )
33
#set( $symbol_escape = '\' )
4-
<ehcache updateCheck="false" name="shiroCache">
5-
6-
<defaultCache
7-
maxElementsInMemory="10000"
8-
eternal="false"
9-
timeToIdleSeconds="120"
10-
timeToLiveSeconds="120"
11-
overflowToDisk="false"
12-
diskPersistent="false"
13-
diskExpiryThreadIntervalSeconds="120"
14-
/>
4+
<ehcache updateCheck="false" name="shiroCache">
5+
6+
<defaultCache
7+
maxElementsInMemory="10000"
8+
eternal="false"
9+
timeToIdleSeconds="120"
10+
timeToLiveSeconds="120"
11+
overflowToDisk="false"
12+
diskPersistent="false"
13+
diskExpiryThreadIntervalSeconds="120"
14+
/>
1515
</ehcache>
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
#set( $symbol_pound = '#' )
22
#set( $symbol_dollar = '$' )
33
#set( $symbol_escape = '\' )
4-
drop table if exists ${tablePrefix}task;
5-
drop table if exists ${tablePrefix}user;
6-
7-
create table ${tablePrefix}task (
8-
id bigint,
9-
title varchar(128) not null,
10-
description varchar(255),
11-
user_id bigint not null,
12-
primary key (id)
13-
);
14-
15-
create table ${tablePrefix}user (
16-
id bigint,
17-
login_name varchar(64) not null unique,
18-
name varchar(64) not null,
19-
password varchar(255) not null,
20-
salt varchar(64) not null,
21-
roles varchar(255) not null,
22-
register_date timestamp not null,
23-
primary key (id)
24-
);
25-
26-
27-
create sequence ${tablePrefix}seq_task start with 100 increment by 20;
4+
drop table if exists ${tablePrefix}task;
5+
drop table if exists ${tablePrefix}user;
6+
7+
create table ${tablePrefix}task (
8+
id bigint,
9+
title varchar(128) not null,
10+
description varchar(255),
11+
user_id bigint not null,
12+
primary key (id)
13+
);
14+
15+
create table ${tablePrefix}user (
16+
id bigint,
17+
login_name varchar(64) not null unique,
18+
name varchar(64) not null,
19+
password varchar(255) not null,
20+
salt varchar(64) not null,
21+
roles varchar(255) not null,
22+
register_date timestamp not null,
23+
primary key (id)
24+
);
25+
26+
27+
create sequence ${tablePrefix}seq_task start with 100 increment by 20;
2828
create sequence ${tablePrefix}seq_user start with 100 increment by 20;
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
#set( $symbol_pound = '#' )
22
#set( $symbol_dollar = '$' )
33
#set( $symbol_escape = '\' )
4-
drop table if exists ${tablePrefix}task;
5-
drop table if exists ${tablePrefix}user;
6-
7-
create table ${tablePrefix}task (
8-
id bigint generated by default as identity,
9-
title varchar(128) not null,
10-
description varchar(255),
11-
user_id bigint not null,
12-
primary key (id)
13-
);
14-
15-
create table ${tablePrefix}user (
16-
id bigint generated by default as identity,
17-
login_name varchar(64) not null unique,
18-
name varchar(64) not null,
19-
password varchar(255) not null,
20-
salt varchar(64) not null,
21-
roles varchar(255) not null,
22-
register_date timestamp not null,
23-
primary key (id)
4+
drop table if exists ${tablePrefix}task;
5+
drop table if exists ${tablePrefix}user;
6+
7+
create table ${tablePrefix}task (
8+
id bigint generated by default as identity,
9+
title varchar(128) not null,
10+
description varchar(255),
11+
user_id bigint not null,
12+
primary key (id)
13+
);
14+
15+
create table ${tablePrefix}user (
16+
id bigint generated by default as identity,
17+
login_name varchar(64) not null unique,
18+
name varchar(64) not null,
19+
password varchar(255) not null,
20+
salt varchar(64) not null,
21+
roles varchar(255) not null,
22+
register_date timestamp not null,
23+
primary key (id)
2424
);

0 commit comments

Comments
 (0)