diff --git a/.gitignore b/.gitignore index 88063ce4122606dc88f27eefba9fe88f58cd8ddf..3c74e2ca5a5a6e2286f6fc6c425b11db1b698b24 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ WebContent # Testing /servers C:\\nppdf32Log\\debuglog.txt + +# Angular +src/main/angular diff --git a/README.md b/README.md index 35ed10d5b77f15d49ad7b365e7dc3007eb58c7d4..a590d6f5ec35e436a7485a2987a05ca1a0f69658 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,16 @@ Aplicación y arquitectura de ejemplo para la asignatura Desarrollo Ágil de Aplicaciones del Grado en Ingeniería Informática de la Escuela Superior de Ingeniería Informática de la Universidad de Vigo. +## Dependencias +Este proyecto está diseñado para ser desarrollado en un entorno con: + +* Maven 3 +* Java 8 +* MySQL 5.7.6+ o 8+ + +Además, se recomienda emplear la última versión de Eclipse IDE for Enterprise +Java Developers. + ## Ejecución con Maven La configuración de Maven ha sido preparada para permitir varios tipos de ejecución. @@ -60,9 +70,9 @@ El comando para lanzar esta construcción es: ### Construcción con tests de unidad, integración y aceptación -Esta construcción es similar a la previa, añadiendo las **pruebas de -aceptación**, que comprueban que las fucionalidades de la aplicación están -correctamente implementadas. +Esta construcción es similar a la previa, añadiendo las +**pruebas de aceptación**, que comprueban que las fucionalidades de la aplicación +están correctamente implementadas. En estas pruebas se descarga y arranca el un servidor Tomcat 8 en el que se despliega la aplicación configurada para utilizar una base de datos HSQL. Las diff --git a/db/mysql-with-inserts.sql b/db/mysql-with-inserts.sql index f678c3e9084aa903194ad5b620cc736e62a4be91..d7daea4bea4625b9b8785f6a0b9f9310cb870861 100644 --- a/db/mysql-with-inserts.sql +++ b/db/mysql-with-inserts.sql @@ -1,3 +1,4 @@ +DROP DATABASE IF EXISTS `daaexample`; CREATE DATABASE `daaexample`; CREATE TABLE `daaexample`.`people` ( @@ -14,7 +15,7 @@ CREATE TABLE `daaexample`.`users` ( PRIMARY KEY (`login`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa'; +CREATE USER IF NOT EXISTS 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa'; GRANT ALL ON `daaexample`.* TO 'daa'@'localhost'; INSERT INTO `daaexample`.`people` (`id`,`name`,`surname`) VALUES (0,'Antón','Pérez'); diff --git a/db/mysql.sql b/db/mysql.sql index 8fc20dbfffb1eef02e1d252c05f853e64f6d620d..116ae71b7273739848fe932b99815091eb683b79 100644 --- a/db/mysql.sql +++ b/db/mysql.sql @@ -1,3 +1,4 @@ +DROP DATABASE IF EXISTS `daaexample`; CREATE DATABASE `daaexample`; CREATE TABLE `daaexample`.`people` ( @@ -14,5 +15,5 @@ CREATE TABLE `daaexample`.`users` ( PRIMARY KEY (`login`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa'; +CREATE USER IF NOT EXISTS 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa'; GRANT ALL ON `daaexample`.* TO 'daa'@'localhost'; diff --git a/pom.xml b/pom.xml index ea47fd06862d138fb1ca575bce60367246a80e33..0fb95cb62bccc1c4d4d3f37dcd821c2d36aebf48 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ es.uvigo.esei.daa example-full-tests war - 0.1.18 + 0.1.19 DAA Example @@ -35,7 +35,7 @@ 1.7.21 - 4.12 + 4.13.2 2.0.0.0 3.5.1 3.141.59 @@ -44,11 +44,12 @@ 1.3.0 2.3.3 5.1.45 - v0.24.0 + v0.29.0 2.4.2 2.20.1 + 3.0.0 2.20.1 2.20.1 3.2.0 @@ -184,6 +185,16 @@ + + + + org.apache.maven.plugins + maven-jxr-plugin + ${maven-jxr-plugin.version} + + + + DAAExample @@ -571,7 +582,7 @@ cargo.datasource.jndi=jdbc/daaexample| cargo.datasource.driver=com.mysql.jdbc.Driver| - cargo.datasource.url=jdbc:mysql://localhost/daaexample| + cargo.datasource.url=jdbc:mysql://localhost/daaexample?useSSL=false| cargo.datasource.username=daa| cargo.datasource.password=daa| cargo.datasource.maxActive=8| diff --git a/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOTest.java b/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOTest.java index 68d93675fe9e7004aa2f7a29d50fa33d51da1a3e..04ee2a5383d1a4902c4f5f737e311817aac9ab36 100644 --- a/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOTest.java +++ b/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOTest.java @@ -12,7 +12,7 @@ import static es.uvigo.esei.daa.dataset.PeopleDataset.peopleWithout; import static es.uvigo.esei.daa.matchers.IsEqualToPerson.containsPeopleInAnyOrder; import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import javax.sql.DataSource; diff --git a/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOUnitTest.java b/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOUnitTest.java index 94ac74b92a0cf20ef651f4f7e4cdd7b908f0ee50..335c3b8dd9b9145dbf1f70dfb8b37b37a4fe708e 100644 --- a/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOUnitTest.java +++ b/src/test/java/es/uvigo/esei/daa/dao/PeopleDAOUnitTest.java @@ -14,7 +14,7 @@ import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.reset; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.sql.SQLException; diff --git a/src/test/java/es/uvigo/esei/daa/entities/PersonUnitTest.java b/src/test/java/es/uvigo/esei/daa/entities/PersonUnitTest.java index a648f5ddbaa0f9221a2ccfbed9e2a7d295c51a4d..4b40545da0a5efabac07496a64071f0e62bf39ff 100644 --- a/src/test/java/es/uvigo/esei/daa/entities/PersonUnitTest.java +++ b/src/test/java/es/uvigo/esei/daa/entities/PersonUnitTest.java @@ -2,7 +2,7 @@ package es.uvigo.esei.daa.entities; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Test; diff --git a/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceTest.java b/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceTest.java index 4cbc8be87daee45673830bfebfed6171a9135df9..1e0263898211837ad5cc6058fc9b4d6856c1a8a5 100644 --- a/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceTest.java +++ b/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceTest.java @@ -18,7 +18,7 @@ import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson; import static javax.ws.rs.client.Entity.entity; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.IOException; import java.util.List; diff --git a/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceUnitTest.java b/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceUnitTest.java index 5cb75654a8eca50305099a1cf3959f052e8f1e38..66b9b27089abbe858a0e462ab0c2cddbb3e4860a 100644 --- a/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceUnitTest.java +++ b/src/test/java/es/uvigo/esei/daa/rest/PeopleResourceUnitTest.java @@ -22,7 +22,7 @@ import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.util.List; diff --git a/src/test/java/es/uvigo/esei/daa/rest/UsersResourceTest.java b/src/test/java/es/uvigo/esei/daa/rest/UsersResourceTest.java index 0c74ad1d3e3531d283512c301ec3d54ac72cb28a..253ab07eed32f6fc94b5029b72472f80dc15db53 100644 --- a/src/test/java/es/uvigo/esei/daa/rest/UsersResourceTest.java +++ b/src/test/java/es/uvigo/esei/daa/rest/UsersResourceTest.java @@ -8,7 +8,7 @@ import static es.uvigo.esei.daa.matchers.HasHttpStatus.hasOkStatus; import static es.uvigo.esei.daa.matchers.HasHttpStatus.hasUnauthorized; import static es.uvigo.esei.daa.matchers.IsEqualToUser.equalsToUser; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.io.IOException; diff --git a/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java b/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java index 81313c8bdab5129e4a6f26e11bd69c78d520fd4f..8abf715f1e816e4dab51d75b2afd9394034fa60e 100644 --- a/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java +++ b/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java @@ -10,7 +10,7 @@ import static es.uvigo.esei.daa.matchers.IsEqualToPerson.containsPeopleInAnyOrde import static es.uvigo.esei.daa.matchers.IsEqualToPerson.equalsToPerson; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; import java.util.concurrent.TimeUnit; diff --git a/tomcat/server.mysql.xml b/tomcat/server.mysql.xml index 9e09ce4266820ed8cf391b69e57a4c89996527d8..e9b8849d9241961ced5189d47667cc5abc481871 100644 --- a/tomcat/server.mysql.xml +++ b/tomcat/server.mysql.xml @@ -138,7 +138,7 @@