You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2018/02/26 14:14:17 UTC
tomee git commit: Better check for deploy-deploy of EAR files
Repository: tomee
Updated Branches:
refs/heads/tomee-1.7.x 7e5626151 -> b790b6d95
Better check for deploy-deploy of EAR files
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b790b6d9
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b790b6d9
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b790b6d9
Branch: refs/heads/tomee-1.7.x
Commit: b790b6d95935f4cb9a580c7b797aeaa2a3fafab9
Parents: 7e56261
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Mon Feb 26 14:13:45 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Mon Feb 26 14:13:45 2018 +0000
----------------------------------------------------------------------
.../org/apache/tomee/catalina/TomcatWebAppBuilder.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/b790b6d9/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
index 544ef70..3c0739d 100644
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
@@ -1428,10 +1428,16 @@ public class TomcatWebAppBuilder implements WebAppBuilder, ContextListener, Pare
private static boolean shouldNotDeploy(final StandardContext standardContext) {
if (StandardHost.class.isInstance(standardContext.getParent())) {
+
+ final String catalinaHome = System.getProperty("catalina.home");
final StandardHost host = StandardHost.class.cast(standardContext.getParent());
- if (host.getAutoDeploy() && new File(host.getAppBase(), standardContext.getPath()).isDirectory() && (
- new File(host.getAppBase(), standardContext.getPath() + ".ear").exists() ||
- new File(host.getAppBase(), standardContext.getPath() + ".rar").exists())
+
+ final File appBase = new File(catalinaHome, host.getAppBase());
+
+ if (host.getAutoDeploy() && standardContext.getJ2EEApplication() != null &&
+ new File(appBase, standardContext.getJ2EEApplication()).isDirectory() && (
+ new File(appBase, standardContext.getJ2EEApplication() + ".ear").exists() ||
+ new File(appBase, standardContext.getJ2EEApplication() + ".rar").exists())
) {
logger.info(String.format("Not deploying exploded directory %s as Java EE artifact exists which will be deployed.",