You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/06/24 08:40:45 UTC
svn commit: r671039 - in /geronimo/gbuild/trunk: ./ gbuild-agent-assembly/
gbuild-agent-assembly/src/main/config/ gbuild-agent/
gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/
gbuild-agent/src/main/java/org/apache/geronimo/gbuild...
Author: jdillon
Date: Mon Jun 23 23:40:44 2008
New Revision: 671039
URL: http://svn.apache.org/viewvc?rev=671039&view=rev
Log:
More work to get gbuild working with gshell-1.0-alpha-1, as well as updating to use a new plexus version
Added:
geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml (with props)
Removed:
geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/logging/Log4jLogger.java
geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/logging/Log4jLoggerManager.java
Modified:
geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml
geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-log4j.properties
geronimo/gbuild/trunk/gbuild-agent/pom.xml
geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/ThreadContextContinuumStoreFactory.java
geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/ContinuumBuildAgentTest.java
geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/TestLogger.java
geronimo/gbuild/trunk/gbuild-commands/pom.xml
geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/test/java/org/apache/geronimo/gbuild/agent/extension/standard/TestLogger.java
geronimo/gbuild/trunk/pom.xml
Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/pom.xml Mon Jun 23 23:40:44 2008
@@ -90,13 +90,18 @@
<artifactId>gshell-builtins</artifactId>
<version>1.0-alpha-1</version>
</dependency>
-
+
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging-adapters</artifactId>
- <version>1.1</version>
+ <groupId>org.apache.geronimo.gshell.commands</groupId>
+ <artifactId>gshell-optional</artifactId>
+ <version>1.0-alpha-1</version>
</dependency>
-
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
Modified: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-log4j.properties
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-log4j.properties?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-log4j.properties (original)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/gsh-log4j.properties Mon Jun 23 23:40:44 2008
@@ -21,7 +21,7 @@
## $Rev$ $Date$
##
-log4j.rootCategory=DEBUG, CONSOLE, FILE, RELAY
+log4j.rootCategory=DEBUG, CONSOLE, FILE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=${gshell.log.console.level}
Added: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml?rev=671039&view=auto
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml (added)
+++ geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml Mon Jun 23 23:40:44 2008
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<layout>
+ <nodes>
+ <command>
+ <name>help</name>
+ <id>gshell-builtins:help</id>
+ </command>
+
+ <alias>
+ <name>?</name>
+ <command>help</command>
+ </alias>
+
+ <command>
+ <name>exit</name>
+ <id>gshell-builtins:exit</id>
+ </command>
+
+ <alias>
+ <name>quit</name>
+ <command>exit</command>
+ </alias>
+
+ <command>
+ <name>echo</name>
+ <id>gshell-builtins:echo</id>
+ </command>
+
+ <alias>
+ <name>print</name>
+ <command>echo</command>
+ </alias>
+
+ <command>
+ <name>clear</name>
+ <id>gshell-builtins:clear</id>
+ </command>
+
+ <command>
+ <name>source</name>
+ <id>gshell-builtins:source</id>
+ </command>
+
+ <command>
+ <name>set</name>
+ <id>gshell-builtins:set</id>
+ </command>
+
+ <command>
+ <name>unset</name>
+ <id>gshell-builtins:unset</id>
+ </command>
+
+ <command>
+ <name>sleep</name>
+ <id>gshell-optional:sleep</id>
+ </command>
+
+ <command>
+ <name>wait</name>
+ <id>gshell-optional:wait</id>
+ </command>
+ </nodes>
+</layout>
\ No newline at end of file
Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gbuild/trunk/gbuild-agent-assembly/src/main/config/layout.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/gbuild/trunk/gbuild-agent/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent/pom.xml?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-agent/pom.xml Mon Jun 23 23:40:44 2008
@@ -75,6 +75,11 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/ThreadContextContinuumStoreFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/ThreadContextContinuumStoreFactory.java?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/ThreadContextContinuumStoreFactory.java (original)
+++ geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/continuum/ThreadContextContinuumStoreFactory.java Mon Jun 23 23:40:44 2008
@@ -17,6 +17,7 @@
* under the License.
*/
+
package org.apache.geronimo.gbuild.agent.continuum;
import java.lang.reflect.InvocationHandler;
@@ -25,8 +26,8 @@
import java.lang.reflect.Proxy;
import java.util.Arrays;
-import org.codehaus.classworlds.ClassRealm;
import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.component.factory.AbstractComponentFactory;
import org.codehaus.plexus.component.factory.ComponentInstantiationException;
import org.codehaus.plexus.component.repository.ComponentDescriptor;
@@ -67,6 +68,10 @@
// ComponentFactory
//
+ public String getId() {
+ return getClass().getSimpleName();
+ }
+
public Object newInstance(final ComponentDescriptor descriptor, final ClassRealm realm, final PlexusContainer container)
throws ComponentInstantiationException
{
Modified: geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/ContinuumBuildAgentTest.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/ContinuumBuildAgentTest.java?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/ContinuumBuildAgentTest.java (original)
+++ geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/ContinuumBuildAgentTest.java Mon Jun 23 23:40:44 2008
@@ -32,11 +32,9 @@
import javax.jms.Session;
import javax.jms.Topic;
-import junit.framework.TestCase;
-
-import org.codehaus.plexus.embed.Embedder;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.PlexusTestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
@@ -55,7 +53,7 @@
*
* @version $Rev$ $Date$
*/
-public class ContinuumBuildAgentTest extends TestCase {
+public class ContinuumBuildAgentTest extends PlexusTestCase {
private CVS cvs;
@@ -123,9 +121,7 @@
ThreadContextContinuumStoreFactory.setStore(store);
- Embedder embedder = new Embedder();
- embedder.start();
- ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) embedder.lookup(BuildAgent.ROLE);
+ ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) lookup(BuildAgent.ROLE);
buildAgent.init();
buildAgent.build(project.getId(), bd.getId(), 1);
@@ -137,7 +133,6 @@
assertEquals("buildResult.getState", ContinuumProjectState.OK, buildResult.getState());
assertEquals("project.getState", ContinuumProjectState.OK, project.getState());
- embedder.stop();
ThreadContextContinuumStoreFactory.setStore(null);
}
@@ -165,9 +160,7 @@
ThreadContextContinuumStoreFactory.setStore(store);
- Embedder embedder = new Embedder();
- embedder.start();
- ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) embedder.lookup(BuildAgent.ROLE);
+ ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) lookup(BuildAgent.ROLE);
buildAgent.init();
buildAgent.build(project.getId(), bd.getId(), 1);
@@ -179,7 +172,6 @@
assertEquals("buildResult.getState", ContinuumProjectState.OK, buildResult.getState());
assertEquals("project.getState", ContinuumProjectState.OK, project.getState());
- embedder.stop();
ThreadContextContinuumStoreFactory.setStore(null);
}
@@ -232,10 +224,7 @@
Topic resultsTopic = session.createTopic("BUILD.RESULTS");
MessageConsumer resultsConsumer = session.createConsumer(resultsTopic);
- Embedder embedder = new Embedder();
- embedder.start();
-
- ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) embedder.lookup(BuildAgent.ROLE);
+ ContinuumBuildAgent buildAgent = (ContinuumBuildAgent) lookup(BuildAgent.ROLE);
Thread agentThread = new Thread(buildAgent);
agentThread.setDaemon(false);
agentThread.start();
@@ -259,7 +248,6 @@
}
// buildAgent.stop();
- embedder.stop();
session.close();
connection.close();
}
Modified: geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/TestLogger.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/TestLogger.java?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/TestLogger.java (original)
+++ geronimo/gbuild/trunk/gbuild-agent/src/test/java/org/apache/geronimo/gbuild/agent/continuum/TestLogger.java Mon Jun 23 23:40:44 2008
@@ -114,4 +114,8 @@
public String getName() {
return null;
}
+
+ public void setThreshold(int i) {
+ // ???
+ }
}
Modified: geronimo/gbuild/trunk/gbuild-commands/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/pom.xml?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/pom.xml (original)
+++ geronimo/gbuild/trunk/gbuild-commands/pom.xml Mon Jun 23 23:40:44 2008
@@ -52,8 +52,6 @@
<version>1.0-alpha-1</version>
</dependency>
- <!-- ActiveMQ Support -->
-
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
@@ -70,22 +68,14 @@
</exclusions>
</dependency>
- <!-- Plexus Support -->
-
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
- <!--
- NOTE: Using 1.0-alpha-8 as the newer versions seems to have some issues, or at least
- they spit out WARNING messages about mismatched component managers.
- -->
- <version>1.0-alpha-8</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
- <version>1.3</version>
</dependency>
</dependencies>
Modified: geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java (original)
+++ geronimo/gbuild/trunk/gbuild-commands/src/main/java/org/apache/geronimo/gbuild/commands/PlexusCommand.java Mon Jun 23 23:40:44 2008
@@ -23,7 +23,7 @@
import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.annotation.CommandComponent;
-import org.codehaus.plexus.embed.Embedder;
+//import org.codehaus.plexus.embed.Embedder;
import java.io.File;
import java.net.MalformedURLException;
@@ -39,7 +39,7 @@
public class PlexusCommand
extends CommandSupport
{
- private Embedder embedder;
+ // private Embedder embedder;
@Argument(required=true)
private String configuration;
@@ -51,7 +51,7 @@
}
log.info("Using configuration from URL: " + url);
- embedder = new Embedder();
+ // embedder = new Embedder();
Properties props = new Properties();
props.putAll(System.getProperties());
@@ -61,11 +61,11 @@
//
props.put("plexus.home", props.get("gshell.home"));
- embedder.setProperties(props);
+ // embedder.setProperties(props);
- embedder.setConfiguration(url);
+ // embedder.setConfiguration(url);
- embedder.start();
+ // embedder.start();
return Command.SUCCESS;
}
Modified: geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/test/java/org/apache/geronimo/gbuild/agent/extension/standard/TestLogger.java
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/test/java/org/apache/geronimo/gbuild/agent/extension/standard/TestLogger.java?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/test/java/org/apache/geronimo/gbuild/agent/extension/standard/TestLogger.java (original)
+++ geronimo/gbuild/trunk/gbuild-extensions/gbuild-standard-extensions/src/test/java/org/apache/geronimo/gbuild/agent/extension/standard/TestLogger.java Mon Jun 23 23:40:44 2008
@@ -114,4 +114,8 @@
public String getName() {
return null;
}
+
+ public void setThreshold(int i) {
+ // ???
+ }
}
Modified: geronimo/gbuild/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gbuild/trunk/pom.xml?rev=671039&r1=671038&r2=671039&view=diff
==============================================================================
--- geronimo/gbuild/trunk/pom.xml (original)
+++ geronimo/gbuild/trunk/pom.xml Mon Jun 23 23:40:44 2008
@@ -107,6 +107,100 @@
<dependencyManagement>
<dependencies>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.5.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.15</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jdmk</groupId>
+ <artifactId>jmxtools</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jmx</groupId>
+ <artifactId>jmxri</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-annotations</artifactId>
+ <version>1.0-alpha-13</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-classworlds</artifactId>
+ <version>1.2-alpha-10</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-32</version>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.5</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-api</artifactId>
<version>1.0.3</version>
@@ -129,6 +223,14 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ </exclusion>
<!--
NOTE: Exclude the default store, which is JDO-based
@@ -170,6 +272,12 @@
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>4.1.0-incubator</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -183,12 +291,6 @@
<artifactId>swizzle-stream</artifactId>
<version>1.0</version>
</dependency>
-
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- </dependency>
<dependency>
<groupId>commons-lang</groupId>
@@ -272,6 +374,12 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>