Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit cf50809

Browse files
committed
add dev mode IT
1 parent 1b616d3 commit cf50809

File tree

9 files changed

+855
-14
lines changed

9 files changed

+855
-14
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?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>
5+
6+
<groupId>io.openliberty.tools.it</groupId>
7+
<artifactId>test-liberty-dev-mode</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
<packaging>jar</packaging>
10+
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14+
<maven.compiler.source>1.7</maven.compiler.source>
15+
<maven.compiler.target>1.7</maven.compiler.target>
16+
</properties>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>junit</groupId>
21+
<artifactId>junit</artifactId>
22+
<version>4.12</version>
23+
</dependency>
24+
<dependency>
25+
<groupId>io.openliberty.tools</groupId>
26+
<artifactId>liberty-maven-plugin</artifactId>
27+
<version>3.0.1</version>
28+
</dependency>
29+
</dependencies>
30+
31+
<build>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.apache.maven.plugins</groupId>
35+
<artifactId>maven-failsafe-plugin</artifactId>
36+
<version>2.19.1</version>
37+
<configuration>
38+
<redirectTestOutputToFile>true</redirectTestOutputToFile>
39+
<forkMode>once</forkMode>
40+
<forkedProcessTimeoutInSeconds>1200</forkedProcessTimeoutInSeconds>
41+
<argLine>-enableassertions</argLine>
42+
<workingDirectory>${project.build.directory}</workingDirectory>
43+
<includes>
44+
<include>**/*Test.java</include>
45+
</includes>
46+
<systemPropertyVariables>
47+
<mavenPluginVersion>@pom.version@</mavenPluginVersion>
48+
<runtimeVersion>${runtimeVersion}</runtimeVersion>
49+
</systemPropertyVariables>
50+
<trimStackTrace>false</trimStackTrace>
51+
</configuration>
52+
<executions>
53+
<execution>
54+
<id>integration-test</id>
55+
<goals>
56+
<goal>integration-test</goal>
57+
</goals>
58+
</execution>
59+
<execution>
60+
<id>verify</id>
61+
<phase>install</phase>
62+
<goals>
63+
<goal>verify</goal>
64+
</goals>
65+
</execution>
66+
</executions>
67+
</plugin>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-surefire-plugin</artifactId>
71+
<version>2.19.1</version>
72+
<configuration>
73+
<skip>true</skip>
74+
</configuration>
75+
</plugin>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-jar-plugin</artifactId>
79+
<version>3.1.0</version>
80+
<executions>
81+
<execution>
82+
<goals>
83+
<goal>test-jar</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
91+
<profiles>
92+
<profile>
93+
<id>ol</id>
94+
<activation>
95+
<property>
96+
<name>boostRuntime</name>
97+
<value>ol</value>
98+
</property>
99+
</activation>
100+
</profile>
101+
<profile>
102+
<id>wlp</id>
103+
<activation>
104+
<property>
105+
<name>boostRuntime</name>
106+
<value>wlp</value>
107+
</property>
108+
</activation>
109+
</profile>
110+
<profile>
111+
<id>tomee</id>
112+
<activation>
113+
<property>
114+
<name>boostRuntime</name>
115+
<value>tomee</value>
116+
</property>
117+
</activation>
118+
<properties>
119+
<skipITs>true</skipITs>
120+
</properties>
121+
</profile>
122+
</profiles>
123+
124+
</project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.demo;
2+
3+
import javax.enterprise.context.ApplicationScoped;
4+
import org.eclipse.microprofile.health.Health;
5+
import org.eclipse.microprofile.health.HealthCheck;
6+
import org.eclipse.microprofile.health.HealthCheckResponse;
7+
8+
@Health
9+
@ApplicationScoped
10+
public class SystemHealth implements HealthCheck {
11+
@Override
12+
public HealthCheckResponse call() {
13+
if (!System.getProperty("wlp.server.name").startsWith("defaultServer")) {
14+
return HealthCheckResponse.named(HelloWorld.class.getSimpleName())
15+
.withData("default server", "not available").down().build();
16+
}
17+
return HealthCheckResponse.named(HelloWorld.class.getSimpleName()).withData("default server", "available").up()
18+
.build();
19+
}
20+
}
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
<?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+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>boost.it</groupId>
8+
<artifactId>dev-sample-proj</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>war</packaging>
11+
12+
<properties>
13+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15+
<maven.compiler.source>1.7</maven.compiler.source>
16+
<maven.compiler.target>1.7</maven.compiler.target>
17+
<boost_http_port>9000</boost_http_port>
18+
</properties>
19+
20+
<pluginRepositories>
21+
<!-- Configure Sonatype OSS Maven snapshots repository -->
22+
<pluginRepository>
23+
<id>sonatype-nexus-snapshots</id>
24+
<name>Sonatype Nexus Snapshots</name>
25+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
26+
<snapshots>
27+
<enabled>true</enabled>
28+
</snapshots>
29+
<releases>
30+
<enabled>false</enabled>
31+
</releases>
32+
</pluginRepository>
33+
</pluginRepositories>
34+
35+
<dependencyManagement>
36+
<dependencies>
37+
<dependency>
38+
<groupId>org.microshed.boost.boms</groupId>
39+
<artifactId>mp14-bom</artifactId>
40+
<version>RUNTIME_VERSION</version>
41+
<type>pom</type>
42+
<scope>import</scope>
43+
</dependency>
44+
</dependencies>
45+
</dependencyManagement>
46+
47+
<dependencies>
48+
<!-- Boosters -->
49+
<dependency>
50+
<groupId>org.microshed.boost.runtimes</groupId>
51+
<artifactId>openliberty</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.microshed.boost.boosters</groupId>
55+
<artifactId>jaxrs</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.microshed.boost.boosters</groupId>
59+
<artifactId>jsonp</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.microshed.boost.boosters</groupId>
63+
<artifactId>cdi</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.microshed.boost.boosters</groupId>
67+
<artifactId>mp-config</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.microshed.boost.boosters</groupId>
71+
<artifactId>mp-rest-client</artifactId>
72+
</dependency>
73+
<!-- <dependency>
74+
<groupId>org.microshed.boost.boosters</groupId>
75+
<artifactId>mp-health</artifactId>
76+
</dependency> -->
77+
<!-- For tests -->
78+
<dependency>
79+
<groupId>junit</groupId>
80+
<artifactId>junit</artifactId>
81+
<version>4.12</version>
82+
<scope>test</scope>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.apache.cxf</groupId>
86+
<artifactId>cxf-rt-rs-client</artifactId>
87+
<version>3.2.6</version>
88+
<scope>test</scope>
89+
</dependency>
90+
<dependency>
91+
<groupId>org.apache.cxf</groupId>
92+
<artifactId>cxf-rt-rs-extension-providers</artifactId>
93+
<version>3.2.6</version>
94+
<scope>test</scope>
95+
</dependency>
96+
<dependency>
97+
<groupId>org.glassfish</groupId>
98+
<artifactId>javax.json</artifactId>
99+
<version>1.0.4</version>
100+
<scope>test</scope>
101+
</dependency>
102+
</dependencies>
103+
104+
<build>
105+
<plugins>
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-war-plugin</artifactId>
109+
<version>3.2.2</version>
110+
<configuration>
111+
<failOnMissingWebXml>false</failOnMissingWebXml>
112+
<packagingExcludes>pom.xml</packagingExcludes>
113+
</configuration>
114+
</plugin>
115+
<!-- Plugin to run unit tests -->
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-surefire-plugin</artifactId>
119+
<version>3.0.0-M1</version>
120+
<executions>
121+
<execution>
122+
<phase>test</phase>
123+
<id>default-test</id>
124+
<configuration>
125+
<excludes>
126+
<exclude>**/it/**</exclude>
127+
</excludes>
128+
<reportsDirectory>${project.build.directory}/test-reports/unit</reportsDirectory>
129+
</configuration>
130+
</execution>
131+
</executions>
132+
</plugin>
133+
<!-- Enable Boost plugin -->
134+
<plugin>
135+
<groupId>org.microshed.boost</groupId>
136+
<artifactId>boost-maven-plugin</artifactId>
137+
<version>RUNTIME_VERSION</version>
138+
<executions>
139+
<execution>
140+
<goals>
141+
<goal>package</goal>
142+
</goals>
143+
</execution>
144+
</executions>
145+
</plugin>
146+
<!-- Plugin to run functional tests -->
147+
<plugin>
148+
<groupId>org.apache.maven.plugins</groupId>
149+
<artifactId>maven-failsafe-plugin</artifactId>
150+
<version>3.0.0-M1</version>
151+
<executions>
152+
<execution>
153+
<phase>integration-test</phase>
154+
<id>integration-test</id>
155+
<goals>
156+
<goal>integration-test</goal>
157+
</goals>
158+
<configuration>
159+
<includes>
160+
<include>**/it/**/*.java</include>
161+
</includes>
162+
</configuration>
163+
</execution>
164+
<execution>
165+
<id>verify-results</id>
166+
<goals>
167+
<goal>verify</goal>
168+
</goals>
169+
</execution>
170+
</executions>
171+
<configuration>
172+
<summaryFile>${project.build.directory}/test-reports/it/failsafe-summary.xml</summaryFile>
173+
<reportsDirectory>${project.build.directory}/test-reports/it</reportsDirectory>
174+
</configuration>
175+
</plugin>
176+
</plugins>
177+
</build>
178+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.demo;
2+
3+
public class HelloWorld {
4+
5+
public String helloWorld() {
6+
return "helloWorld";
7+
}
8+
}

boost-maven/boost-maven-plugin/src/it/test-liberty-dev-mode/resources/basic-dev-project/src/main/resources/placeHolder.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)