You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/04/30 22:55:00 UTC
cvs commit: maven-new/plugins/ashkelon/src/java/org/apache/maven/plugins/ashkelon DefaultAshkelonPlugin.java
bwalding 2003/04/30 13:55:00
Modified: plugins/ashkelon/src/java/org/apache/maven/plugins/ashkelon
DefaultAshkelonPlugin.java
Log:
Remove excess container cruft
Revision Changes Path
1.2 +27 -77 maven-new/plugins/ashkelon/src/java/org/apache/maven/plugins/ashkelon/DefaultAshkelonPlugin.java
Index: DefaultAshkelonPlugin.java
===================================================================
RCS file: /home/cvs/maven-new/plugins/ashkelon/src/java/org/apache/maven/plugins/ashkelon/DefaultAshkelonPlugin.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultAshkelonPlugin.java 30 Apr 2003 13:59:09 -0000 1.1
+++ DefaultAshkelonPlugin.java 30 Apr 2003 20:55:00 -0000 1.2
@@ -11,106 +11,55 @@
import java.util.List;
import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.Logger;
import org.apache.maven.plugin.PluginGoal;
import org.apache.plexus.logging.AbstractLogEnabled;
-/** This service implements all the start phases:
+/**
+ *
* @author <a href="bwalding@jakarta.org">Ben Walding</a>
-* @version $Id$
-*
- * LogEnabled
- * Contexualize
- * Serviceable
- * Configurable
- * Initializable
- * Startable
- *
+ * @version $Id$
*/
public class DefaultAshkelonPlugin
extends AbstractLogEnabled
- implements AshkelonPlugin, Contextualizable, Configurable, Initializable
+ implements AshkelonPlugin, Contextualizable, Initializable
{
- boolean enableLogging;
- boolean contextualize;
- boolean service;
- boolean configure;
- boolean initialize;
- boolean start;
- boolean stop;
- Context context;
-
- // ----------------------------------------------------------------------
- // Lifecycle Management
- // ----------------------------------------------------------------------
-
- public void enableLogging(Logger logger)
- {
- System.out.println("Ashkelon.enableLogging()");
- enableLogging = true;
- }
+ private List goals;
+ private Context context;
+
public void contextualize(Context context)
{
System.out.println("Ashkelon.contextualize()");
- contextualize = true;
System.out.println("Context:" + context);
//XXX Am I allowed to hold onto references to this?
this.context = context;
}
- public void configure(Configuration configuration)
- {
- System.out.println("Ashkelon.configure()");
- String names[] = configuration.getAttributeNames();
-
- for (int i = 0; i < names.length; i++)
- {
- try
- {
- System.out.println("attr[i]: " + names[i] + " = " + configuration.getAttribute(names[i]));
- }
- catch (ConfigurationException e)
- {
- e.printStackTrace();
- }
- }
- configure = true;
-
- }
-
public void initialize() throws Exception
{
System.out.println("Ashkelon.initialize()");
- initialize = true;
- {
- List goals = new ArrayList();
- PluginGoal g;
+ List goals = new ArrayList();
+ PluginGoal g;
- g = new PluginGoal("ashkelon:add", new ArrayList());
- g.setDescription("Adds something");
- goals.add(g);
-
- g = new PluginGoal("ashkelon:remove", new ArrayList());
- g.setDescription("Removes something");
- goals.add(g);
+ g = new PluginGoal("ashkelon:add", Collections.EMPTY_LIST);
+ g.setDescription("Adds something");
+ goals.add(g);
+
+ g = new PluginGoal("ashkelon:remove", Collections.EMPTY_LIST);
+ g.setDescription("Removes something");
+ goals.add(g);
- this.goals = Collections.unmodifiableList(goals);
- }
+ this.goals = Collections.unmodifiableList(goals);
}
/**
* @see org.apache.maven.plugin.PluginService#getGoals()
*/
- private List goals;
public synchronized List getGoals()
{
if (goals == null)
@@ -141,7 +90,7 @@
runAdd();
return;
}
-
+
if ("ashkelon:remove".equals(goal))
{
runRemove();
@@ -165,14 +114,15 @@
{
return "maven-ashkelon-plugin";
}
-
-
- public void runRemove() {
- System.out.println("ashkelon:remove running");
+
+ public void runRemove()
+ {
+ System.out.println("ashkelon:remove running");
+ }
+
+ public void runAdd()
+ {
+ System.out.println("ashkelon:add running");
}
-
- public void runAdd() {
- System.out.println("ashkelon:add running");
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org