-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rieckpil
committed
Dec 28, 2019
1 parent
37fc044
commit 5138fe9
Showing
14 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
|
||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
/nbproject/private/ | ||
/build/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM open-liberty:kernel-java11 | ||
COPY --chown=1001:0 target/deployment-to-payara-intellij.war /config/dropins/ | ||
COPY --chown=1001:0 server.xml /config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Project de.rieckpil.quickstarts/deployment-to-payara-intellij | ||
|
||
Steps to run this project: | ||
|
||
1. Start your Docker daemon | ||
2. Execute `./buildAndRun.sh` (Linux/MacOs) or `buildAndRun.bat` (Windows) | ||
3. Wait until Open Liberty is up- and running (e.g. use `docker logs -f CONTAINER_ID`) | ||
4. Visit http://localhost:9080/resources/sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
call mvn clean package | ||
call docker build -t de.rieckpil.quickstarts/deployment-to-payara-intellij . | ||
call docker rm -f deployment-to-payara-intellij | ||
call docker run -d -p 9080:9080 -p 9443:9443 --name deployment-to-payara-intellij de.rieckpil.quickstarts/deployment-to-payara-intellij |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
mvn clean package && docker build -t de.rieckpil.quickstarts/deployment-to-payara-intellij . | ||
docker rm -f deployment-to-payara-intellij || true && docker run -d -p 9080:9080 -p 9443:9443 --name deployment-to-payara-intellij de.rieckpil.quickstarts/deployment-to-payara-intellij |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
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> | ||
|
||
<groupId>de.rieckpil.quickstarts</groupId> | ||
<artifactId>deployment-to-payara-intellij</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<jakarta.jakartaee-api.version>8.0.0</jakarta.jakartaee-api.version> | ||
<microprofile.version>3.0</microprofile.version> | ||
<mockito-core.version>3.1.0</mockito-core.version> | ||
<junit-jupiter.version>5.5.0</junit-jupiter.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.platform</groupId> | ||
<artifactId>jakarta.jakartaee-api</artifactId> | ||
<version>${jakarta.jakartaee-api.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.microprofile</groupId> | ||
<artifactId>microprofile</artifactId> | ||
<version>${microprofile.version}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<version>${junit-jupiter.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>${mockito-core.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<finalName>deployment-to-payara-intellij</finalName> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.22.2</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<server description="new server"> | ||
|
||
<featureManager> | ||
<feature>javaee-8.0</feature> | ||
<feature>microProfile-3.0</feature> | ||
</featureManager> | ||
|
||
<httpEndpoint id="defaultHttpEndpoint" httpPort="9080" httpsPort="9443"/> | ||
|
||
<quickStartSecurity userName="duke" userPassword="dukeduke"/> | ||
</server> |
9 changes: 9 additions & 0 deletions
9
deployment-to-payara-intellij/src/main/java/de/rieckpil/quickstarts/JAXRSConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package de.rieckpil.quickstarts; | ||
|
||
import javax.ws.rs.ApplicationPath; | ||
import javax.ws.rs.core.Application; | ||
|
||
@ApplicationPath("resources") | ||
public class JAXRSConfiguration extends Application { | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
deployment-to-payara-intellij/src/main/java/de/rieckpil/quickstarts/SampleResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.rieckpil.quickstarts; | ||
|
||
import javax.inject.Inject; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.core.Response; | ||
|
||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
|
||
@Path("sample") | ||
public class SampleResource { | ||
|
||
@Inject | ||
@ConfigProperty(name = "message") | ||
private String message; | ||
|
||
@GET | ||
public Response message() { | ||
return Response.ok(message).build(); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
deployment-to-payara-intellij/src/main/resources/META-INF/microprofile-config.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
message=Hello World Jakarta EE 8 |
7 changes: 7 additions & 0 deletions
7
deployment-to-payara-intellij/src/main/resources/META-INF/persistence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<persistence version="2.2" | ||
xmlns="http://xmlns.jcp.org/xml/ns/persistence" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"> | ||
<persistence-unit name="prod" transaction-type="JTA" /> | ||
</persistence> |
6 changes: 6 additions & 0 deletions
6
deployment-to-payara-intellij/src/main/webapp/WEB-INF/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" | ||
bean-discovery-mode="all"> | ||
</beans> |
7 changes: 7 additions & 0 deletions
7
deployment-to-payara-intellij/src/main/webapp/WEB-INF/ibm-web-ext.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<web-ext | ||
xmlns="http://websphere.ibm.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd" | ||
version="1.0"> | ||
<context-root uri="/"/> | ||
</web-ext> |
14 changes: 14 additions & 0 deletions
14
deployment-to-payara-intellij/src/test/java/de/rieckpil/quickstarts/SampleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.rieckpil.quickstarts; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class SampleTest { | ||
|
||
@Test | ||
public void simpleJUnit5Test() { | ||
String result = "duke"; | ||
assertEquals("duke", result); | ||
} | ||
} |