You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2020/11/25 18:03:39 UTC
[tomee] branch master updated: Make sure Plume does not embed
OpenJPA Persistence provider by default
This is an automated email from the ASF dual-hosted git repository.
jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/master by this push:
new 5423520 Make sure Plume does not embed OpenJPA Persistence provider by default
5423520 is described below
commit 5423520b79aecc72ddfb3d429753ce9838e59d10
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Wed Nov 25 19:02:45 2020 +0100
Make sure Plume does not embed OpenJPA Persistence provider by default
---
examples/jpa-eclipselink/pom.xml | 2 +-
tomee/tomee-plume-webapp/pom.xml | 17 +++++++++++++++++
tomee/tomee-plume-webapp/src/main/assembly/war.xml | 9 +++++++--
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/examples/jpa-eclipselink/pom.xml b/examples/jpa-eclipselink/pom.xml
index 4982f45..fb308b7 100644
--- a/examples/jpa-eclipselink/pom.xml
+++ b/examples/jpa-eclipselink/pom.xml
@@ -103,7 +103,7 @@
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
- <version>2.6.7</version>
+ <version>2.7.4</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tomee/tomee-plume-webapp/pom.xml b/tomee/tomee-plume-webapp/pom.xml
index 0e3c76b..9f38768 100644
--- a/tomee/tomee-plume-webapp/pom.xml
+++ b/tomee/tomee-plume-webapp/pom.xml
@@ -41,6 +41,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>openejb-core-eclipselink</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
@@ -191,6 +192,22 @@
<build>
<plugins>
+ <!-- Looks like the war still have myfaces or openjpa because of the overlay with tomee-webapp -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <dependentWarExcludes>
+ %regex[(WEB-INF/)?lib/(tomee-)?myfaces(-api|-impl)?-.*.jar],
+ %regex[(WEB-INF/)?lib/openjpa-.*.jar]
+ </dependentWarExcludes>
+ <packagingExcludes>
+ %regex[(WEB-INF/)?lib/(tomee-)?myfaces(-api|-impl)?-.*.jar],
+ %regex[(WEB-INF/)?lib/openjpa-.*.jar]
+ </packagingExcludes>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
diff --git a/tomee/tomee-plume-webapp/src/main/assembly/war.xml b/tomee/tomee-plume-webapp/src/main/assembly/war.xml
index 3b609f8..60f5f82 100644
--- a/tomee/tomee-plume-webapp/src/main/assembly/war.xml
+++ b/tomee/tomee-plume-webapp/src/main/assembly/war.xml
@@ -66,11 +66,13 @@
<include>**/*.html</include>
<include>**/*.css</include>
<include>**/*.js</include>
+ <!-- libs are handled with dependencies because exclude don't work too well bellow -->
+ <!-- if some deps are missing, they should be added as project dependencies -->
<include>lib/*.jar</include>
</includes>
<excludes>
- <exclude>lib/myfaces*.jar</exclude>
- <exclude>lib/tomee-myfaces*.jar</exclude>
+ <exclude>%regex[(WEB-INF/)?lib/(tomee-)?myfaces(-api|-impl)?-.*.jar]</exclude>
+ <exclude>%regex[(WEB-INF/)?lib/openjpa-.*.jar]</exclude>
</excludes>
</fileSet>
</fileSets>
@@ -78,10 +80,13 @@
<dependencySet>
<outputDirectory>lib</outputDirectory>
<scope>runtime</scope>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<!-- provided -->
<exclude>org.apache.tomcat:*</exclude>
<exclude>org.apache.myfaces:*</exclude>
+ <exclude>org.apache.openjpa:*</exclude>
<!-- should be in a pom exclusion but it does perfectly the trick -->
<exclude>org.springframework:*</exclude>