diff --git a/build.xml b/build.xml index bd68c61..fb05e81 100644 --- a/build.xml +++ b/build.xml @@ -5,26 +5,50 @@ basedir="." default="install"> + + + + - - - + + - - - + value="${artifactId}/target/generated-sources/archetype/src/main/resources/archetype-resources" /> + + + + + + + + + - - - @@ -43,59 +67,53 @@ - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + + @@ -104,10 +122,13 @@ + - + + + @@ -115,18 +136,16 @@ - - - - + + + + - - + + - - - + @@ -142,104 +161,119 @@ - - - - + + + + + + + + + + - - + + + + + + + + - - - - - - + + + + + + - + + - + - + - - - - - - + + + + + + - + + - + - + - - - - + + + + - - + + + - + - + - - + + - + - + + + - + \ No newline at end of file diff --git a/javaee7-web-min/.gitignore b/javaee7-web-min/.gitignore index 54088d5..db7fca5 100644 --- a/javaee7-web-min/.gitignore +++ b/javaee7-web-min/.gitignore @@ -1,2 +1,6 @@ -target +/target/ +/tools/derby/data/ +/tools/hibernate-tools/target +/tools/mysql/data/ +/tools/mysql/target .DS_Store diff --git a/javaee7-web-min/.settings/javaee7-web-min_00_build-all.launch b/javaee7-web-min/.settings/javaee7-web-min_00_build-all.launch index f0329af..2314e75 100644 --- a/javaee7-web-min/.settings/javaee7-web-min_00_build-all.launch +++ b/javaee7-web-min/.settings/javaee7-web-min_00_build-all.launch @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-min/.settings/javaee7-web-min_10_mysql-run.launch b/javaee7-web-min/.settings/javaee7-web-min_10_mysql-run.launch new file mode 100644 index 0000000..207495e --- /dev/null +++ b/javaee7-web-min/.settings/javaee7-web-min_10_mysql-run.launch @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-min/.settings/javaee7-web-min_11_mysql-stop.launch b/javaee7-web-min/.settings/javaee7-web-min_11_mysql-stop.launch new file mode 100644 index 0000000..8c57a25 --- /dev/null +++ b/javaee7-web-min/.settings/javaee7-web-min_11_mysql-stop.launch @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-min/.settings/javaee7-web-min_20_wildfly-run.launch b/javaee7-web-min/.settings/javaee7-web-min_20_wildfly-run.launch index 5e470b5..71aa033 100644 --- a/javaee7-web-min/.settings/javaee7-web-min_20_wildfly-run.launch +++ b/javaee7-web-min/.settings/javaee7-web-min_20_wildfly-run.launch @@ -12,9 +12,6 @@ - - - diff --git a/javaee7-web-min/.settings/javaee7-web-tips_21_wildfly-stop.launch b/javaee7-web-min/.settings/javaee7-web-min_21_wildfly-stop.launch similarity index 85% rename from javaee7-web-min/.settings/javaee7-web-tips_21_wildfly-stop.launch rename to javaee7-web-min/.settings/javaee7-web-min_21_wildfly-stop.launch index 255225e..edd123f 100644 --- a/javaee7-web-min/.settings/javaee7-web-tips_21_wildfly-stop.launch +++ b/javaee7-web-min/.settings/javaee7-web-min_21_wildfly-stop.launch @@ -12,9 +12,6 @@ - - - diff --git a/javaee7-web-min/.settings/org.eclipse.core.resources.prefs b/javaee7-web-min/.settings/org.eclipse.core.resources.prefs index 3f2340e..33cbced 100755 --- a/javaee7-web-min/.settings/org.eclipse.core.resources.prefs +++ b/javaee7-web-min/.settings/org.eclipse.core.resources.prefs @@ -4,5 +4,4 @@ encoding//src/main/resources=UTF-8 encoding//src/main/webapp=UTF-8 encoding//src/test/java=UTF-8 encoding//src/test/resources=UTF-8 -encoding//target/generated-sources/hibernate-tools=UTF-8 encoding/=UTF-8 diff --git a/javaee7-web-min/.settings/org.eclipse.jpt.core.prefs b/javaee7-web-min/.settings/org.eclipse.jpt.core.prefs index 730fbc1..d64f8ce 100755 --- a/javaee7-web-min/.settings/org.eclipse.jpt.core.prefs +++ b/javaee7-web-min/.settings/org.eclipse.jpt.core.prefs @@ -1,3 +1,2 @@ eclipse.preferences.version=1 org.eclipse.jpt.core.platform=eclipselink2_5 -org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true diff --git a/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml index 909c1fd..9b4b9fc 100755 --- a/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml +++ b/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -4,9 +4,4 @@ - - - - - diff --git a/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.xml b/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.xml index a47fdf0..1c89fc0 100755 --- a/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/javaee7-web-min/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -5,5 +5,4 @@ - diff --git a/javaee7-web-min/distribution/pom.xml b/javaee7-web-min/distribution/pom.xml index da24ad2..409230f 100644 --- a/javaee7-web-min/distribution/pom.xml +++ b/javaee7-web-min/distribution/pom.xml @@ -32,6 +32,29 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + process-resources + + run + + + + + + + + + org.apache.maven.plugins maven-source-plugin diff --git a/javaee7-web-min/nbactions.xml b/javaee7-web-min/nbactions.xml index 08f01af..8272f56 100644 --- a/javaee7-web-min/nbactions.xml +++ b/javaee7-web-min/nbactions.xml @@ -6,10 +6,11 @@ false verify + -e + mysql db-migrate - derby was-liberty it @@ -18,6 +19,9 @@ CUSTOM-01_db-migrate 01_db-migrate false + + -e + db-migrate @@ -29,6 +33,22 @@ derby:run + + derby + + + + CUSTOM-10_mysql-run + 10_mysql-run + + -e + + + run + + + mysql + CUSTOM-11_derby-stop @@ -37,6 +57,19 @@ derby:stop + + deeby + + + + CUSTOM-11_mysql-stop + 11_mysql-stop + + stop + + + mysql + CUSTOM-20_was-liberty-run @@ -46,6 +79,13 @@ was-liberty + + CUSTOM-20_wildfly-run + 20_wildfly-run + + wildfly + + CUSTOM-21_was-liberty-stop 21_was-liberty-stop @@ -57,6 +97,16 @@ was-liberty + + CUSTOM-21_wildfly-stop + 21_wildfly-stop + + wildfly:shutdown + + + wildfly + + Ï CUSTOM-30_it 30_it @@ -67,5 +117,15 @@ it - Ï + + + CUSTOM-40_site + 40_site + + site + + + db-migrate + + diff --git a/javaee7-web-min/pom.xml b/javaee7-web-min/pom.xml index 4a6213a..394f671 100755 --- a/javaee7-web-min/pom.xml +++ b/javaee7-web-min/pom.xml @@ -9,34 +9,94 @@ org.sitoolkit.ad.archetype javaee7-web - 0.12 + 0.13 - org.apache.derby - derbyclient - 10.10.1.1 - ${settings.localRepository}/org/apache/derby/derbyclient/${db.client.version} - org.apache.derby.jdbc.ClientDriver - org.apache.derby.jdbc.ClientConnectionPoolDataSource40 - ${project.artifactId}-db - localhost - 1527 - jdbc:derby://${db.host}:${db.port}/${db.name};create=true - app - app - aaa - ]]> - ]]> + filesystem:${toolsdir}/flyway + 4.1.153 + 8.5.5.9 + 1.1 + 10.0.0.Final + 1.1.0.Alpha7 2.53.0 + 3.4.1 + 0.12.2 ${project.artifactId} your target your org your space 1 - 512 + 512 + + derby + + false + + + org.apache.derby + derbyclient + 10.10.1.1 + ${settings.localRepository}/org/apache/derby/derbyclient/${db.client.version} + org.apache.derby.jdbc.ClientDriver + org.apache.derby.jdbc.ClientConnectionPoolDataSource40 + ${project.artifactId}-db + localhost + 1527 + jdbc:derby://${db.host}:${db.port}/${db.name};create=true + app + app + ]]> + ]]> + filesystem:${toolsdir}/derby + + + + + mysql + + true + + + mysql + mysql-connector-java + 5.1.38 + ${settings.localRepository}/mysql/mysql-connector-java/${db.client.version} + com.mysql.jdbc.Driver + com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource + + + + mydb + localhost + 3306 + jdbc:mysql://${db.host}:${db.port}/${db.name} + app + app + <properties databaseName="${db.name}" + serverName="${db.host}" portNumber="${db.port}" user="${db.username}" + password="${db.password}"/> + <fileset dir="${db.client.lib}" + includes="mysql-connector-java-${db.client.version}.jar"/> + filesystem:${toolsdir}/mysql + + + + + mysql-bluemix + + true + dbname + host + username + password + cleardb + spark + + + db2 diff --git a/javaee7-web-min/src/site/site.xml b/javaee7-web-min/src/site/site.xml new file mode 100644 index 0000000..47d2d40 --- /dev/null +++ b/javaee7-web-min/src/site/site.xml @@ -0,0 +1,9 @@ + + + + org.apache.maven.skins + maven-fluido-skin + 1.5 + + \ No newline at end of file diff --git a/javaee7-web-min/tools/derby/migration/V1__create_content_table.sql b/javaee7-web-min/tools/derby/migration/V1__create_content_table.sql new file mode 100644 index 0000000..fc4f5e2 --- /dev/null +++ b/javaee7-web-min/tools/derby/migration/V1__create_content_table.sql @@ -0,0 +1,7 @@ +CREATE TABLE content ( + id CHAR(3) NOT NULL, + value VARCHAR(64), + PRIMARY KEY (id) +); + +INSERT INTO content (id, value) VALUES('001', 'Content'); \ No newline at end of file diff --git a/javaee7-web-min/tools/flyway/V1__create_content_table.sql b/javaee7-web-min/tools/flyway/V1__create_content_table.sql index b8be48a..fc4f5e2 100644 --- a/javaee7-web-min/tools/flyway/V1__create_content_table.sql +++ b/javaee7-web-min/tools/flyway/V1__create_content_table.sql @@ -4,4 +4,4 @@ CREATE TABLE content ( PRIMARY KEY (id) ); -INSERT INTO content (id, value) VALUES('001', 'Content'); +INSERT INTO content (id, value) VALUES('001', 'Content'); \ No newline at end of file diff --git a/javaee7-web-min/tools/hibernate-tools/hibernate.reveng.xml b/javaee7-web-min/tools/hibernate-tools/hibernate.reveng.xml index 9e8eec9..98a7809 100644 --- a/javaee7-web-min/tools/hibernate-tools/hibernate.reveng.xml +++ b/javaee7-web-min/tools/hibernate-tools/hibernate.reveng.xml @@ -1,5 +1,5 @@ - @@ -7,6 +7,7 @@ - + + diff --git a/javaee7-web-min/tools/mysql/build-osx.xml b/javaee7-web-min/tools/mysql/build-osx.xml new file mode 100644 index 0000000..5bcadbb --- /dev/null +++ b/javaee7-web-min/tools/mysql/build-osx.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-min/tools/mysql/build-win.xml b/javaee7-web-min/tools/mysql/build-win.xml new file mode 100644 index 0000000..a43ebda --- /dev/null +++ b/javaee7-web-min/tools/mysql/build-win.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-min/tools/mysql/build.xml b/javaee7-web-min/tools/mysql/build.xml new file mode 100644 index 0000000..1f98151 --- /dev/null +++ b/javaee7-web-min/tools/mysql/build.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-min/tools/mysql/initialize.sql b/javaee7-web-min/tools/mysql/initialize.sql new file mode 100644 index 0000000..fb7662e --- /dev/null +++ b/javaee7-web-min/tools/mysql/initialize.sql @@ -0,0 +1,7 @@ +CREATE DATABASE IF NOT EXISTS `@db.name@` CHARACTER SET UTF8; +SHOW DATABASES; +GRANT ALL ON `@db.name@`.* TO `@db.username@` IDENTIFIED BY '@db.password@'; +GRANT FILE ON *.* TO `@db.username@`; +USE MYSQL; +SELECT HOST, USER, FILE_PRIV FROM USER; +SHOW GRANTS FOR `@db.username@`; diff --git a/javaee7-web-min/tools/mysql/migration/V1__create_content_table.sql b/javaee7-web-min/tools/mysql/migration/V1__create_content_table.sql new file mode 100644 index 0000000..fc4f5e2 --- /dev/null +++ b/javaee7-web-min/tools/mysql/migration/V1__create_content_table.sql @@ -0,0 +1,7 @@ +CREATE TABLE content ( + id CHAR(3) NOT NULL, + value VARCHAR(64), + PRIMARY KEY (id) +); + +INSERT INTO content (id, value) VALUES('001', 'Content'); \ No newline at end of file diff --git a/javaee7-web-min/tools/mysql/my.cnf b/javaee7-web-min/tools/mysql/my.cnf new file mode 100644 index 0000000..d43cbae --- /dev/null +++ b/javaee7-web-min/tools/mysql/my.cnf @@ -0,0 +1,7 @@ +[client] +port=@db.port.local@ +socket=@mysql.socket@ + +[mysqld] +port=@db.port.local@ +socket=@mysql.socket@ diff --git a/javaee7-web-min/tools/was-liberty/jvm.options b/javaee7-web-min/tools/was-liberty/jvm.options index 784b3f4..74d6e08 100644 --- a/javaee7-web-min/tools/was-liberty/jvm.options +++ b/javaee7-web-min/tools/was-liberty/jvm.options @@ -1,4 +1,3 @@ --Dfile.encoding=UTF-8 -Dwas.debug.mode=true -Dcom.ibm.websphere.ras.inject.at.transform=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777 diff --git a/javaee7-web-min/tools/wildfly/build.xml b/javaee7-web-min/tools/wildfly/build.xml index 869ca52..2fea899 100644 --- a/javaee7-web-min/tools/wildfly/build.xml +++ b/javaee7-web-min/tools/wildfly/build.xml @@ -1,15 +1,22 @@ - - - - + + + + - + + + + + + + + - + diff --git a/javaee7-web-tips/.gitignore b/javaee7-web-tips/.gitignore index 6ec4261..db7fca5 100644 --- a/javaee7-web-tips/.gitignore +++ b/javaee7-web-tips/.gitignore @@ -1,2 +1,6 @@ -target -.DS_Store \ No newline at end of file +/target/ +/tools/derby/data/ +/tools/hibernate-tools/target +/tools/mysql/data/ +/tools/mysql/target +.DS_Store diff --git a/javaee7-web-tips/.settings/javaee7-web-tips_00_build-all.launch b/javaee7-web-tips/.settings/javaee7-web-tips_00_build-all.launch index 9f092d6..6a7057b 100644 --- a/javaee7-web-tips/.settings/javaee7-web-tips_00_build-all.launch +++ b/javaee7-web-tips/.settings/javaee7-web-tips_00_build-all.launch @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-tips/.settings/javaee7-web-tips_10_mysql-run.launch b/javaee7-web-tips/.settings/javaee7-web-tips_10_mysql-run.launch new file mode 100644 index 0000000..7fc7703 --- /dev/null +++ b/javaee7-web-tips/.settings/javaee7-web-tips_10_mysql-run.launch @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-tips/.settings/javaee7-web-tips_11_mysql-stop.launch b/javaee7-web-tips/.settings/javaee7-web-tips_11_mysql-stop.launch new file mode 100644 index 0000000..4d58dc5 --- /dev/null +++ b/javaee7-web-tips/.settings/javaee7-web-tips_11_mysql-stop.launch @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/javaee7-web-tips/.settings/javaee7-web-tips_20_wildfly-run.launch b/javaee7-web-tips/.settings/javaee7-web-tips_20_wildfly-run.launch index 70fde80..a06932a 100644 --- a/javaee7-web-tips/.settings/javaee7-web-tips_20_wildfly-run.launch +++ b/javaee7-web-tips/.settings/javaee7-web-tips_20_wildfly-run.launch @@ -12,9 +12,6 @@ - - - diff --git a/javaee7-web-tips/.settings/javaee7-web-tips_21_wildfly-stop.launch b/javaee7-web-tips/.settings/javaee7-web-tips_21_wildfly-stop.launch index 049ade5..0f9d08f 100644 --- a/javaee7-web-tips/.settings/javaee7-web-tips_21_wildfly-stop.launch +++ b/javaee7-web-tips/.settings/javaee7-web-tips_21_wildfly-stop.launch @@ -12,9 +12,6 @@ - - - diff --git a/javaee7-web-tips/.settings/org.eclipse.jpt.core.prefs b/javaee7-web-tips/.settings/org.eclipse.jpt.core.prefs index 6f2ab05..3d7690e 100644 --- a/javaee7-web-tips/.settings/org.eclipse.jpt.core.prefs +++ b/javaee7-web-tips/.settings/org.eclipse.jpt.core.prefs @@ -1,3 +1,2 @@ eclipse.preferences.version=1 org.eclipse.jpt.core.platform=generic2_1 -org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true diff --git a/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml index 392a098..0d46547 100644 --- a/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml +++ b/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -1,17 +1,7 @@ - - - - - - - - - - - - - - - - - + + + + + + + diff --git a/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.xml b/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.xml index 8891f7a..d7f2acf 100644 --- a/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/javaee7-web-tips/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,10 +1,8 @@ - - - - - - - - - - + + + + + + + + diff --git a/javaee7-web-tips/distribution/pom.xml b/javaee7-web-tips/distribution/pom.xml index fc03b57..34a9dde 100644 --- a/javaee7-web-tips/distribution/pom.xml +++ b/javaee7-web-tips/distribution/pom.xml @@ -1,7 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 @@ -28,6 +27,29 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + process-resources + + run + + + + + + + + + org.apache.maven.plugins maven-source-plugin diff --git a/javaee7-web-tips/nbactions.xml b/javaee7-web-tips/nbactions.xml index 08f01af..8272f56 100644 --- a/javaee7-web-tips/nbactions.xml +++ b/javaee7-web-tips/nbactions.xml @@ -6,10 +6,11 @@ false verify + -e + mysql db-migrate - derby was-liberty it @@ -18,6 +19,9 @@ CUSTOM-01_db-migrate 01_db-migrate false + + -e + db-migrate @@ -29,6 +33,22 @@ derby:run + + derby + + + + CUSTOM-10_mysql-run + 10_mysql-run + + -e + + + run + + + mysql + CUSTOM-11_derby-stop @@ -37,6 +57,19 @@ derby:stop + + deeby + + + + CUSTOM-11_mysql-stop + 11_mysql-stop + + stop + + + mysql + CUSTOM-20_was-liberty-run @@ -46,6 +79,13 @@ was-liberty + + CUSTOM-20_wildfly-run + 20_wildfly-run + + wildfly + + CUSTOM-21_was-liberty-stop 21_was-liberty-stop @@ -57,6 +97,16 @@ was-liberty + + CUSTOM-21_wildfly-stop + 21_wildfly-stop + + wildfly:shutdown + + + wildfly + + Ï CUSTOM-30_it 30_it @@ -67,5 +117,15 @@ it - Ï + + + CUSTOM-40_site + 40_site + + site + + + db-migrate + + diff --git a/javaee7-web-tips/pom.xml b/javaee7-web-tips/pom.xml index dbd0b52..0b2e07b 100644 --- a/javaee7-web-tips/pom.xml +++ b/javaee7-web-tips/pom.xml @@ -23,6 +23,12 @@ logback-classic 1.1.3 + + org.eclipse.persistence + org.eclipse.persistence.jpa + 2.6.2 + test + ${db.client.groupId} ${db.client.artifactId} @@ -33,31 +39,24 @@ org.sitoolkit.ad.archetype javaee7-web - 0.12 + 0.13 - org.apache.derby - derbyclient - 10.10.1.1 - ${settings.localRepository}/org/apache/derby/derbyclient/${db.client.version} - org.apache.derby.jdbc.ClientDriver - org.apache.derby.jdbc.ClientConnectionPoolDataSource40 - ${project.artifactId}-db - localhost - 1527 - jdbc:derby://${db.host}:${db.port}/${db.name};create=true - app - app - - ]]> - ]]> + filesystem:${toolsdir}/flyway + 4.1.153 + 8.5.5.9 + 1.1 + 10.0.0.Final + 1.1.0.Alpha7 2.53.0 + 3.4.1 + 0.12.2 ${project.artifactId} your target your org your space 1 - 512 + 512 @@ -66,10 +65,72 @@ - db2 + derby + + org.apache.derby + derbyclient + 10.10.1.1 + ${settings.localRepository}/org/apache/derby/derbyclient/${db.client.version} + org.apache.derby.jdbc.ClientDriver + org.apache.derby.jdbc.ClientConnectionPoolDataSource40 + ${project.artifactId}-db + localhost + 1527 + jdbc:derby://${db.host}:${db.port}/${db.name};create=true + app + app + + ]]> + ]]> + filesystem:${toolsdir}/derby + + + + + mysql - false + true + + mysql + mysql-connector-java + 5.1.38 + ${settings.localRepository}/mysql/mysql-connector-java/${db.client.version} + com.mysql.jdbc.Driver + com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource + + + + mydb + localhost + 3306 + jdbc:mysql://${db.host}:${db.port}/${db.name} + app + app + <properties databaseName="${db.name}" + serverName="${db.host}" portNumber="${db.port}" user="${db.username}" + password="${db.password}"/> + <fileset dir="${db.client.lib}" + includes="mysql-connector-java-${db.client.version}.jar"/> + filesystem:${toolsdir}/mysql + + + + + mysql-bluemix + + true + dbname + host + username + password + cleardb + spark + + + + + db2 com.ibm.db2 db2jcc @@ -99,9 +160,6 @@ oracle - - false - com.oracle ojdbc6 diff --git "a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/\346\200\247\345\210\245Cd.java" b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/GenderCd.java similarity index 80% rename from "javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/\346\200\247\345\210\245Cd.java" rename to javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/GenderCd.java index 09178c6..e6abb7c 100644 --- "a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/\346\200\247\345\210\245Cd.java" +++ b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/code/GenderCd.java @@ -5,10 +5,10 @@ /** * **/ -public enum 性別Cd implements Code { +public enum GenderCd implements Code { 男性("1"), 女性("2"),; - private 性別Cd(String value) { + private GenderCd(String value) { this.value = value; } diff --git a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/user/UserEntity.java b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/user/UserEntity.java index e2cf230..adbca93 100644 --- a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/user/UserEntity.java +++ b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/domain/user/UserEntity.java @@ -7,7 +7,7 @@ import javax.persistence.Table; import javax.validation.constraints.NotNull; -import org.sitoolkit.ad.archetype.tips.domain.code.性別Cd; +import org.sitoolkit.ad.archetype.tips.domain.code.GenderCd; import org.sitoolkit.ad.archetype.tips.infrastructure.code.CodeUtils; import org.sitoolkit.ad.archetype.tips.infrastructure.data.jpa.BaseEntityListener; @@ -34,11 +34,11 @@ public String getPassword() { return super.getPassword(); } - public 性別Cd getGenderCd() { - return CodeUtils.decode(getGender(), 性別Cd.class); + public GenderCd getGenderCd() { + return CodeUtils.decode(getGender(), GenderCd.class); } - public void setGenderCd(性別Cd gender) { + public void setGenderCd(GenderCd gender) { setGender(gender.getValue()); } diff --git a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/presentation/UserInputController.java b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/presentation/UserInputController.java index 3973641..76f7cb8 100644 --- a/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/presentation/UserInputController.java +++ b/javaee7-web-tips/src/main/java/org/sitoolkit/ad/archetype/tips/presentation/UserInputController.java @@ -7,7 +7,7 @@ import javax.inject.Named; import org.sitoolkit.ad.archetype.tips.application.user.UserService; -import org.sitoolkit.ad.archetype.tips.domain.code.性別Cd; +import org.sitoolkit.ad.archetype.tips.domain.code.GenderCd; import org.sitoolkit.ad.archetype.tips.domain.user.UserEntity; import org.sitoolkit.ad.archetype.tips.infrastructure.entitycrud.EntityInputController; @@ -29,8 +29,8 @@ public class UserInputController extends EntityInputController + + + org.apache.maven.skins + maven-fluido-skin + 1.5 + + \ No newline at end of file diff --git a/javaee7-web-tips/testscript/IntegrationTest.xlsx b/javaee7-web-tips/testscript/IntegrationTest.xlsx index d91dd6d..1f14b11 100644 Binary files a/javaee7-web-tips/testscript/IntegrationTest.xlsx and b/javaee7-web-tips/testscript/IntegrationTest.xlsx differ diff --git a/javaee7-web-tips/tools/derby/migration/V1__create_user_and_group.sql b/javaee7-web-tips/tools/derby/migration/V1__create_user_and_group.sql new file mode 100644 index 0000000..f431c7a --- /dev/null +++ b/javaee7-web-tips/tools/derby/migration/V1__create_user_and_group.sql @@ -0,0 +1,43 @@ +CREATE TABLE user_entity ( + user_id VARCHAR(10) NOT NULL, + password VARCHAR (128) NOT NULL, + last_name VARCHAR (32) , + first_name VARCHAR (32) , + gender CHAR (1) , + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, + created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created_by VARCHAR(10) NOT NULL, + updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated_by VARCHAR(10), + PRIMARY KEY (user_id) +); + +CREATE TABLE group_entity ( + group_code CHAR(8) NOT NULL, + group_name VARCHAR (64) , + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, + created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created_by VARCHAR(10) NOT NULL, + updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + updated_by VARCHAR(10), + PRIMARY KEY (group_code) +); + +CREATE TABLE user_group_relation ( + user_id VARCHAR(10) NOT NULL , + group_code CHAR (8) NOT NULL, + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, + created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created_by VARCHAR(10) NOT NULL, + updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL , + updated_by VARCHAR(10), + FOREIGN KEY (user_id) REFERENCES user_entity (user_id) , + FOREIGN KEY (group_code) REFERENCES group_entity (group_code) , + PRIMARY KEY (user_id, group_code) +); + + +CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (null, 'USER_ENTITY', null, null, '${data}/user_entity.csv', ',', '"', 'Shift_JIS', 0); +CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (null, 'GROUP_ENTITY', null, null, '${data}/group_entity.csv', ',', '"', 'Shift_JIS', 0); +CALL SYSCS_UTIL.SYSCS_IMPORT_DATA (null, 'USER_GROUP_RELATION', null, null, '${data}/user_group_relation.csv', ',', '"', 'Shift_JIS', 0); + diff --git a/javaee7-web-tips/tools/flyway/migration/V1__create_user_and_group.sql b/javaee7-web-tips/tools/flyway/migration/V1__create_user_and_group.sql index 2386c2d..d9212d5 100644 --- a/javaee7-web-tips/tools/flyway/migration/V1__create_user_and_group.sql +++ b/javaee7-web-tips/tools/flyway/migration/V1__create_user_and_group.sql @@ -1,39 +1,39 @@ -CREATE TABLE user_entity ( - user_id VARCHAR(10) NOT NULL, - password VARCHAR (128) NOT NULL, - last_name VARCHAR (32) , - first_name VARCHAR (32) , - gender CHAR (1) , - deleted_flg CHAR(1) DEFAULT '0' NOT NULL, - created TIMESTAMP NOT NULL, - created_by VARCHAR(10) NOT NULL, - updated TIMESTAMP NOT NULL, - updated_by VARCHAR(10), - PRIMARY KEY (user_id) +CREATE TABLE USER_ENTITY ( + USER_ID VARCHAR(10) NOT NULL, + PASSWORD VARCHAR (128) NOT NULL, + LAST_NAME VARCHAR (32) , + FIRST_NAME VARCHAR (32) , + GENDER CHAR (1) , + DELETED_FLG CHAR(1) DEFAULT '0' NOT NULL, + CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + CREATED_BY VARCHAR(10) NOT NULL, + UPDATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + UPDATED_BY VARCHAR(10), + PRIMARY KEY (USER_ID) ); -CREATE TABLE group_entity ( - group_code CHAR(8) NOT NULL, - group_name VARCHAR (64) , - deleted_flg CHAR(1) DEFAULT '0' NOT NULL, - created TIMESTAMP NOT NULL, - created_by VARCHAR(10) NOT NULL, - updated TIMESTAMP NOT NULL, - updated_by VARCHAR(10), - PRIMARY KEY (group_code) +CREATE TABLE GROUP_ENTITY ( + GROUP_CODE CHAR(8) NOT NULL, + GROUP_NAME VARCHAR (64) , + DELETED_FLG CHAR(1) DEFAULT '0' NOT NULL, + CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + CREATED_BY VARCHAR(10) NOT NULL, + UPDATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + UPDATED_BY VARCHAR(10), + PRIMARY KEY (GROUP_CODE) ); -CREATE TABLE user_group_relation ( - user_id VARCHAR(10) NOT NULL , - group_code CHAR (8) NOT NULL, - deleted_flg CHAR(1) DEFAULT '0' NOT NULL, - created TIMESTAMP NOT NULL, - created_by VARCHAR(10) NOT NULL, - updated TIMESTAMP NOT NULL , - updated_by VARCHAR(10), - FOREIGN KEY (user_id) REFERENCES user_entity (user_id) , - FOREIGN KEY (group_code) REFERENCES group_entity (group_code) , - PRIMARY KEY (user_id, group_code) +CREATE TABLE USER_GROUP_RELATION ( + USER_ID VARCHAR(10) NOT NULL , + GROUP_CODE CHAR (8) NOT NULL, + DELETED_FLG CHAR(1) DEFAULT '0' NOT NULL, + CREATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + CREATED_BY VARCHAR(10) NOT NULL, + UPDATED TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL , + UPDATED_BY VARCHAR(10), + FOREIGN KEY (USER_ID) REFERENCES USER_ENTITY (USER_ID) , + FOREIGN KEY (GROUP_CODE) REFERENCES GROUP_ENTITY (GROUP_CODE) , + PRIMARY KEY (USER_ID, GROUP_CODE) ); diff --git a/javaee7-web-tips/tools/hibernate-tools/hibernate.reveng.xml b/javaee7-web-tips/tools/hibernate-tools/hibernate.reveng.xml index 297149a..2291886 100644 --- a/javaee7-web-tips/tools/hibernate-tools/hibernate.reveng.xml +++ b/javaee7-web-tips/tools/hibernate-tools/hibernate.reveng.xml @@ -1,5 +1,5 @@ - @@ -12,6 +12,7 @@ + diff --git a/javaee7-web-tips/tools/mysql/build-osx.xml b/javaee7-web-tips/tools/mysql/build-osx.xml new file mode 100644 index 0000000..5bcadbb --- /dev/null +++ b/javaee7-web-tips/tools/mysql/build-osx.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-tips/tools/mysql/build-win.xml b/javaee7-web-tips/tools/mysql/build-win.xml new file mode 100644 index 0000000..a43ebda --- /dev/null +++ b/javaee7-web-tips/tools/mysql/build-win.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-tips/tools/mysql/build.xml b/javaee7-web-tips/tools/mysql/build.xml new file mode 100644 index 0000000..1f98151 --- /dev/null +++ b/javaee7-web-tips/tools/mysql/build.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/javaee7-web-tips/tools/mysql/initialize.sql b/javaee7-web-tips/tools/mysql/initialize.sql new file mode 100644 index 0000000..fb7662e --- /dev/null +++ b/javaee7-web-tips/tools/mysql/initialize.sql @@ -0,0 +1,7 @@ +CREATE DATABASE IF NOT EXISTS `@db.name@` CHARACTER SET UTF8; +SHOW DATABASES; +GRANT ALL ON `@db.name@`.* TO `@db.username@` IDENTIFIED BY '@db.password@'; +GRANT FILE ON *.* TO `@db.username@`; +USE MYSQL; +SELECT HOST, USER, FILE_PRIV FROM USER; +SHOW GRANTS FOR `@db.username@`; diff --git a/javaee7-web-tips/tools/mysql/migration/V1__create_user_and_group.sql b/javaee7-web-tips/tools/mysql/migration/V1__create_user_and_group.sql new file mode 100644 index 0000000..f7c60f0 --- /dev/null +++ b/javaee7-web-tips/tools/mysql/migration/V1__create_user_and_group.sql @@ -0,0 +1,48 @@ +CREATE TABLE user_entity ( + user_id VARCHAR(10) NOT NULL, + password VARCHAR (128) NOT NULL, + last_name VARCHAR (32) , + first_name VARCHAR (32) , + gender CHAR (1) , + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, + -- multiple "auto update timestamp column" is only supported with MySQL 5.7 or higher +-- created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + created_by VARCHAR(10) NOT NULL, +-- updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, + updated TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + updated_by VARCHAR(10), + PRIMARY KEY (user_id) +); + +CREATE TABLE group_entity ( + group_code CHAR(8) NOT NULL, + group_name VARCHAR (64) , + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, +-- created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + created_by VARCHAR(10) NOT NULL, +-- updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, + updated TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + updated_by VARCHAR(10), + PRIMARY KEY (group_code) +); + +CREATE TABLE user_group_relation ( + user_id VARCHAR(10) NOT NULL , + group_code CHAR (8) NOT NULL, + deleted_flg CHAR(1) DEFAULT '0' NOT NULL, +-- created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, + created TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + created_by VARCHAR(10) NOT NULL, +-- updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, + updated TIMESTAMP DEFAULT '1970-01-01 09:00:01' NOT NULL, + updated_by VARCHAR(10), + FOREIGN KEY (user_id) REFERENCES user_entity (user_id) , + FOREIGN KEY (group_code) REFERENCES group_entity (group_code) , + PRIMARY KEY (user_id, group_code) +); + +LOAD DATA LOCAL INFILE 'tools/flyway/data/user_entity.csv' INTO TABLE user_entity CHARACTER SET sjis FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; +LOAD DATA LOCAL INFILE 'tools/flyway/data/group_entity.csv' INTO TABLE group_entity CHARACTER SET sjis FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; +LOAD DATA LOCAL INFILE 'tools/flyway/data/user_group_relation.csv' INTO TABLE user_group_relation CHARACTER SET sjis FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'; diff --git a/javaee7-web-tips/tools/mysql/my.cnf b/javaee7-web-tips/tools/mysql/my.cnf new file mode 100644 index 0000000..d43cbae --- /dev/null +++ b/javaee7-web-tips/tools/mysql/my.cnf @@ -0,0 +1,7 @@ +[client] +port=@db.port.local@ +socket=@mysql.socket@ + +[mysqld] +port=@db.port.local@ +socket=@mysql.socket@ diff --git a/javaee7-web-tips/tools/was-liberty/jvm.options b/javaee7-web-tips/tools/was-liberty/jvm.options index 784b3f4..74d6e08 100644 --- a/javaee7-web-tips/tools/was-liberty/jvm.options +++ b/javaee7-web-tips/tools/was-liberty/jvm.options @@ -1,4 +1,3 @@ --Dfile.encoding=UTF-8 -Dwas.debug.mode=true -Dcom.ibm.websphere.ras.inject.at.transform=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777 diff --git a/javaee7-web-tips/tools/wildfly/build.xml b/javaee7-web-tips/tools/wildfly/build.xml index 700d763..8adfc38 100644 --- a/javaee7-web-tips/tools/wildfly/build.xml +++ b/javaee7-web-tips/tools/wildfly/build.xml @@ -1,15 +1,22 @@ - - - - + + + + - + + + + + + + + - + diff --git a/pom.xml b/pom.xml index c8bca17..3dc71fb 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.sitoolkit.ad.archetype javaee7-web - 0.12 + 0.13 pom @@ -87,12 +87,6 @@ ${deltaspike.version} test - - org.eclipse.persistence - org.eclipse.persistence.jpa - 2.6.2 - test - UTF-8 @@ -104,7 +98,6 @@ ${project.basedir}/tools ${toolsdir}/hibernate-tools ${project.build.directory}/generated-sources/hibernate-tools - 4.1.153 1.5.4 org.eclipse.persistence.jpa.PersistenceProvider false @@ -137,15 +130,6 @@ - - org.carlspring.maven - derby-maven-plugin - 1.10 - - ${toolsdir}/derby/target - ${db.port} - - org.flywaydb flyway-maven-plugin @@ -155,7 +139,7 @@ ${db.username} ${db.password} - filesystem:${toolsdir}/flyway + ${flyway.location} ${toolsdir}/flyway/data @@ -351,7 +335,7 @@ derby-maven-plugin 1.10 - ${toolsdir}/derby/target + ${toolsdir}/derby/data ${db.port} @@ -363,28 +347,28 @@ derby-maven-plugin - start-on-initialize + start-in-initialize initialize start - stop-on-post-integration-test + stop-in-post-integration-test post-integration-test stop - start-on-presite + start-in-pre-site pre-site start - stop-on-post-site + stop-in-post-site post-site-test stop @@ -396,6 +380,76 @@ + + mysql + + + mysql + + + + ${toolsdir}/mysql/build.xml + install + + + antrun:run + + + org.apache.maven.plugins + maven-antrun-plugin + + ${mysql.remote} + + + + + + + + + mysql-run-in-initialize + initialize + + run + + + + mysql-stop-in-post-integration-test + post-integration-test + + run + + + + + + + + + mysql-run-in-pre-site + pre-site + + run + + + + mysql-stop-in-post-site + post-site + + run + + + + + + + + + + + + + db-migrate @@ -406,6 +460,7 @@ flyway-maven-plugin + flyway-migrate-in-generate-sources generate-sources migrate @@ -420,7 +475,7 @@ org.hibernate hibernate-tools - 4.3.2.Final + 4.3.3.Final ant @@ -436,15 +491,18 @@ - run-hibernate-tools + hibernate-tools-run-in-generate-sources generate-sources run + + + - + @@ -587,12 +645,12 @@ net.wasdev.wlp.maven.plugins liberty-maven-plugin - 1.2-SNAPSHOT + ${was-liberty.plugin.version} com.ibm.websphere.appserver.runtime wlp-javaee7 - 8.5.5.9 + ${was-liberty.version} zip ${project.build.directory}/server.xml @@ -681,7 +739,7 @@ org.wildfly.plugins wildfly-maven-plugin - 1.0.2.Final + ${wildfly.plugin.version} ${project.build.directory}/wildfly.properties @@ -690,6 +748,10 @@ + ${wildfly.version} + + ${project.build.directory}/wildfly-run/wildfly-${wildfly.version} + @@ -739,12 +801,6 @@ sit-wt-runtime ${sitwt.version} test - - - org.seleniumhq.selenium - selenium-java - - org.seleniumhq.selenium @@ -752,13 +808,19 @@ ${selenium.version} test + + io.appium + java-client + ${appium.version} + test + false true - 0.11.1 + verify org.sitoolkit.wt @@ -800,7 +862,7 @@ - + cf