|
6 | 6 | <artifactId>works-with-heroku</artifactId> |
7 | 7 | <version>1.0</version> |
8 | 8 | <packaging>war</packaging> |
| 9 | + |
9 | 10 | <properties> |
10 | 11 | <maven.compiler.source>17</maven.compiler.source> |
11 | 12 | <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> |
13 | 14 | </properties> |
| 15 | + |
14 | 16 | <dependencies> |
| 17 | + <!-- Updated to Jakarta Servlet API for JDK 17 compatibility --> |
15 | 18 | <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> |
19 | 22 | <scope>provided</scope> |
20 | 23 | </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> |
21 | 32 | <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> |
25 | 36 | <scope>test</scope> |
26 | 37 | </dependency> |
| 38 | + |
| 39 | + <!-- Updated to the latest version of Mockito --> |
27 | 40 | <dependency> |
28 | 41 | <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> |
31 | 44 | <scope>test</scope> |
32 | 45 | </dependency> |
33 | 46 | </dependencies> |
34 | 47 |
|
35 | 48 | <build> |
36 | 49 | <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 | + |
37 | 60 | <plugin> |
38 | 61 | <groupId>org.apache.maven.plugins</groupId> |
39 | 62 | <artifactId>maven-dependency-plugin</artifactId> |
40 | 63 | <version>2.3</version> |
41 | 64 | <executions> |
42 | 65 | <execution> |
43 | 66 | <phase>package</phase> |
44 | | - <goals><goal>copy</goal></goals> |
| 67 | + <goals> |
| 68 | + <goal>copy</goal> |
| 69 | + </goals> |
45 | 70 | <configuration> |
46 | 71 | <artifactItems> |
47 | 72 | <artifactItem> |
|
55 | 80 | </execution> |
56 | 81 | </executions> |
57 | 82 | </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> |
90 | 117 | </plugins> |
91 | 118 | </build> |
92 | 119 | </project> |
0 commit comments