Skip to content

Commit 117dd1a

Browse files
authored
Update pom.xml
1 parent db32447 commit 117dd1a

1 file changed

Lines changed: 69 additions & 42 deletions

File tree

pom.xml

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,67 @@
66
<artifactId>works-with-heroku</artifactId>
77
<version>1.0</version>
88
<packaging>war</packaging>
9+
910
<properties>
1011
<maven.compiler.source>17</maven.compiler.source>
1112
<maven.compiler.target>17</maven.compiler.target>
12-
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
13+
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
1314
</properties>
15+
1416
<dependencies>
17+
<!-- Updated to Jakarta Servlet API for JDK 17 compatibility -->
1518
<dependency>
16-
<groupId>javax.servlet</groupId>
17-
<artifactId>servlet-api</artifactId>
18-
<version>2.5</version>
19+
<groupId>jakarta.servlet</groupId>
20+
<artifactId>jakarta.servlet-api</artifactId>
21+
<version>5.0.0</version>
1922
<scope>provided</scope>
2023
</dependency>
24+
25+
<!-- Update to JUnit 5 for better compatibility with modern Java versions -->
26+
<dependency>
27+
<groupId>org.junit.jupiter</groupId>
28+
<artifactId>junit-jupiter-api</artifactId>
29+
<version>5.7.2</version>
30+
<scope>test</scope>
31+
</dependency>
2132
<dependency>
22-
<groupId>junit</groupId>
23-
<artifactId>junit</artifactId>
24-
<version>4.12</version>
33+
<groupId>org.junit.jupiter</groupId>
34+
<artifactId>junit-jupiter-engine</artifactId>
35+
<version>5.7.2</version>
2536
<scope>test</scope>
2637
</dependency>
38+
39+
<!-- Updated to the latest version of Mockito -->
2740
<dependency>
2841
<groupId>org.mockito</groupId>
29-
<artifactId>mockito-all</artifactId>
30-
<version>1.10.19</version>
42+
<artifactId>mockito-core</artifactId>
43+
<version>3.10.0</version>
3144
<scope>test</scope>
3245
</dependency>
3346
</dependencies>
3447

3548
<build>
3649
<plugins>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-compiler-plugin</artifactId>
53+
<version>3.10.0</version>
54+
<configuration>
55+
<source>17</source>
56+
<target>17</target>
57+
</configuration>
58+
</plugin>
59+
3760
<plugin>
3861
<groupId>org.apache.maven.plugins</groupId>
3962
<artifactId>maven-dependency-plugin</artifactId>
4063
<version>2.3</version>
4164
<executions>
4265
<execution>
4366
<phase>package</phase>
44-
<goals><goal>copy</goal></goals>
67+
<goals>
68+
<goal>copy</goal>
69+
</goals>
4570
<configuration>
4671
<artifactItems>
4772
<artifactItem>
@@ -55,38 +80,40 @@
5580
</execution>
5681
</executions>
5782
</plugin>
58-
<plugin>
59-
<groupId>io.github.robb3n</groupId>
60-
<artifactId>sonar-quality-gate-maven-plugin</artifactId>
61-
<version>1.3.0</version>
62-
</plugin>
63-
<plugin>
64-
<groupId>org.jacoco</groupId>
65-
<artifactId>jacoco-maven-plugin</artifactId>
66-
<version>0.8.8</version>
67-
<configuration>
68-
<destfile>${basedir}/target/jacoco.exec</destfile>
69-
<datafile>${basedir}/target/jacoco.exec</datafile>
70-
<output>file</output>
71-
<append>true</append>
72-
</configuration>
73-
<executions>
74-
<execution>
75-
<id>jacoco-initialize</id>
76-
<goals>
77-
<goal>prepare-agent</goal>
78-
</goals>
79-
<phase>test-compile</phase>
80-
</execution>
81-
<execution>
82-
<id>jacoco-site</id>
83-
<phase>test-compile</phase>
84-
<goals>
85-
<goal>report</goal>
86-
</goals>
87-
</execution>
88-
</executions>
89-
</plugin>
83+
84+
<plugin>
85+
<groupId>io.github.robb3n</groupId>
86+
<artifactId>sonar-quality-gate-maven-plugin</artifactId>
87+
<version>1.3.0</version>
88+
</plugin>
89+
90+
<plugin>
91+
<groupId>org.jacoco</groupId>
92+
<artifactId>jacoco-maven-plugin</artifactId>
93+
<version>0.8.8</version>
94+
<configuration>
95+
<destfile>${basedir}/target/jacoco.exec</destfile>
96+
<datafile>${basedir}/target/jacoco.exec</datafile>
97+
<output>file</output>
98+
<append>true</append>
99+
</configuration>
100+
<executions>
101+
<execution>
102+
<id>jacoco-initialize</id>
103+
<goals>
104+
<goal>prepare-agent</goal>
105+
</goals>
106+
<phase>test-compile</phase>
107+
</execution>
108+
<execution>
109+
<id>jacoco-site</id>
110+
<phase>test-compile</phase>
111+
<goals>
112+
<goal>report</goal>
113+
</goals>
114+
</execution>
115+
</executions>
116+
</plugin>
90117
</plugins>
91118
</build>
92119
</project>

0 commit comments

Comments
 (0)