Skip to content
Snippets Groups Projects
Commit b17c522f authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

first ear.

parent a20c42b8
No related branches found
No related tags found
No related merge requests found
Showing
with 129 additions and 61 deletions
...@@ -9,8 +9,8 @@ RUN --mount=type=cache,id=mvncache,target=/root/.m2/repository,rw \ ...@@ -9,8 +9,8 @@ RUN --mount=type=cache,id=mvncache,target=/root/.m2/repository,rw \
### Then we add the builded war to a JEE server. ### Then we add the builded war to a JEE server.
#FROM payara/server-full:5.2021.9-jdk11 as server FROM payara/server-full:5.2021.9-jdk11 as server
FROM brunoe/payara:jdk11-6 as server #FROM brunoe/payara:jdk11-6 as server
ARG STORE_PASSWORD=changeit ARG STORE_PASSWORD=changeit
## Download the JDBC driver ## Download the JDBC driver
...@@ -43,5 +43,7 @@ FROM server as production ...@@ -43,5 +43,7 @@ FROM server as production
# $DEPLOY_DIR # $DEPLOY_DIR
#COPY --from=build /app/wsApp/target/*.war \ #COPY --from=build /app/wsApp/target/*.war \
# $DEPLOY_DIR # $DEPLOY_DIR
COPY --from=build /app/jsf/target/*.war \ #COPY --from=build /app/jsf/target/*.war \
# $DEPLOY_DIR
COPY --from=build /app/ear/target/*.ear \
$DEPLOY_DIR $DEPLOY_DIR
\ No newline at end of file
...@@ -8,13 +8,15 @@ FROM eclipse-temurin:11-jdk ...@@ -8,13 +8,15 @@ FROM eclipse-temurin:11-jdk
# 8181: https # 8181: https
EXPOSE 4848 9009 8080 8181 EXPOSE 4848 9009 8080 8181
# Payara version (5.183+)
#ARG PAYARA_VERSION=5.2021.9 #ARG PAYARA_VERSION=5.2021.9
ARG PAYARA_VERSION=6.2021.1.Alpha1
ARG PAYARA_PKG=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/${PAYARA_VERSION}/payara-${PAYARA_VERSION}.zip
#ARG PAYARA_SHA1=81c43f3c537ec74a813b48172758866615e1e792 #ARG PAYARA_SHA1=81c43f3c537ec74a813b48172758866615e1e792
ARG PAYARA_VERSION=6.2021.1.Alpha1
ARG PAYARA_SHA1=0262f8af7e52b318109ed43f8a31a1e93f111bbf ARG PAYARA_SHA1=0262f8af7e52b318109ed43f8a31a1e93f111bbf
ARG PAYARA_PKG=https://search.maven.org/remotecontent?filepath=fish/payara/distributions/payara/${PAYARA_VERSION}/payara-${PAYARA_VERSION}.zip
ARG TINI_VERSION=v0.19.0 ARG TINI_VERSION=v0.19.0
# Initialize the configurable environment variables # Initialize the configurable environment variables
......
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>jee9.1</artifactId>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ear</artifactId>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
</dependency>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>restApp</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>wsApp</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>jsf</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>business</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>dao</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>personManager</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<displayName>Person manager</displayName>
<!-- If I want maven to generate the application.xml, set this to true -->
<generateApplicationXml>true</generateApplicationXml>
<defaultLibBundleDir>lib/</defaultLibBundleDir>
<skinnyWars>true</skinnyWars>
<modules>
<webModule>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>restApp</artifactId>
<bundleFileName>restApp.war</bundleFileName>
<contextRoot>/rest</contextRoot>
</webModule>
<webModule>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>jsf</artifactId>
<bundleFileName>jsf.war</bundleFileName>
<contextRoot>/jsf</contextRoot>
</webModule>
<webModule>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>wsApp</artifactId>
<bundleFileName>wsApp.war</bundleFileName>
<contextRoot>/ws</contextRoot>
</webModule>
<ejbModule>
<groupId>fr.univtln.bruno.samples.jee91</groupId>
<artifactId>business</artifactId>
<bundleFileName>business.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
version="3.0"> version="3.0">
<persistence-unit name="myappPU" transaction-type="JTA"> <persistence-unit name="myappPU" transaction-type="JTA">
<jta-data-source>jdbc/my-h2-pool</jta-data-source> <jta-data-source>jdbc/my-h2-pool</jta-data-source>
<jar-file>lib/fr.univtln.bruno.samples.jee91-entites-1.0-SNAPSHOT.jar</jar-file>
<class>fr.univtln.bruno.samples.jee91.dao.Person</class> <class>fr.univtln.bruno.samples.jee91.dao.Person</class>
<properties> <properties>
......
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
bean-discovery-mode="all">
</beans>
\ No newline at end of file
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
<artifactId>all-themes</artifactId> <artifactId>all-themes</artifactId>
<version>${all-themes.version}</version> <version>${all-themes.version}</version>
</dependency--> </dependency-->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.faces</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="myappPU" transaction-type="JTA">
<jta-data-source>jdbc/my-h2-pool</jta-data-source>
<class>fr.univtln.bruno.samples.jee91.dao.Person</class>
<validation-mode>CALLBACK</validation-mode>
<properties>
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create" />
<property name="jakarta.persistence.schema-generation.scripts.action" value="drop-and-create" />
<property name="jakarta.persistence.schema-generation.scripts.create-target" value="sampleCreate.ddl" />
<property name="jakarta.persistence.schema-generation.scripts.drop-target" value="sampleDrop.ddl" />
<property name="jakarta.persistence.sql-load-script-source" value="insert.sql" />
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
...@@ -8,14 +8,19 @@ ...@@ -8,14 +8,19 @@
<modules> <modules>
<module>utils</module>
<module>entites</module>
<module>dao</module>
<module>business</module> <module>business</module>
<module>restApp</module> <module>restApp</module>
<module>wsApp</module> <module>websocketApp</module>
<module>dao</module>
<module>wsClient</module>
<module>entites</module>
<module>utils</module>
<module>jsf</module> <module>jsf</module>
<module>ear</module>
<module>websocketClient</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>
......
...@@ -4,7 +4,7 @@ package fr.univtln.bruno.samples.jee91.rs; ...@@ -4,7 +4,7 @@ package fr.univtln.bruno.samples.jee91.rs;
import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.Application;
@ApplicationPath("resources") @ApplicationPath("/")
public class JAXRSConfiguration extends Application { public class JAXRSConfiguration extends Application {
} }
\ No newline at end of file
INSERT INTO "public"."person" ("name", "uuid") VALUES ('Yves', 'ACED00057372000E6A6176612E7574696C2E55554944BC9903F7986D852F0200024A000C6C65617374536967426974734A000B6D6F7374536967426974737870B25A000916801FE374FCFAC5DCF94C11');
INSERT INTO "public"."person" ("name", "uuid") VALUES ('Pierre', 'ACED00057372000E6A6176612E7574696C2E55554944BC9903F7986D852F0200024A000C6C65617374536967426974734A000B6D6F7374536967426974737870B8F28F7D3945291756DAC7325DF44938');
INSERT INTO "public"."person" ("name", "uuid") VALUES ('Marie', 'ACED00057372000E6A6176612E7574696C2E55554944BC9903F7986D852F0200024A000C6C65617374536967426974734A000B6D6F73745369674269747378709AA3211A9B897403843C82366C6B450E');
INSERT INTO "public"."person" ("name", "uuid") VALUES ('Jeanne', 'ACED00057372000E6A6176612E7574696C2E55554944BC9903F7986D852F0200024A000C6C65617374536967426974734A000B6D6F7374536967426974737870BC1580AEB48C0F0C0B3C82E884AA4C3C');
\ No newline at end of file
File moved
File moved
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="myappPU" transaction-type="JTA">
<jta-data-source>jdbc/my-h2-pool</jta-data-source>
<class>fr.univtln.bruno.samples.jee91.dao.Person</class>
</persistence-unit>
</persistence>
\ No newline at end of file
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=wqClient.log
log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment