Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
new file mode 100644
index 000000000..62e995ef5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.jarprocessor.ant;
+
+import java.util.Properties;
+import org.apache.tools.ant.Project;
+import org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand;
+import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
+import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
+
+public class AntBasedProcessorExecutor extends JarProcessorExecutor {
+ private final Project project;
+ private final Properties signArguments;
+ private final String antTaskName;
+
+ public AntBasedProcessorExecutor(Properties signArguments, Project project, String antTaskName) {
+ this.signArguments = signArguments;
+ this.project = project;
+ this.antTaskName = antTaskName;
+ }
+
+ public void addSignStep(JarProcessor processor, Properties properties, Options options) {
+ if (signArguments.get(JarProcessorTask.UNSIGN) != null)
+ processor.addProcessStep(new UnsignCommand(properties, options.signCommand, options.verbose));
+ if (signArguments.get(JarProcessorTask.SIGN) != null)
+ processor.addProcessStep(new AntSignCommand(properties, signArguments, project, antTaskName, options.signCommand, options.verbose));
+ }
+}

Back to the top