Commit 6840294c authored by Administrator's avatar Administrator

Updates the project for the 16/17 course

The README.md has been update to reference the new course and the new
Eclipse version. In addition, the general pom.xml file has been updated
to include the newer versions of the dependencies, and the ear/pom.xml
has been modified to include more project information in the generated
EAR.

On the other hand, the testing mysql-ds.xml have been removed and the
standalone.xml testing files have been updated to include the datasource
data.
parent 0a51d50a
...@@ -5,7 +5,7 @@ the XCS subject inside the DGSS itinerary. ...@@ -5,7 +5,7 @@ the XCS subject inside the DGSS itinerary.
## Deployment Environment ## Deployment Environment
The environment is based on Maven 3, MySQL 5.5, WildFly 8.2.1 and Eclipse Mars The environment is based on Maven 3, MySQL 5.5, WildFly 8.2.1 and Eclipse Neon
for JEE. for JEE.
### Java JDK 8 ### Java JDK 8
...@@ -14,7 +14,7 @@ Download and install Java JDK 8, preferably the Oracle version (the commands ...@@ -14,7 +14,7 @@ Download and install Java JDK 8, preferably the Oracle version (the commands
### Maven ### Maven
Install Maven 3 in your system, if it was not installed (the `mvn` command must Install Maven 3 in your system, if it was not installed (the `mvn` command must
be available) be available). If you are in a Debian-based OS, install the `maven` package (**don't install `maven2` package!!**).
### Git ### Git
First, install git in your system if it was not installed (the `git` command First, install git in your system if it was not installed (the `git` command
...@@ -22,25 +22,20 @@ must be available). We will work with Git to get updates of these sample. ...@@ -22,25 +22,20 @@ must be available). We will work with Git to get updates of these sample.
Concretely, we will work with a Git repository inside Concretely, we will work with a Git repository inside
[our Gitlab server](http://sing.ei.uvigo.es/dt/gitlab). [our Gitlab server](http://sing.ei.uvigo.es/dt/gitlab).
Git URL: `http://sing.ei.uvigo.es/dt/gitlab/dgss/xcs-sample.git` Git URL: `http://sing.ei.uvigo.es/dt/gitlab/dgss-1617/xcs-sample.git`
### Eclipse ### Eclipse
You can use any other IDE, such as IntelliJ IDEA or NetBeans, as long as they
are compatible with Maven projects.
Before continue, you have **to patch Eclipse Mars**, concretely the m2e-wtp Open Eclipse Neon for Java EE and import your Maven project with
plugin. Go to `Help -> Install New Software`. Work with repository located
at `http://download.eclipse.org/m2e-wtp/snapshots/mars/` and then select and
install "Maven Integration for WTP". Restart Eclipse.
Open Eclipse Mars JEE and import your Maven project with
`File -> Import -> Maven -> Existing Maven Projects` `File -> Import -> Maven -> Existing Maven Projects`
Select your source code folder (where the `pom.xml` should be placed) Select your source code folder (where the `pom.xml` should be placed).
Eclipse should then import a parent project (`xcs-sample`) and 6 child projects Eclipse should then import a parent project (`xcs-sample`) and 6 child projects
(`tests`, `domain`, `service`, `rest`, `jsf` and `ear`). (`tests`, `domain`, `service`, `rest`, `jsf` and `ear`).
If you want, you can use any other IDE, such as IntelliJ IDEA or NetBeans, as long as they are compatible with Maven projects, but we recommend using Eclipse Neon for Java EE.
### MySQL ### MySQL
In order to run the tests with the `wildfly-embedded-mysql` profile (more about In order to run the tests with the `wildfly-embedded-mysql` profile (more about
this in the **Sample 2** section) and to run the application, we need a MySQL this in the **Sample 2** section) and to run the application, we need a MySQL
......
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId> <artifactId>maven-ear-plugin</artifactId>
<configuration> <configuration>
<applicationId>xcs-sample</applicationId>
<applicationName>XCS Sample</applicationName>
<displayName>XCS Sample</displayName>
<earName>${project.parent.artifactId}-${project.version}</earName>
<defaultLibBundleDir>lib/</defaultLibBundleDir> <defaultLibBundleDir>lib/</defaultLibBundleDir>
<skinnyWars>true</skinnyWars> <skinnyWars>true</skinnyWars>
<modules> <modules>
......
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ironjacamar.org/doc/schema"
xsi:schemaLocation="http://www.ironjacamar.org/doc/schema http://www.ironjacamar.org/doc/schema/datasources_1_1.xsd">
<datasource jndi-name="java:jboss/datasources/xcs" pool-name="MySQLPool">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<pool>
<max-pool-size>30</max-pool-size>
</pool>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
</datasources>
\ No newline at end of file
...@@ -152,6 +152,15 @@ ...@@ -152,6 +152,15 @@
<password>sa</password> <password>sa</password>
</security> </security>
</datasource> </datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/xcs" pool-name="xcs-mysql" enabled="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
<drivers> <drivers>
<driver name="h2" module="com.h2database.h2"> <driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<extension qualifier="persistence"> <extension qualifier="persistence">
<property name="defaultDataSeedStrategy">CLEAN_INSERT</property> <property name="defaultDataSeedStrategy">CLEAN_INSERT</property>
</extension> </extension>
<extension qualifier="webdriver">
<property name="browser">firefox</property>
</extension>
<container qualifier="wildfly-embedded-h2" default="true"> <container qualifier="wildfly-embedded-h2" default="true">
<configuration> <configuration>
......
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<!-- BOM versions --> <!-- BOM versions -->
<javaee.api.version>7.0</javaee.api.version> <javaee.api.version>7.0</javaee.api.version>
<arquillian.version>1.1.9.Final</arquillian.version> <arquillian.version>1.1.11.Final</arquillian.version>
<arquillian.rest.version>1.0.0.Alpha3</arquillian.rest.version> <arquillian.rest.version>1.0.0.Alpha3</arquillian.rest.version>
<arquillian.selenium.version>2.48.2</arquillian.selenium.version> <arquillian.selenium.version>2.53.1</arquillian.selenium.version>
<!-- Dependencies versions --> <!-- Dependencies versions -->
<wildfly.version>8.2.1.Final</wildfly.version> <wildfly.version>8.2.1.Final</wildfly.version>
...@@ -52,24 +52,24 @@ ...@@ -52,24 +52,24 @@
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
<hamcrest.version>2.0.0.0</hamcrest.version> <hamcrest.version>2.0.0.0</hamcrest.version>
<easymock.version>3.4</easymock.version> <easymock.version>3.4</easymock.version>
<jacoco.version>0.7.4.201502262128</jacoco.version> <jacoco.version>0.7.7.201606060606</jacoco.version>
<arquillian.jacoco.version>1.0.0.Alpha8</arquillian.jacoco.version> <arquillian.jacoco.version>1.0.0.Alpha8</arquillian.jacoco.version>
<arquillian.persistence.dbunit.version>1.0.0.Alpha7</arquillian.persistence.dbunit.version> <arquillian.persistence.dbunit.version>1.0.0.Alpha7</arquillian.persistence.dbunit.version>
<slf4j.version>1.5.10</slf4j.version> <slf4j.version>1.5.10</slf4j.version>
<mysql.connector.java.version>5.1.21</mysql.connector.java.version> <mysql.connector.java.version>5.1.21</mysql.connector.java.version>
<resteasy.version>3.0.13.Final</resteasy.version> <resteasy.version>3.0.19.Final</resteasy.version>
<graphene.webdrive.version>2.1.0.Alpha3</graphene.webdrive.version> <graphene.webdrive.version>2.1.0.Final</graphene.webdrive.version>
<!-- Plugins versions --> <!-- Plugins versions -->
<wildfly.maven.plugin.version>1.1.0.Alpha4</wildfly.maven.plugin.version> <wildfly.maven.plugin.version>1.1.0.Alpha11</wildfly.maven.plugin.version>
<maven.compiler.plugin.version>3.3</maven.compiler.plugin.version> <maven.compiler.plugin.version>3.5.1</maven.compiler.plugin.version>
<maven.source.plugin.version>2.4</maven.source.plugin.version> <maven.source.plugin.version>3.0.1</maven.source.plugin.version>
<maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version> <maven.javadoc.plugin.version>2.10.4</maven.javadoc.plugin.version>
<maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version> <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
<maven.dependency.plugin.version>2.10</maven.dependency.plugin.version> <maven.dependency.plugin.version>2.10</maven.dependency.plugin.version>
<maven.surefire.plugin.version>2.18.1</maven.surefire.plugin.version> <maven.surefire.plugin.version>2.19.1</maven.surefire.plugin.version>
<maven.resources.plugin.version>2.7</maven.resources.plugin.version> <maven.resources.plugin.version>3.0.1</maven.resources.plugin.version>
<maven.ear.plugin>2.10.1</maven.ear.plugin> <maven.ear.plugin.version>2.10.1</maven.ear.plugin.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId> <artifactId>maven-ear-plugin</artifactId>
<version>${maven.ear.plugin}</version> <version>${maven.ear.plugin.version}</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
...@@ -578,17 +578,11 @@ ...@@ -578,17 +578,11 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>target/wildfly-${wildfly.version}/standalone</outputDirectory> <outputDirectory>target/wildfly-${wildfly.version}/standalone/configuration</outputDirectory>
<resources> <resources>
<resource>
<directory>src/test/resources-wildfly-embedded-mysql</directory>
<include>mysql-ds.xml</include>
<targetPath>deployments</targetPath>
</resource>
<resource> <resource>
<directory>src/test/resources-wildfly-embedded-mysql</directory> <directory>src/test/resources-wildfly-embedded-mysql</directory>
<include>standalone.xml</include> <include>standalone.xml</include>
<targetPath>configuration</targetPath>
</resource> </resource>
</resources> </resources>
</configuration> </configuration>
......
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ironjacamar.org/doc/schema"
xsi:schemaLocation="http://www.ironjacamar.org/doc/schema http://www.ironjacamar.org/doc/schema/datasources_1_1.xsd">
<datasource jndi-name="java:jboss/datasources/xcs" pool-name="MySQLPool">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<pool>
<max-pool-size>30</max-pool-size>
</pool>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
</datasources>
\ No newline at end of file
...@@ -152,6 +152,15 @@ ...@@ -152,6 +152,15 @@
<password>sa</password> <password>sa</password>
</security> </security>
</datasource> </datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/xcs" pool-name="xcs-mysql" enabled="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
<drivers> <drivers>
<driver name="h2" module="com.h2database.h2"> <driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
......
<datasources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ironjacamar.org/doc/schema"
xsi:schemaLocation="http://www.ironjacamar.org/doc/schema http://www.ironjacamar.org/doc/schema/datasources_1_1.xsd">
<datasource jndi-name="java:jboss/datasources/xcs" pool-name="MySQLPool">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<pool>
<max-pool-size>30</max-pool-size>
</pool>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
</datasources>
\ No newline at end of file
...@@ -152,6 +152,15 @@ ...@@ -152,6 +152,15 @@
<password>sa</password> <password>sa</password>
</security> </security>
</datasource> </datasource>
<datasource jta="true" jndi-name="java:jboss/datasources/xcs" pool-name="xcs-mysql" enabled="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/xcs</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql-connector-java-${mysql.version}.jar</driver>
<security>
<user-name>xcs</user-name>
<password>xcs</password>
</security>
</datasource>
<drivers> <drivers>
<driver name="h2" module="com.h2database.h2"> <driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment