diff --git a/README.md b/README.md index 092215f4ffedafd660ca7f7078eca0ffce372fef..85dd0110f7269f629de7f59947953edc9a29b57d 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,12 @@ This will launch the complete construction cycle without running the tests, star **Important**: You shouldn't have a local WildFly instance running or Maven will not be able to start its own WildFly and will try to deploy the application in the running instance. This will cause changes to the WildFly configuration that may leave it in an unstable state. +Once WildFly is running, you can quickly redeploy the application (typically after making some changes) by executing the following command: + +```bash +mvn install wildfly:deploy-only -DskipTests=true +``` + To stop the WildFly launched you can execute the following command: ```bash diff --git a/domain/pom.xml b/domain/pom.xml index 6147fbea7623010442aeb297d9606956b68686ca..c8bed6a5a1d3e432164d46e3af81856d8cbf64a8 100644 --- a/domain/pom.xml +++ b/domain/pom.xml @@ -1,5 +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 es.uvigo.esei.xcs @@ -43,6 +44,23 @@ org.jacoco jacoco-maven-plugin + + + + org.apache.maven.plugins + maven-dependency-plugin + + true + + + + + org.apache.maven.plugins + maven-resources-plugin + + true + + diff --git a/ear/pom.xml b/ear/pom.xml index e9b71ac02d112794644d2d791e04361b4256d917..0dae35407fe652e89df3843c0d8f3a49a0a92d9f 100644 --- a/ear/pom.xml +++ b/ear/pom.xml @@ -1,5 +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 es.uvigo.esei.xcs @@ -8,10 +9,10 @@ ear ear - + EAR XCS Sample - EAR - + es.uvigo.esei.xcs @@ -36,7 +37,7 @@ war - + @@ -64,13 +65,31 @@ - org.wildfly.plugins - wildfly-maven-plugin - - false - ${project.parent.artifactId}-${project.version}.${project.packaging} - - + org.wildfly.plugins + wildfly-maven-plugin + + false + + ${project.parent.artifactId}-${project.version}.${project.packaging} + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + true + + + + + org.apache.maven.plugins + maven-resources-plugin + + true + + diff --git a/pom.xml b/pom.xml index 0f7cbceb36d44489e3dbc0c10243c78b35996ce5..39ff4b26beab650fdebd68999f1b4e1f69c78cf3 100644 --- a/pom.xml +++ b/pom.xml @@ -73,7 +73,7 @@ 3.3.1 3.3.0 3.1.2 - 1.2.2.Final + 2.1.0.Final @@ -92,11 +92,11 @@ import - org.jboss.shrinkwrap.resolver - shrinkwrap-resolver-bom - ${shrinkwrap.resolver.bom.version} - pom - import + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-bom + ${shrinkwrap.resolver.bom.version} + pom + import org.jboss.arquillian.selenium @@ -105,7 +105,7 @@ pom import - + ${project.groupId} @@ -655,6 +655,13 @@ wildfly-mysql-run + + + com.mysql + mysql-connector-j + test + + @@ -676,135 +683,69 @@ - org.apache.maven.plugins - maven-dependency-plugin + org.wildfly.plugins + wildfly-maven-plugin - unpack - process-test-classes - - unpack - - - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - false - target - - - - - - copy-mysql - process-test-classes + start-wildfly + install - copy + start - - - com.mysql - mysql-connector-j - jar - false - ${project.build.directory}/wildfly-${wildfly.version}/standalone/deployments - - + + + + wildfly-admin + xcsadmin + false + + + - copy-mysql-for-execution - process-test-classes + add-mysql + install - copy + deploy-artifact - - - com.mysql - mysql-connector-j - jar - false - ${project.build.directory} - mysql-connector-j-${mysql.connector.java.version}.jar - - + com.mysql + mysql-connector-j + mysql-connector-j-${mysql.connector.java.version}.jar - - - - - org.apache.maven.plugins - maven-resources-plugin - - copy-wildfly-resources - process-test-classes + configure-wildfly + install - copy-resources + execute-commands - ${project.build.directory}/wildfly-${wildfly.version}/standalone/configuration - - - src/test/resources-wildfly-embedded-mysql - standalone.xml - - + true + + data-source add --jndi-name=java:jboss/datasources/xcs --name=xcs-sample --jta=true --use-ccm=true + --connection-url=jdbc:mysql://localhost:3306/xcs?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Europe%2FMadrid --driver-name=mysql-connector-j-${mysql.connector.java.version}.jar + --user-name=xcs --password=xcs + /core-service=management/security-realm=RemotingRealm:add + /core-service=management/security-realm=RemotingRealm/authentication=jaas:add(name="AppRealmLoopThrough") + /subsystem=remoting/http-connector=http-remoting-connector:write-attribute(name="security-realm", value="RemotingRealm") + /subsystem=security/security-domain=AppRealmLoopThrough:add(cache-type=default) + /subsystem=security/security-domain=AppRealmLoopThrough/authentication=classic:add(login-modules=[{"code"=>"Client", "flag" => + "required", "module-options" => [("multi-threaded" => "true")]}]) + /subsystem=security/security-domain=xcs-sample-security-domain:add + /subsystem=security/security-domain=xcs-sample-security-domain/authentication=classic:add(login-modules=[{"code"=>"Database", "flag" + => "required", "module-options" => [("dsJndiName" => "java:jboss/datasources/xcs"),("principalsQuery" => "SELECT password FROM User WHERE + login=?"),("rolesQuery" => "SELECT role, 'Roles' FROM User WHERE login=?"),("hashAlgorithm" => "MD5"),("hashEncoding" => + "hex"),("ignorePasswordCase" => "true")]}]) + - - - - org.wildfly.plugins - wildfly-maven-plugin - - - - - deploy ${project.build.directory}/mysql-connector-j-${mysql.connector.java.version}.jar - data-source add --jndi-name=java:jboss/datasources/xcs --name=xcs-sample --jta=true --use-ccm=true - --connection-url=jdbc:mysql://localhost:3306/xcs?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Europe%2FMadrid --driver-name=mysql-connector-j-${mysql.connector.java.version}.jar - --user-name=xcs --password=xcs - /core-service=management/security-realm=RemotingRealm:add - /core-service=management/security-realm=RemotingRealm/authentication=jaas:add(name="AppRealmLoopThrough") - /subsystem=remoting/http-connector=http-remoting-connector:write-attribute(name="security-realm", value="RemotingRealm") - /subsystem=security/security-domain=AppRealmLoopThrough:add(cache-type=default) - /subsystem=security/security-domain=AppRealmLoopThrough/authentication=classic:add(login-modules=[{"code"=>"Client", "flag" => - "required", "module-options" => [("multi-threaded" => "true")]}]) - /subsystem=security/security-domain=xcs-sample-security-domain:add - /subsystem=security/security-domain=xcs-sample-security-domain/authentication=classic:add(login-modules=[{"code"=>"Database", "flag" - => "required", "module-options" => [("dsJndiName" => "java:jboss/datasources/xcs"),("principalsQuery" => "SELECT password FROM User WHERE - login=?"),("rolesQuery" => "SELECT role, 'Roles' FROM User WHERE login=?"),("hashAlgorithm" => "MD5"),("hashEncoding" => - "hex"),("ignorePasswordCase" => "true")]}]) - - - - - :reload - - - - - - wildfly-admin - xcsadmin - false - - - - - - start-wildfly + deploy-wildfly install - start deploy-only diff --git a/tests/pom.xml b/tests/pom.xml index d605111626b1f26f3795647ee46acf87296dd383..174203e4cc68813335c4743c5fac85d31e7aa5a9 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -1,5 +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 es.uvigo.esei.xcs @@ -34,4 +35,25 @@ compile + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + true + + + + + org.apache.maven.plugins + maven-resources-plugin + + true + + + +