|
8 | 8 | <parent> |
9 | 9 | <groupId>org.springframework.boot</groupId> |
10 | 10 | <artifactId>spring-boot-starter-parent</artifactId> |
11 | | - <version>2.7.18</version> |
| 11 | + <version>3.3.6</version> |
12 | 12 | <relativePath/> |
13 | 13 | </parent> |
14 | 14 | <artifactId>spring-helloworld</artifactId> |
| 15 | + <version>1-SNAPSHOT</version> |
15 | 16 | <packaging>jar</packaging> |
16 | 17 | <name>Deploy a Hello World Spring Boot application</name> |
17 | 18 | <properties> |
| 19 | + <!-- dependencies --> |
| 20 | + <junit.version>5.8.1</junit.version> |
| 21 | + <playwright.version>1.49.0</playwright.version> |
18 | 22 | <!-- other --> |
19 | 23 | <java.version>11</java.version> |
20 | 24 | <!-- plugins --> |
21 | | - <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> |
| 25 | + <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version> |
| 26 | + <maven-failsafe-plugin.version>3.5.2</maven-failsafe-plugin.version> |
| 27 | + <exec-maven-plugin.version>3.5.0</exec-maven-plugin.version> |
22 | 28 | </properties> |
23 | 29 | <build> |
24 | 30 | <finalName>spring-helloworld</finalName> |
|
27 | 33 | <groupId>org.apache.maven.plugins</groupId> |
28 | 34 | <artifactId>maven-compiler-plugin</artifactId> |
29 | 35 | <version>${maven-compiler-plugin.version}</version> |
30 | | - <configuration>${java.version}</configuration> |
| 36 | + <configuration> |
| 37 | + <release>${java.version}</release> |
| 38 | + </configuration> |
| 39 | + </plugin> |
| 40 | + <plugin> |
| 41 | + <groupId>org.apache.maven.plugins</groupId> |
| 42 | + <artifactId>maven-failsafe-plugin</artifactId> |
| 43 | + <version>${maven-failsafe-plugin.version}</version> |
| 44 | + <executions> |
| 45 | + <execution> |
| 46 | + <goals> |
| 47 | + <goal>integration-test</goal> |
| 48 | + <goal>verify</goal> |
| 49 | + </goals> |
| 50 | + </execution> |
| 51 | + </executions> |
31 | 52 | </plugin> |
32 | 53 | <plugin> |
33 | 54 | <groupId>org.springframework.boot</groupId> |
|
38 | 59 | <goal>repackage</goal> |
39 | 60 | </goals> |
40 | 61 | </execution> |
| 62 | + <execution> |
| 63 | + <id>pre-integration-test</id> |
| 64 | + <goals> |
| 65 | + <goal>start</goal> |
| 66 | + </goals> |
| 67 | + </execution> |
| 68 | + <execution> |
| 69 | + <id>post-integration-test</id> |
| 70 | + <goals> |
| 71 | + <goal>stop</goal> |
| 72 | + </goals> |
| 73 | + </execution> |
41 | 74 | </executions> |
42 | 75 | </plugin> |
43 | 76 | </plugins> |
|
47 | 80 | <groupId>org.springframework.boot</groupId> |
48 | 81 | <artifactId>spring-boot-starter-web</artifactId> |
49 | 82 | </dependency> |
| 83 | + <dependency> |
| 84 | + <groupId>org.junit.jupiter</groupId> |
| 85 | + <artifactId>junit-jupiter-api</artifactId> |
| 86 | + <version>${junit.version}</version> |
| 87 | + <scope>test</scope> |
| 88 | + </dependency> |
| 89 | + <dependency> |
| 90 | + <groupId>org.junit.jupiter</groupId> |
| 91 | + <artifactId>junit-jupiter-engine</artifactId> |
| 92 | + <version>${junit.version}</version> |
| 93 | + <scope>test</scope> |
| 94 | + </dependency> |
| 95 | + <dependency> |
| 96 | + <groupId>com.microsoft.playwright</groupId> |
| 97 | + <artifactId>playwright</artifactId> |
| 98 | + <version>${playwright.version}</version> |
| 99 | + <scope>test</scope> |
| 100 | + </dependency> |
50 | 101 | </dependencies> |
| 102 | + <profiles> |
| 103 | + <!-- |
| 104 | + |
| 105 | + This profile can be used to generate Playwright tests using the codegen command. |
| 106 | + |
| 107 | + To generate tests, run the following command: |
| 108 | + |
| 109 | + mvn -Pplaywright-codegen exec:java@codegen |
| 110 | + |
| 111 | + --> |
| 112 | + <profile> |
| 113 | + <id>playwright-codegen</id> |
| 114 | + <build> |
| 115 | + <plugins> |
| 116 | + <plugin> |
| 117 | + <groupId>org.codehaus.mojo</groupId> |
| 118 | + <artifactId>exec-maven-plugin</artifactId> |
| 119 | + <version>${exec-maven-plugin.version}</version> |
| 120 | + <executions> |
| 121 | + <execution> |
| 122 | + <id>codegen</id> |
| 123 | + <goals> |
| 124 | + <goal>java</goal> |
| 125 | + </goals> |
| 126 | + </execution> |
| 127 | + </executions> |
| 128 | + <configuration> |
| 129 | + <mainClass>com.microsoft.playwright.CLI</mainClass> |
| 130 | + <arguments> |
| 131 | + <argument>codegen</argument> |
| 132 | + </arguments> |
| 133 | + <classpathScope>test</classpathScope> |
| 134 | + </configuration> |
| 135 | + </plugin> |
| 136 | + </plugins> |
| 137 | + </build> |
| 138 | + </profile> |
| 139 | + </profiles> |
51 | 140 | </project> |
0 commit comments