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/03/05 20:44:29 UTC
[3/6] tomee git commit: Fixing error on previous commit,
which checked for double deployment of EAR files
Fixing error on previous commit, which checked for double deployment 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/b1ba40b7
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b1ba40b7
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b1ba40b7
Branch: refs/heads/master
Commit: b1ba40b7ecde982ab75dd501f04a717f0eb40d33
Parents: cca0968
Author: Jonathan Gallimore <jo...@jrg.me.uk>
Authored: Tue Feb 27 10:06:40 2018 +0000
Committer: Jonathan Gallimore <jo...@jrg.me.uk>
Committed: Mon Mar 5 15:51:35 2018 +0000
----------------------------------------------------------------------
.../java/org/apache/tomee/catalina/TomcatWebAppBuilder.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/b1ba40b7/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 2e9668e..44f7ab6 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
@@ -1487,9 +1487,11 @@ public class TomcatWebAppBuilder implements WebAppBuilder, ContextListener, Pare
private static boolean shouldNotDeploy(final StandardContext standardContext) {
if (StandardHost.class.isInstance(standardContext.getParent())) {
final StandardHost host = StandardHost.class.cast(standardContext.getParent());
- if (host.getAutoDeploy() && new File(host.getAppBaseFile(), standardContext.getPath()).isDirectory() && (
- new File(host.getAppBaseFile(), standardContext.getPath() + ".ear").exists() ||
- new File(host.getAppBaseFile(), standardContext.getPath() + ".rar").exists())
+ if (host.getAutoDeploy() && standardContext.getDocBase() != null &&
+ standardContext.getDocBase() != null &&
+ new File(host.getAppBaseFile(), standardContext.getDocBase()).isDirectory() && (
+ new File(host.getAppBaseFile(), standardContext.getDocBase() + ".ear").exists() ||
+ new File(host.getAppBaseFile(), standardContext.getDocBase() + ".rar").exists())
) {
logger.info(String.format("Not deploying exploded directory %s as Java EE artifact exists which will be deployed.",