Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Reinhardt2018-11-13 23:44:12 +0000
committerFred Bricon2018-11-19 16:50:14 +0000
commit3ac337e64a56c6bfd4a3c53af77eda0b040f899d (patch)
tree012e19ef0d0702ccd8d060ec4d8a9001bfe9f534
parenta4965137a3981d3ee82978568fc1e1c913f8c38a (diff)
downloadorg.eclipse.m2e.wtp-3ac337e64a56c6bfd4a3c53af77eda0b040f899d.tar.gz
org.eclipse.m2e.wtp-3ac337e64a56c6bfd4a3c53af77eda0b040f899d.tar.xz
org.eclipse.m2e.wtp-3ac337e64a56c6bfd4a3c53af77eda0b040f899d.zip
Bug 535621: generated application.xml does not match deployed file names
Change-Id: Ia249b69f948addc256a5048875fc63e4aeb2244e Signed-off-by: Thomas Reinhardt <thomas@reinhardt.com>
-rw-r--r--org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java b/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java
index 78cc227..0730b29 100644
--- a/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java
+++ b/org.eclipse.m2e.wtp/src/org/eclipse/m2e/wtp/EarPluginConfiguration.java
@@ -36,6 +36,7 @@ import org.eclipse.m2e.wtp.internal.Messages;
import org.eclipse.m2e.wtp.namemapping.AbstractFileNameMapping;
import org.eclipse.m2e.wtp.namemapping.FileNameMapping;
import org.eclipse.m2e.wtp.namemapping.FileNameMappingFactory;
+import org.eclipse.m2e.wtp.namemapping.PatternBasedFileNameMapping;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.slf4j.Logger;
@@ -282,14 +283,20 @@ public class EarPluginConfiguration extends AbstractFilteringSupportMavenPlugin
FileNameMapping mapping = null;
boolean useBaseVersion = !supportsUseBaseVersion;
if(config != null) {
- Xpp3Dom fileNameMappingDom = config.getChild("fileNameMapping"); //$NON-NLS-1$
- if(fileNameMappingDom != null) {
- String fileNameMappingName = fileNameMappingDom.getValue().trim();
- mapping = FileNameMappingFactory.getFileNameMapping(fileNameMappingName);
- }
- if (supportsUseBaseVersion) {// for ear-plugin >= 2.9
- useBaseVersion = DomUtils.getBooleanChildValue(config, "useBaseVersion", false); //$NON-NLS-1$
- }
+ Xpp3Dom outputFileNameMappingDom = config.getChild("outputFileNameMapping"); //$NON-NLS-1$
+ if (outputFileNameMappingDom != null) {
+ String pattern = outputFileNameMappingDom.getValue().trim();
+ mapping = new PatternBasedFileNameMapping(pattern);
+ } else {
+ Xpp3Dom fileNameMappingDom = config.getChild("fileNameMapping"); //$NON-NLS-1$
+ if(fileNameMappingDom != null) {
+ String fileNameMappingName = fileNameMappingDom.getValue().trim();
+ mapping = FileNameMappingFactory.getFileNameMapping(fileNameMappingName);
+ }
+ if (supportsUseBaseVersion) {// for ear-plugin >= 2.9
+ useBaseVersion = DomUtils.getBooleanChildValue(config, "useBaseVersion", false); //$NON-NLS-1$
+ }
+ }
}
if (mapping == null) {
mapping = FileNameMappingFactory.getDefaultFileNameMapping();

Back to the top