Skip to content
Snippets Groups Projects
Commit c9cd0260 authored by david_williams's avatar david_williams
Browse files

check for no zip file

parent 4ff28e04
No related branches found
No related tags found
No related merge requests found
......@@ -121,11 +121,11 @@ public class UpdatePackPropertiesFile extends Task {
// we avoid some recursing since we know structure, and know jars we
// want to examine
File featureDestDir = new File(destinationdirectory + "eclipse/features/");
String[] jars = featureDestDir.list(jarFileFilter);
String[] featurejars = featureDestDir.list(jarFileFilter);
File bundlesDestDir = new File(destinationdirectory + "eclipse/plugins/");
String[] bundlejars = bundlesDestDir.list(jarFileFilter);
result = checkIfJarsSigned(result, destinationdirectory, "eclipse/features/", jars);
result = checkIfJarsSigned(result, destinationdirectory, "eclipse/features/", featurejars);
result = checkIfJarsSigned(result, destinationdirectory, "eclipse/plugins/", bundlejars);
if (result != null && result.length() > 0 && result.endsWith(",")) {
result = result.substring(0, result.length() - 1);
......@@ -263,18 +263,20 @@ public class UpdatePackPropertiesFile extends Task {
}
private String checkIfJarsSigned(String currentresults, String destinationDir, String parentDir, String[] jars) throws IOException {
for (int i = 0; i < jars.length; i++) {
String jarname = jars[i];
JarFile jarFile = new JarFile(destinationDir + parentDir + jarname);
Enumeration jarentries = jarFile.entries();
while (jarentries.hasMoreElements()) {
JarEntry jarentry = (JarEntry) jarentries.nextElement();
String entryname = jarentry.getName();
log(entryname, Project.MSG_DEBUG);
if (entryname.endsWith("ECLIPSE.SF") || entryname.endsWith("ECLIPSEF.SF")) {
// log(parentDir + jarname);
currentresults = currentresults + (parentDir + jarname) + ",";
break;
if (jars != null) {
for (int i = 0; i < jars.length; i++) {
String jarname = jars[i];
JarFile jarFile = new JarFile(destinationDir + parentDir + jarname);
Enumeration jarentries = jarFile.entries();
while (jarentries.hasMoreElements()) {
JarEntry jarentry = (JarEntry) jarentries.nextElement();
String entryname = jarentry.getName();
log(entryname, Project.MSG_DEBUG);
if (entryname.endsWith("ECLIPSE.SF") || entryname.endsWith("ECLIPSEF.SF")) {
// log(parentDir + jarname);
currentresults = currentresults + (parentDir + jarname) + ",";
break;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment