01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM - Initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.build.jarprocessor;
11:
12: import java.io.File;
13: import java.util.List;
14: import java.util.Properties;
15: import org.eclipse.update.internal.jarprocessor.SignCommandStep;
16:
17: public class UnsignCommand extends SignCommandStep {
18:
19: public UnsignCommand(Properties options, String command,
20: boolean verbose) {
21: super (options, command, verbose);
22: }
23:
24: public File postProcess(File input, File workingDirectory,
25: List containers) {
26: if (command != null && input != null
27: && shouldSign(input, containers)) {
28: execute(input);
29: }
30: return null;
31: }
32:
33: private void execute(File input) {
34: Unsigner jarUnsigner = new Unsigner();
35: jarUnsigner.setJar(input);
36: jarUnsigner.setKeepManifestEntries(false);
37: jarUnsigner.execute();
38: }
39: }
|