[463140] Web Archive zip file contains irregular entrie causing publish failure
diff --git a/plugins/org.eclipse.jst.common.frameworks/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.common.frameworks/META-INF/MANIFEST.MF
index 74ccc8b..3ba1dfe 100644
--- a/plugins/org.eclipse.jst.common.frameworks/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.jst.common.frameworks/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jst.common.frameworks; singleton:=true
-Bundle-Version: 1.1.601.qualifier
+Bundle-Version: 1.1.700.qualifier
Bundle-Vendor: %pluginVendor
Bundle-Localization: plugin
Export-Package:
diff --git a/plugins/org.eclipse.jst.common.frameworks/src/org/eclipse/jst/common/internal/modulecore/SingleRootExportParticipant.java b/plugins/org.eclipse.jst.common.frameworks/src/org/eclipse/jst/common/internal/modulecore/SingleRootExportParticipant.java
index 8f11995..ded5647 100644
--- a/plugins/org.eclipse.jst.common.frameworks/src/org/eclipse/jst/common/internal/modulecore/SingleRootExportParticipant.java
+++ b/plugins/org.eclipse.jst.common.frameworks/src/org/eclipse/jst/common/internal/modulecore/SingleRootExportParticipant.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Red Hat and others.
+ * Copyright (c) 2009, 2015 Red Hat and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* Red Hat - Initial API and implementation
* Roberto Sanchez Herrera - [371907] Do not add duplicate resources
+ * Roberto Sanchez Herrera - [463140] Add references as resources using relative path
*******************************************************************************/
package org.eclipse.jst.common.internal.modulecore;
@@ -125,16 +126,16 @@
for (IVirtualReference reference:references){
File f = (File)reference.getReferencedComponent().getAdapter(File.class);
- FlatFile file = new FlatFile(f, reference.getArchiveName(), reference.getRuntimePath());
+ IPath relativeReferenceRuntimePath = reference.getRuntimePath().makeRelative();
+ FlatFile file = new FlatFile(f, reference.getArchiveName(), relativeReferenceRuntimePath);
FlatResource existingRes = VirtualComponentFlattenUtility.getExistingModuleResource(resources, file.getModuleRelativePath().append(file.getName()));
// If the resource already exist in the list of resources, do not add it
if ( existingRes == null){
// The resource is not in the list if resources, so add it.
- IPath path = reference.getRuntimePath(); // Folder to add the ref in
IFlatFolder folder = (IFlatFolder) VirtualComponentFlattenUtility
- .getExistingModuleResource(resources, path.makeRelative());
+ .getExistingModuleResource(resources, relativeReferenceRuntimePath);
if( folder == null ) {
- folder = VirtualComponentFlattenUtility.ensureParentExists(resources, path, null);
+ folder = VirtualComponentFlattenUtility.ensureParentExists(resources, relativeReferenceRuntimePath, null);
}
if( folder == null )
resources.add(file);