KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > jarprocessor > AntBasedProcessorExecutor


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build.jarprocessor;
12
13 import java.util.Properties JavaDoc;
14 import org.apache.tools.ant.Project;
15 import org.eclipse.update.internal.jarprocessor.JarProcessor;
16 import org.eclipse.update.internal.jarprocessor.JarProcessorExecutor;
17 import org.eclipse.update.internal.jarprocessor.Main.Options;
18
19 public class AntBasedProcessorExecutor extends JarProcessorExecutor {
20     private Project project;
21     private Properties JavaDoc signArguments;
22     private String JavaDoc antTaskName;
23
24     public AntBasedProcessorExecutor(Properties JavaDoc signArguments, Project project, String JavaDoc antTaskName) {
25         this.signArguments = signArguments;
26         this.project = project;
27         this.antTaskName = antTaskName;
28     }
29
30     public void addSignStep(JarProcessor processor, Properties JavaDoc properties, Options options) {
31         if (signArguments.get(JarProcessorTask.UNSIGN) != null)
32             processor.addProcessStep(new UnsignCommand(properties, options.signCommand, options.verbose));
33         if (signArguments.get(JarProcessorTask.SIGN) != null)
34             processor.addProcessStep(new AntSignCommand(properties, signArguments, project, antTaskName, options.signCommand, options.verbose));
35     }
36 }
37
Popular Tags