adjusting to work with new manifest file that the maven plugin creates.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1003 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke 2006-11-06 13:37:55 +00:00
parent 07bfa1e247
commit 5af65a0674
1 changed files with 8 additions and 1 deletions

View File

@ -102,7 +102,13 @@ public final class PluginWrapper {
if(isLinked) {
// resolve the .hpl file to the location of the manifest file
archive = resolve(archive,new BufferedReader(new FileReader(archive)).readLine());
String firstLine = new BufferedReader(new FileReader(archive)).readLine();
if(firstLine.startsWith("Manifest-Version:")) {
// this is the manifest already
} else {
// in direction
archive = resolve(archive, firstLine);
}
// then parse manifest
FileInputStream in = new FileInputStream(archive);
try {
@ -201,6 +207,7 @@ public final class PluginWrapper {
private void parseClassPath(File archive, List<URL> paths, String attributeName, String separator) throws IOException {
String classPath = manifest.getMainAttributes().getValue(attributeName);
if(classPath==null) return; // attribute not found
for (String s : classPath.split(separator)) {
File file = resolve(archive, s);
if(file.getName().contains("*")) {