Skip to content

Commit

Permalink
Fixes #4365 - Cleanup test/micro/helloworld/pom.xml (#4374)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem authored Dec 14, 2024
1 parent baff39b commit 13fa203
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<native-image-maven-plugin.version>21.2.0</native-image-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<tidy-maven-plugin.version>1.3.0</tidy-maven-plugin.version>
<versions-maven-plugin.version>2.18.1</versions-maven-plugin.version>
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
<!-- other -->
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
31 changes: 2 additions & 29 deletions test/micro/helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,25 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
WARNING - Do not remove the versions in the properties section as this
particular project is used as a basis for the guide content at
docs/src/site/markdown/micro/create_a_hello_world_web_application.md.
When updating the guide do the following:
1. Drop the parent part below
2. Change the name of the project to read 'Create a Hello World application'
3. Change the version to the latest released version of Piranha
-->
<parent>
<groupId>cloud.piranha.test.micro</groupId>
<artifactId>project</artifactId>
<version>25.1.0-SNAPSHOT</version>
</parent>
<groupId>cloud.piranha.test.micro</groupId>
<artifactId>helloworld</artifactId>
<version>25.1.0-SNAPSHOT</version>
<artifactId>piranha-test-micro-helloworld</artifactId>
<packaging>war</packaging>
<name>Piranha - Test - Micro - Hello World application</name>
<properties>
<!-- dependencies -->
<jakarta.jakartaee-web-api.version>11.0.0-M4</jakarta.jakartaee-web-api.version>
<junit.version>5.11.2</junit.version>
<!-- other -->
<java.version>21</java.version>
<piranha.distribution>micro</piranha.distribution>
<piranha.version>${project.version}</piranha.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- plugins -->
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-failsafe-plugin.version>3.5.1</maven-failsafe-plugin.version>
<maven-war-plugin.version>3.4.0</maven-war-plugin.version>
</properties>
<build>
<finalName>helloworld</finalName>
<finalName>piranha-test-micro-helloworld</finalName>
<plugins>
<!--
<plugin>
Expand Down Expand Up @@ -76,15 +55,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<executions>
<execution>
<goals>
Expand All @@ -102,15 +79,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>reserve-network-port</id>
Expand All @@ -132,13 +107,11 @@
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<version>${jakarta.jakartaee-web-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void testHelloWorld() throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest
.newBuilder(new URI("http://localhost:" +
Integer.valueOf(System.getProperty("httpPort")) + "/index.html"))
Integer.valueOf(System.getProperty("httpPort")) + "/piranha-test-micro-helloworld/index.html"))
.build();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
assertTrue(response.body().contains("Hello World!"));
Expand Down

0 comments on commit 13fa203

Please sign in to comment.