From a282e2a506e0cd115b601b59d2a953ced51b4adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 25 Mar 2021 16:36:53 +0100 Subject: [PATCH 01/16] Arreglo de las dependencias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se ha aƱadido la dependencia de hsqldb para arreglar los problemas con el datasource --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 60be53522..3b5040d10 100644 --- a/pom.xml +++ b/pom.xml @@ -135,6 +135,12 @@ spring-boot-devtools true + + org.hsqldb + hsqldb + 2.5.1 + runtime + From bec8a51b81447b2eb519d57720674bf678b5948e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 25 Mar 2021 16:53:20 +0100 Subject: [PATCH 02/16] Arreglos travis --- pom.xml | 6 ------ src/main/resources/application-mysql.properties | 3 +-- src/main/resources/application.properties | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 3b5040d10..60be53522 100644 --- a/pom.xml +++ b/pom.xml @@ -135,12 +135,6 @@ spring-boot-devtools true - - org.hsqldb - hsqldb - 2.5.1 - runtime - diff --git a/src/main/resources/application-mysql.properties b/src/main/resources/application-mysql.properties index ccc6807c3..a2a4c4998 100644 --- a/src/main/resources/application-mysql.properties +++ b/src/main/resources/application-mysql.properties @@ -1,12 +1,11 @@ # database init, supports mysql too database=mysql -spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC} +#spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC} spring.datasource.username=${MYSQL_USER:cheapy} spring.datasource.password=${MYSQL_PASS:cheapy} # SQL is written to be idempotent so this is safe spring.datasource.initialization-mode=always -spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.javax.persistence.schema-generation.drop-source=metadata # Naming strategy spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index c93d5eac7..03c2f5c98 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,6 +4,7 @@ database=mysql spring.datasource.data=classpath*:db/${database}/data.sql spring.h2.console.enabled=true spring.profiles.active=mysql +spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC} # Web spring.thymeleaf.mode=HTML From ff9ced2fdd6a74f187e886b53c94469612ebbdba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 25 Mar 2021 16:58:41 +0100 Subject: [PATCH 03/16] Arreglos para travis --- .../cheapy/configuration/SecurityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java index 2fbdc84ad..00a18f6c5 100644 --- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java +++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java @@ -27,7 +27,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter { - @Autowired + @Autowired(required = true) DataSource dataSource; From d6c31ae90d1b34ac72d285ad5f55d6f840590fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 25 Mar 2021 17:03:25 +0100 Subject: [PATCH 04/16] Arreglos travis --- .../cheapy/configuration/SecurityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java index 00a18f6c5..094b2ba9d 100644 --- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java +++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java @@ -27,7 +27,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter { - @Autowired(required = true) + @Autowired(required = false) DataSource dataSource; From d0d9084c79b230bfdf4cdb03f2319512e09ce193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 25 Mar 2021 17:13:21 +0100 Subject: [PATCH 05/16] Arreglos travis --- .../cheapy/configuration/SecurityConfiguration.java | 2 +- src/main/resources/application.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java index 094b2ba9d..2fbdc84ad 100644 --- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java +++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java @@ -27,7 +27,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; @EnableWebSecurity public class SecurityConfiguration extends WebSecurityConfigurerAdapter { - @Autowired(required = false) + @Autowired DataSource dataSource; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 03c2f5c98..3962c5e57 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -5,6 +5,7 @@ spring.datasource.data=classpath*:db/${database}/data.sql spring.h2.console.enabled=true spring.profiles.active=mysql spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC} +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # Web spring.thymeleaf.mode=HTML From 3372f6e046bfbec2929e7151496400f846f051b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sun, 28 Mar 2021 18:49:28 +0200 Subject: [PATCH 06/16] cambios a postgres --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0ab78aad..f32f00d86 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,11 @@ spring-boot-devtools true - + + org.postgresql + postgresql + runtime + From 145dbeeaa9bd9679121380f03ebd481a82940566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sun, 28 Mar 2021 18:57:22 +0200 Subject: [PATCH 07/16] postgres --- src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3962c5e57..5f1cb5d17 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -5,7 +5,7 @@ spring.datasource.data=classpath*:db/${database}/data.sql spring.h2.console.enabled=true spring.profiles.active=mysql spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/cheapy?serverTimezone=UTC} -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.driver-class-name=org.postgresql.Driver # Web spring.thymeleaf.mode=HTML From 3334dd7ed4072ba642ff56a58bd8fca997d230e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Fri, 2 Apr 2021 23:17:52 +0200 Subject: [PATCH 08/16] Arreglos codacy --- .travis.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10ce67e89..4ebe860be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,21 @@ language: java jdk: oraclejdk8 services: - mysql +cache: + directories: + - "$HOME/.m2" +before_cache: + - rm -rf $HOME/.m2/repository/com/autentia/traviscodacy +before_install: + - sudo apt-get install jq + - wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url) + - chmod +x mvnw + - mysql -e 'CREATE DATABASE cheapy;' + - sudo apt-get update install: - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -before_install: -- chmod +x mvnw -- mysql -e 'CREATE DATABASE cheapy;' -- sudo apt-get update -script: - - mvn test -Dspring.profiles.active=mysql-travis + - pip install codacy-coverage + +after_success: + - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml From db424bca8c284682f341290a68e0494bfc954be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Fri, 2 Apr 2021 23:18:58 +0200 Subject: [PATCH 09/16] Arreglos codacy --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ebe860be..39a70b87e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,6 @@ before_install: - chmod +x mvnw - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update -install: - - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V - - pip install codacy-coverage - after_success: - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml From 189b80e947c5e0a7b91049d40024b991b22edd67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 13:33:08 +0200 Subject: [PATCH 10/16] Arreglo de codacy --- pom.xml | 100 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 41 deletions(-) diff --git a/pom.xml b/pom.xml index f32f00d86..52d7c73e3 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,12 @@ 2.2.4 1.8.0 - 0.8.5 + 0.7.6.201602180812 + ${project.build.directory} + ${project.build.directory}/jacoco + ${jacoco.utreportpath}/jacoco.exec + ${project.build.directory}/jacoco + ${jacoco.itreportpath}/jacoco-it.exec 0.0.4.RELEASE 0.0.25 @@ -152,46 +157,59 @@ - - org.springframework.boot - spring-boot-maven-plugin - - - - - build-info - - - - ${project.build.sourceEncoding} - ${project.reporting.outputEncoding} - ${maven.compiler.source} - ${maven.compiler.target} - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - - prepare-agent - - - - report - prepare-package - - report - - - - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + pre-unit-test + process-test-classes + + prepare-agent + + + surefireArgLine + ${jacoco.utreportfile} + true + + + + post-unit-test + test + + report + + + ${jacoco.utreportpath} + ${jacoco.utreportfile} + + + + pre-integration-test + pre-integration-test + + prepare-agent-integration + + + failsafeArgLine + ${jacoco.itreportfile} + true + + + + post-integration-test + post-integration-test + + report + + + ${jacoco.itreportpath} + ${jacoco.itreportfile} + + + + From 1bcc6ef9381655379b48b86ecaf9a9f0cf35002d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 13:39:49 +0200 Subject: [PATCH 11/16] Arreglo de codacy --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 39a70b87e..9c6cec2f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,5 +15,5 @@ before_install: - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update after_success: - - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml + - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/site/jacoco/jacoco.xml From 6e3869f747db262d4394793d293d61cc956a1a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 13:50:34 +0200 Subject: [PATCH 12/16] arreglos codacy --- .travis.yml | 3 ++- pom.xml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c6cec2f1..5f0394161 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,5 +15,6 @@ before_install: - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update after_success: - - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/site/jacoco/jacoco.xml + - ls target + - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml diff --git a/pom.xml b/pom.xml index 52d7c73e3..d8298785c 100644 --- a/pom.xml +++ b/pom.xml @@ -29,9 +29,8 @@ 0.7.6.201602180812 ${project.build.directory} - ${project.build.directory}/jacoco + ${project.build.directory} ${jacoco.utreportpath}/jacoco.exec - ${project.build.directory}/jacoco ${jacoco.itreportpath}/jacoco-it.exec 0.0.4.RELEASE 0.0.25 From 27704692308c1f7b90eaa8ed4b78575e2ea2bc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 14:02:32 +0200 Subject: [PATCH 13/16] Arreglos traviss --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f0394161..ad24140b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,6 @@ before_install: - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update after_success: - - ls target + - ls - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml From af27f799060a838ef68b47666879b71ec0d672ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 14:09:28 +0200 Subject: [PATCH 14/16] Arreglos travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ad24140b1..348d2ef3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ before_install: - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update after_success: + - mvn test - ls - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml From 1e8bba10736085a2710963dbb1bacab895bbe766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 15:07:28 +0200 Subject: [PATCH 15/16] Arreglos travis --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 348d2ef3c..d754b5b38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ before_install: - sudo apt-get update after_success: - mvn test - - ls + - ls + - ls target + - ls target/site - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml From 6864541de22213ac0315fbc653553dbe920803e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Sat, 3 Apr 2021 15:49:52 +0200 Subject: [PATCH 16/16] Arreglo travis y codacy --- .travis.yml | 5 +-- pom.xml | 118 +++++++++++++++++++++++++++------------------------- 2 files changed, 63 insertions(+), 60 deletions(-) diff --git a/.travis.yml b/.travis.yml index d754b5b38..4957b38a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,8 @@ before_install: - mysql -e 'CREATE DATABASE cheapy;' - sudo apt-get update after_success: - - mvn test - ls - ls target - - ls target/site - - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco.xml + - ls target/jacoco + - java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r target/jacoco/jacoco.xml diff --git a/pom.xml b/pom.xml index d8298785c..eacae383f 100644 --- a/pom.xml +++ b/pom.xml @@ -27,10 +27,11 @@ 2.2.4 1.8.0 - 0.7.6.201602180812 - ${project.build.directory} - ${project.build.directory} - ${jacoco.utreportpath}/jacoco.exec + 0.8.5 + ${project.build.directory}/jacoco + ${project.build.directory}/jacoco.exec + + ${project.build.directory}/jacoco ${jacoco.itreportpath}/jacoco-it.exec 0.0.4.RELEASE 0.0.25 @@ -156,59 +157,62 @@ - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - pre-unit-test - process-test-classes - - prepare-agent - - - surefireArgLine - ${jacoco.utreportfile} - true - - - - post-unit-test - test - - report - - - ${jacoco.utreportpath} - ${jacoco.utreportfile} - - - - pre-integration-test - pre-integration-test - - prepare-agent-integration - - - failsafeArgLine - ${jacoco.itreportfile} - true - - - - post-integration-test - post-integration-test - - report - - - ${jacoco.itreportpath} - ${jacoco.itreportfile} - - - - + + org.springframework.boot + spring-boot-maven-plugin + + + + + build-info + + + + ${project.build.sourceEncoding} + ${project.reporting.outputEncoding} + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + + report + prepare-package + + report + + + ${jacoco.utreportpath} + ${jacoco.utreportfile} + + + + test + test + + report + + + ${jacoco.utreportpath} + ${jacoco.utreportfile} + + + +