Skip to content

Commit 0de3743

Browse files
updated
1 parent ebf535b commit 0de3743

File tree

5 files changed

+187
-146
lines changed

5 files changed

+187
-146
lines changed

.github/workflows/test-sonar.yml renamed to .github/workflows/continuous-integration.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
name: DevOps
1+
name: CI
22
on:
33
push:
4-
branches: [ 'develop', 'release-*' ]
4+
branches: [develop]
55
jobs:
66
devops:
77
name: Test - Unit & Integration & SonarCloud Scan & Slack WebHook
8-
runs-on: ubuntu-latest # macos-latest macos-11 windows-2019 ubuntu-20.04
8+
runs-on: ubuntu-22.04 # macos-latest macos-11 windows-2019 ubuntu-20.04
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
with: { fetch-depth: 0 }
12-
- uses: actions/setup-java@v1
12+
- uses: actions/setup-java@v4
1313
with:
14-
java-version: 17
14+
distribution: zulu
15+
java-version: 21
1516
- name: Unit & Integration Tests
1617
run: mvn -B verify # -B: --batch-mode
1718
- name: Sonar

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
## [Máster en Ingeniería Web por la Universidad Politécnica de Madrid (miw-upm)](http://miw.etsisi.upm.es)
2+
23
## Arquitectura y Patrones para Aplicaciones Web
3-
> Este proyecto es un apoyo docente de la asignatura. Cada release liberada corresponde al código utilizado en clase del curso indicado
4+
5+
> Este proyecto es un apoyo docente de la asignatura. Cada release liberada corresponde al código utilizado en clase del
6+
> curso indicado
47
58
### Estado del código
6-
[![DevOps](https://github.com/miw-upm/apaw/actions/workflows/test-sonar.yml/badge.svg)](https://github.com/miw-upm/apaw/actions/workflows/test-sonar.yml)
9+
[![DevOps](https://github.com/miw-upm/apaw/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/miw-upm/apaw/actions/workflows/continuous-integration.yml)
710
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=es.upm.miw%3Aapaw&metric=alert_status)](https://sonarcloud.io/dashboard?id=es.upm.miw%3Aapaw)
811

912
### Tecnologías necesarias
13+
1014
`Java` `Maven` `GitHub` `GitHub Actions CI` `Sonarcloud` `Better Code Hub` `Slack` `Spring-boot` `Heroku` `OpenAPI`
1115

1216
### :gear: Instalación del proyecto
17+
1318
1. Clonar el repositorio en tu equipo, **mediante consola**:
19+
1420
```sh
1521
> cd <folder path>
1622
> git clone https://github.com/miw-upm/apaw
1723
```
24+
1825
2. Importar el proyecto mediante **IntelliJ IDEA**
1926
1. **Open Project**, y seleccionar la carpeta del proyecto.
2027
1. Marcar **Create Project from external model**, elegir **Maven**.
21-
1. **Next****Finish**.
22-
28+
1. **Next****Finish**.
2329

2430
### :book: Diapositivas (/docs)
25-
* [Diapositivas en docs/miw-apaw-slides.pdf](docs/miw-apaw-slides.pdf)
31+
32+
* [Diapositivas en docs/miw-apaw-slides.pdf](docs/miw-apaw-slides.pdf)
2633

2734
### :movie_camera: Videos (www.youtube.com/miw-upm)
2835

@@ -89,11 +96,11 @@ issue y se podrá continuar, sino, se deberán realizar los cambios.
8996
* Simplificar el código.
9097
* Eliminar comentarios.
9198
* Estructuras anidadas: <3.
92-
* Complejidad ciclomática: <8-12.
93-
* Métricas.
94-
* Paquete: <20 clases.
95-
* Clases: <500-200 líneas, <20 métodos.
96-
* Métodos: <3-4 parámetros, <15 líneas.
99+
* Complejidad ciclomática: <8-12.
100+
* Métricas.
101+
* Paquete: <20 clases.
102+
* Clases: <500-200 líneas, <20 métodos.
103+
* Métodos: <3-4 parámetros, <15 líneas.
97104
* Eliminar redundancias (copy & paste).
98105
* Eliminar código muerto.
99106
* Tratamiento de errores.

pom.xml

Lines changed: 130 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,144 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
55

6-
<artifactId>apaw</artifactId>
7-
<groupId>es.upm.miw</groupId>
8-
<version>1.7.0-SNAPSHOT</version>
9-
<packaging>jar</packaging>
6+
<artifactId>apaw</artifactId>
7+
<groupId>es.upm.miw</groupId>
8+
<version>1.7.0-SNAPSHOT</version>
9+
<packaging>jar</packaging>
1010

11-
<name>${project.groupId}.${project.artifactId}</name>
12-
<description>Proyecto para apoyo docente a la asignatura Arquitectura y Patrones para Aplicaciones Web (MIW-UPM)</description>
13-
<url>http://github.com/miw-upm/apaw</url>
11+
<name>${project.groupId}.${project.artifactId}</name>
12+
<description>Proyecto para apoyo docente a la asignatura Arquitectura y Patrones para Aplicaciones Web (MIW-UPM)
13+
</description>
14+
<url>http://github.com/miw-upm/apaw</url>
1415

15-
<licenses>
16-
<license>
17-
<name>MIT License</name>
18-
<url>http://www.opensource.org/licenses/mit-license.php</url>
19-
</license>
20-
</licenses>
16+
<licenses>
17+
<license>
18+
<name>MIT License</name>
19+
<url>http://www.opensource.org/licenses/mit-license.php</url>
20+
</license>
21+
</licenses>
2122

22-
<developers>
23-
<developer>
24-
<name>Jesus Bernal</name>
25-
<id>J.Bernal</id>
26-
<email>j.bernal@upm.es</email>
27-
<organization>MIW-UPM</organization>
28-
<organizationUrl>http://miw.etsisi.upm.es</organizationUrl>
29-
</developer>
30-
</developers>
23+
<developers>
24+
<developer>
25+
<name>Jesus Bernal</name>
26+
<id>J.Bernal</id>
27+
<email>j.bernal@upm.es</email>
28+
<organization>MIW-UPM</organization>
29+
<organizationUrl>http://miw.etsisi.upm.es</organizationUrl>
30+
</developer>
31+
</developers>
3132

32-
<properties>
33-
<!-- Encode -->
34-
<encoding>UTF-8</encoding>
35-
<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
36-
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
37-
<project.resources.sourceEncoding>${encoding}</project.resources.sourceEncoding>
38-
<!-- Java -->
39-
<maven.compile.source>17</maven.compile.source>
40-
<deploy>${project.artifactId}-${project.version}</deploy>
41-
<!-- Maven -->
42-
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
43-
<maven.compiler.version>3.8.1</maven.compiler.version>
44-
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
45-
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
46-
<!-- Test -->
47-
<junit-jupiter-engine.version>5.10.0</junit-jupiter-engine.version>
48-
<!-- coverage report -->
49-
<jacoco.version>0.8.10</jacoco.version>
50-
<!-- Logs -->
33+
<properties>
34+
<!-- Encode -->
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
37+
<project.resources.sourceEncoding>UTF-8</project.resources.sourceEncoding>
38+
<!-- Java -->
39+
<maven.compile.source>21</maven.compile.source>
40+
<deploy>${project.artifactId}-${project.version}</deploy>
41+
<!-- Maven -->
42+
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
43+
<maven.compiler.version>3.13.0</maven.compiler.version>
44+
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
45+
<maven-failsafe-plugin.version>3.5.2</maven-failsafe-plugin.version>
46+
<!-- Test -->
47+
<junit-jupiter-engine.version>5.11.4</junit-jupiter-engine.version>
48+
<!-- coverage report -->
49+
<jacoco.version>0.8.12</jacoco.version>
50+
<!-- Logs -->
5151
<log4j.version>2.20.0</log4j.version>
52-
<!-- project reactor -->
52+
<!-- project reactor -->
5353
<projectreactor.version>3.5.10</projectreactor.version>
54-
</properties>
54+
</properties>
5555

56-
<dependencies>
57-
<!-- Logs -->
58-
<dependency>
59-
<groupId>org.apache.logging.log4j</groupId>
60-
<artifactId>log4j-api</artifactId>
61-
<version>${log4j.version}</version>
62-
</dependency>
63-
<dependency>
64-
<groupId>org.apache.logging.log4j</groupId>
65-
<artifactId>log4j-core</artifactId>
66-
<version>${log4j.version}</version>
67-
</dependency>
68-
<dependency>
69-
<groupId>org.apache.logging.log4j</groupId>
70-
<artifactId>log4j-slf4j-impl</artifactId>
71-
<version>${log4j.version}</version>
72-
</dependency>
56+
<dependencies>
57+
<!-- Logs -->
58+
<dependency>
59+
<groupId>org.apache.logging.log4j</groupId>
60+
<artifactId>log4j-api</artifactId>
61+
<version>${log4j.version}</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.apache.logging.log4j</groupId>
65+
<artifactId>log4j-core</artifactId>
66+
<version>${log4j.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.apache.logging.log4j</groupId>
70+
<artifactId>log4j-slf4j-impl</artifactId>
71+
<version>${log4j.version}</version>
72+
</dependency>
7373
<dependency>
7474
<groupId>io.projectreactor</groupId>
7575
<artifactId>reactor-core</artifactId>
76-
<version>${projectreactor.version}</version>
76+
<version>${projectreactor.version}</version>
77+
</dependency>
78+
<!-- Test -->
79+
<dependency>
80+
<groupId>org.junit.jupiter</groupId>
81+
<artifactId>junit-jupiter-engine</artifactId>
82+
<version>${junit-jupiter-engine.version}</version>
83+
<scope>test</scope>
84+
</dependency>
85+
<dependency>
86+
<groupId>io.projectreactor</groupId>
87+
<artifactId>reactor-test</artifactId>
88+
<scope>test</scope>
89+
<version>${projectreactor.version}</version>
7790
</dependency>
78-
<!-- Test -->
79-
<dependency>
80-
<groupId>org.junit.jupiter</groupId>
81-
<artifactId>junit-jupiter-engine</artifactId>
82-
<version>${junit-jupiter-engine.version}</version>
83-
<scope>test</scope>
84-
</dependency>
85-
<dependency>
86-
<groupId>io.projectreactor</groupId>
87-
<artifactId>reactor-test</artifactId>
88-
<scope>test</scope>
89-
<version>${projectreactor.version}</version>
90-
</dependency>
91-
</dependencies>
92-
<build>
93-
<plugins>
94-
<plugin>
95-
<groupId>org.apache.maven.plugins</groupId>
96-
<artifactId>maven-compiler-plugin</artifactId>
97-
<version>${maven.compiler.version}</version>
98-
<configuration>
99-
<source>${maven.compile.source}</source>
100-
<target>${maven.compile.source}</target>
101-
<release>${maven.compile.source}</release>
102-
</configuration>
103-
</plugin>
104-
<plugin>
105-
<groupId>org.jacoco</groupId>
106-
<artifactId>jacoco-maven-plugin</artifactId>
107-
<version>${jacoco.version}</version>
108-
<executions>
109-
<execution>
110-
<id>default-prepare-agent</id>
111-
<goals>
112-
<goal>prepare-agent</goal>
113-
</goals>
114-
</execution>
115-
<execution>
116-
<id>default-report</id>
117-
<phase>post-integration-test</phase>
118-
<goals>
119-
<goal>report</goal>
120-
</goals>
121-
</execution>
122-
</executions>
123-
</plugin>
124-
<plugin>
125-
<groupId>org.apache.maven.plugins</groupId>
126-
<artifactId>maven-surefire-plugin</artifactId>
127-
<version>${maven-surefire-plugin.version}</version>
128-
</plugin>
129-
<plugin>
130-
<groupId>org.apache.maven.plugins</groupId>
131-
<artifactId>maven-failsafe-plugin</artifactId>
132-
<version>${maven-failsafe-plugin.version}</version>
133-
<executions>
134-
<execution>
135-
<goals>
136-
<goal>integration-test</goal>
137-
<goal>verify</goal>
138-
</goals>
139-
</execution>
140-
</executions>
141-
</plugin>
142-
</plugins>
143-
</build>
91+
</dependencies>
92+
<build>
93+
<plugins>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-compiler-plugin</artifactId>
97+
<version>${maven.compiler.version}</version>
98+
<configuration>
99+
<source>${maven.compile.source}</source>
100+
<target>${maven.compile.source}</target>
101+
<release>${maven.compile.source}</release>
102+
</configuration>
103+
</plugin>
104+
<plugin>
105+
<groupId>org.jacoco</groupId>
106+
<artifactId>jacoco-maven-plugin</artifactId>
107+
<version>${jacoco.version}</version>
108+
<executions>
109+
<execution>
110+
<id>default-prepare-agent</id>
111+
<goals>
112+
<goal>prepare-agent</goal>
113+
</goals>
114+
</execution>
115+
<execution>
116+
<id>default-report</id>
117+
<phase>post-integration-test</phase>
118+
<goals>
119+
<goal>report</goal>
120+
</goals>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-surefire-plugin</artifactId>
127+
<version>${maven-surefire-plugin.version}</version>
128+
</plugin>
129+
<plugin>
130+
<groupId>org.apache.maven.plugins</groupId>
131+
<artifactId>maven-failsafe-plugin</artifactId>
132+
<version>${maven-failsafe-plugin.version}</version>
133+
<executions>
134+
<execution>
135+
<goals>
136+
<goal>integration-test</goal>
137+
<goal>verify</goal>
138+
</goals>
139+
</execution>
140+
</executions>
141+
</plugin>
142+
</plugins>
143+
</build>
144144
</project>

src/main/resources/log4j2.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Configuration:
2+
status: WARN
3+
name: YAMLConfig
4+
5+
properties:
6+
Property:
7+
- name: pattern
8+
value: "[%-5level] %d{dd/MMM HH:mm:ss} %-30.30c{2} -> %msg%n"
9+
10+
appenders:
11+
RollingFile:
12+
name: RollingFile
13+
fileName: target/logs/log.log
14+
filePattern: target/logs/log-%d{MM-dd-yy-HH-mm-ss}-%i.log
15+
PatternLayout:
16+
Pattern: "${pattern}"
17+
Policies:
18+
TimeBasedTriggeringPolicy:
19+
interval: 1
20+
DefaultRolloverStrategy:
21+
max: 20
22+
23+
Console:
24+
name: Console
25+
PatternLayout:
26+
Pattern: "${pattern}"
27+
28+
Loggers:
29+
Root:
30+
level: info
31+
AppenderRef:
32+
- ref: RollingFile
33+
- ref: Console
File renamed without changes.

0 commit comments

Comments
 (0)