aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-12 17:51:13 +0000
committeraclement <aclement>2008-03-12 17:51:13 +0000
commit906c84944b2e740a1bd781e936d48b31ce09b9ac (patch)
treeaa360132e2039069e33c7c5313ba431829c4516c /org.aspectj.ajdt.core
parent688af88cdff1ccfa4b72f269831fa687f2b9fb32 (diff)
downloadaspectj-906c84944b2e740a1bd781e936d48b31ce09b9ac.tar.gz
aspectj-906c84944b2e740a1bd781e936d48b31ce09b9ac.zip
fix for 222437 - don't always ignore MANIFEST.MF
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index 0bfb22d82..dd873aefd 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -461,7 +461,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
String filename = entry.getName();
// System.out.println("? copyResourcesFromJarFile() filename='" + filename +"'");
- if (!entry.isDirectory() && acceptResource(filename)) {
+ if (!entry.isDirectory() && acceptResource(filename,false)) {
byte[] bytes = FileUtil.readAsByteArray(inStream);
writeResource(filename,bytes,jarFile);
}
@@ -494,7 +494,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
}
private void copyResourcesFromFile(File f,String filename,File src) throws IOException {
- if (!acceptResource(filename)) return;
+ if (!acceptResource(filename,true)) return;
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
@@ -572,7 +572,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
}
}
- private boolean acceptResource(String resourceName) {
+ private boolean acceptResource(String resourceName,boolean fromFile) {
if (
(resourceName.startsWith("CVS/")) ||
(resourceName.indexOf("/CVS/") != -1) ||
@@ -581,7 +581,8 @@ public class AjBuildManager implements IOutputClassFileNameProvider,IBinarySourc
(resourceName.startsWith(".svn/")) ||
(resourceName.indexOf("/.svn/")!=-1) ||
(resourceName.endsWith("/.svn")) ||
- (resourceName.toUpperCase().equals(MANIFEST_NAME))
+ // Do not copy manifests if either they are coming from a jar or we are writing to a jar
+ (resourceName.toUpperCase().equals(MANIFEST_NAME) && (!fromFile || zos!=null))
)
{
return false;