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/10/17 17:53:21 UTC
svn commit: r705650 [1/2] - in /geronimo/gshell/trunk: ./
gshell-application/src/main/java/org/apache/geronimo/gshell/application/
gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/
gshell-assembly/src/main/underlay/etc/ gs...
Author: jdillon
Date: Fri Oct 17 08:53:19 2008
New Revision: 705650
URL: http://svn.apache.org/viewvc?rev=705650&view=rev
Log:
Replaced maven-artifact with apache ivy
Ripped out all plexus bits, except for plexus-classworlds
Starting to rip out gshell-model
Added:
geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml (with props)
geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java (contents, props changed)
- copied, changed from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java
geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java (contents, props changed)
- copied, changed from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Artifact.java
geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java (contents, props changed)
- copied, changed from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Branding.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java (contents, props changed)
- copied, changed from r705563, geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/ArtifactResolver.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/
- copied from r705621, geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java (contents, props changed)
- copied, changed from r705621, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationScope.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java (contents, props changed)
- copied, changed from r705621, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellScope.java
Removed:
geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/
geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/
geronimo/gshell/trunk/gshell-support/gshell-artifact/
geronimo/gshell/trunk/gshell-support/gshell-xstore/src/main/resources/org/
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationScope.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellScope.java
Modified:
geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/Application.java
geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java
geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ClassPath.java
geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/Plugin.java
geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/PluginManager.java
geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
geronimo/gshell/trunk/gshell-commands/gshell-admin/src/main/java/org/apache/geronimo/gshell/commands/admin/InstallPluginAction.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/AboutAction.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/pom.xml
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinner.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinnerMonitor.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/TransferListenerSupport.java
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/resources/META-INF/spring/components.xml
geronimo/gshell/trunk/gshell-support/gshell-ivy/src/test/java/org/apache/geronimo/gshell/ivy/IvyTest.java
geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextImpl.java
geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
geronimo/gshell/trunk/gshell-support/pom.xml
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationArtifactFilter.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/branding/GShellBranding.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginArtifactFilter.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
geronimo/gshell/trunk/pom.xml
Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/Application.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/Application.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/Application.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/Application.java Fri Oct 17 08:53:19 2008
@@ -21,7 +21,7 @@
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
+import org.apache.geronimo.gshell.model.ApplicationModel;
import java.io.File;
import java.net.InetAddress;
Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java Fri Oct 17 08:53:19 2008
@@ -21,7 +21,7 @@
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
+import org.apache.geronimo.gshell.model.ApplicationModel;
import org.apache.geronimo.gshell.yarn.Yarn;
/**
Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ClassPath.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ClassPath.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ClassPath.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ClassPath.java Fri Oct 17 08:53:19 2008
@@ -19,10 +19,10 @@
package org.apache.geronimo.gshell.application;
-import org.apache.geronimo.gshell.model.common.Artifact;
+import org.apache.geronimo.gshell.model.Artifact;
-import java.net.URL;
import java.util.Collection;
+import java.net.URL;
/**
* Provides details about a classpath configuration.
@@ -31,7 +31,7 @@
*/
public interface ClassPath
{
- Collection<URL> getUrls();
-
Collection<Artifact> getArtifacts();
+
+ Collection<URL> getUrls();
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/Plugin.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/Plugin.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/Plugin.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/Plugin.java Fri Oct 17 08:53:19 2008
@@ -20,7 +20,7 @@
package org.apache.geronimo.gshell.application.plugin;
import org.apache.geronimo.gshell.application.ClassPath;
-import org.apache.geronimo.gshell.model.application.PluginArtifact;
+import org.apache.geronimo.gshell.model.Artifact;
/**
* Plugin.
@@ -31,7 +31,7 @@
{
String getName();
- PluginArtifact getArtifact();
+ Artifact getArtifact();
ClassPath getClassPath();
Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/PluginManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/PluginManager.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/PluginManager.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/plugin/PluginManager.java Fri Oct 17 08:53:19 2008
@@ -19,7 +19,7 @@
package org.apache.geronimo.gshell.application.plugin;
-import org.apache.geronimo.gshell.model.application.PluginArtifact;
+import org.apache.geronimo.gshell.model.Artifact;
import java.util.Set;
@@ -32,5 +32,5 @@
{
Set<Plugin> getPlugins();
- void loadPlugin(final PluginArtifact artifact) throws Exception;
+ void loadPlugin(final Artifact artifact) throws Exception;
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml (original)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml Fri Oct 17 08:53:19 2008
@@ -27,62 +27,49 @@
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <bean class="org.apache.geronimo.gshell.model.application.ApplicationModel">
+ <bean class="org.apache.geronimo.gshell.model.ApplicationModel">
<property name="groupId" value="org.apache.geronimo.gshell"/>
<property name="artifactId" value="gshell"/>
<property name="name" value="GShell"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
- <property name="localRepository">
- <bean class="org.apache.geronimo.gshell.model.common.LocalRepository">
- <property name="directory" value="${gshell.home}/var/repository"/>
- </bean>
- </property>
-
- <property name="remoteRepositories">
- <list>
- <bean class="org.apache.geronimo.gshell.model.common.RemoteRepository">
- <property name="id" value="cache"/>
- <property name="location" value="file:${user.home}/.m2/repository"/>
- </bean>
- </list>
- </property>
-
<property name="branding">
<bean class="org.apache.geronimo.gshell.wisdom.branding.GShellBranding"/>
</property>
<property name="dependencies">
<list>
- <bean class="org.apache.geronimo.gshell.model.application.DependencyArtifact">
+ <bean class="org.apache.geronimo.gshell.model.Artifact">
<property name="groupId" value="org.apache.geronimo.gshell.wisdom"/>
<property name="artifactId" value="gshell-wisdom-core"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
</bean>
- <bean class="org.apache.geronimo.gshell.model.application.DependencyArtifact">
+ <bean class="org.apache.geronimo.gshell.model.Artifact">
<property name="groupId" value="org.apache.geronimo.gshell.support"/>
<property name="artifactId" value="gshell-vfs-local"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
</bean>
- <bean class="org.apache.geronimo.gshell.model.application.DependencyArtifact">
+ <!--
+ <bean class="org.apache.geronimo.gshell.model.Artifact">
<property name="groupId" value="org.apache.geronimo.gshell.support"/>
<property name="artifactId" value="gshell-vfs-truezip"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
</bean>
+ -->
</list>
</property>
<property name="plugins">
<list>
- <bean class="org.apache.geronimo.gshell.model.application.PluginArtifact">
+ <bean class="org.apache.geronimo.gshell.model.Artifact">
<property name="groupId" value="org.apache.geronimo.gshell.commands"/>
<property name="artifactId" value="gshell-builtins"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
</bean>
- <bean class="org.apache.geronimo.gshell.model.application.PluginArtifact">
+ <bean class="org.apache.geronimo.gshell.model.Artifact">
<property name="groupId" value="org.apache.geronimo.gshell.commands"/>
<property name="artifactId" value="gshell-vfs"/>
<property name="version" value="1.0-alpha-2-SNAPSHOT"/>
Added: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml?rev=705650&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml (added)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml Fri Oct 17 08:53:19 2008
@@ -0,0 +1,42 @@
+<?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$ -->
+
+<ivysettings>
+ <settings defaultResolver="default"/>
+
+ <property name="ivy.m2local.default.root" value="${user.home}/.m2/repository" override="false"/>
+ <property name="ivy.m2local.default.ivy.pattern" value="[organisation]/[module]/[revision]/[module]-[revision].pom" override="false"/>
+ <property name="ivy.m2local.default.artifact.pattern" value="[organisation]/[module]/[revision]/[module]-[revision].[ext]" override="false"/>
+
+ <resolvers>
+ <chain name="default"> <!-- returnFirst="true" checkmodified="true"> -->
+ <filesystem name="m2local" m2compatible="true">
+ <ivy pattern="${ivy.m2local.default.root}/${ivy.m2local.default.ivy.pattern}"/>
+ <artifact pattern="${ivy.m2local.default.root}/${ivy.m2local.default.artifact.pattern}"/>
+ </filesystem>
+
+ <!--
+ <ibiblio name="ibiblio" m2compatible="true"/>
+ -->
+ </chain>
+ </resolvers>
+</ivysettings>
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/ivysettings.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: geronimo/gshell/trunk/gshell-commands/gshell-admin/src/main/java/org/apache/geronimo/gshell/commands/admin/InstallPluginAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-admin/src/main/java/org/apache/geronimo/gshell/commands/admin/InstallPluginAction.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-admin/src/main/java/org/apache/geronimo/gshell/commands/admin/InstallPluginAction.java (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-admin/src/main/java/org/apache/geronimo/gshell/commands/admin/InstallPluginAction.java Fri Oct 17 08:53:19 2008
@@ -24,7 +24,7 @@
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.model.application.PluginArtifact;
+import org.apache.geronimo.gshell.model.Artifact;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,7 +55,7 @@
assert context != null;
IO io = context.getIo();
- PluginArtifact artifact = new PluginArtifact();
+ Artifact artifact = new Artifact();
artifact.setGroupId(groupId);
artifact.setArtifactId(artifactId);
artifact.setVersion(version);
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/AboutAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/AboutAction.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/AboutAction.java (original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/AboutAction.java Fri Oct 17 08:53:19 2008
@@ -24,8 +24,8 @@
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
-import org.apache.geronimo.gshell.model.application.Branding;
+import org.apache.geronimo.gshell.model.ApplicationModel;
+import org.apache.geronimo.gshell.model.Branding;
import org.springframework.beans.factory.annotation.Autowired;
/**
Copied: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java (from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java?p2=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java&p1=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java&r1=705621&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/ApplicationModel.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java Fri Oct 17 08:53:19 2008
@@ -17,14 +17,11 @@
* under the License.
*/
-package org.apache.geronimo.gshell.model.application;
-
-import org.apache.geronimo.gshell.model.common.DescriptorSupport;
-import org.apache.geronimo.gshell.model.common.LocalRepository;
-import org.apache.geronimo.gshell.model.common.RemoteRepository;
+package org.apache.geronimo.gshell.model;
import java.util.ArrayList;
import java.util.List;
+import java.util.Properties;
/**
* Application model root element.
@@ -32,63 +29,97 @@
* @version $Rev$ $Date$
*/
public class ApplicationModel
- extends DescriptorSupport
+ extends Model
{
- private LocalRepository localRepository;
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String name;
+
+ private String description;
- private List<RemoteRepository> remoteRepositories;
+ private Properties properties;
- private List<DependencyArtifact> dependencies;
+ private List<Artifact> dependencies;
- private List<PluginArtifact> plugins;
+ private List<Artifact> plugins;
private Branding branding;
- // LocalRepository
+ public String getGroupId() {
+ return groupId;
+ }
- public LocalRepository getLocalRepository() {
- return localRepository;
+ public void setGroupId(final String groupId) {
+ this.groupId = groupId;
}
- public void setLocalRepository(final LocalRepository localRepository) {
- this.localRepository = localRepository;
+ public String getArtifactId() {
+ return artifactId;
}
- // RemoteRepository
+ public void setArtifactId(final String artifactId) {
+ this.artifactId = artifactId;
+ }
- public List<RemoteRepository> getRemoteRepositories() {
- if (remoteRepositories == null) {
- remoteRepositories = new ArrayList<RemoteRepository>();
- }
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ public String getId() {
+ return getGroupId() + ":" + getArtifactId() + ":" + getVersion();
+ }
+
+ public String getName() {
+ return name;
+ }
- return remoteRepositories;
+ public void setName(final String name) {
+ this.name = name;
}
- public void setRemoteRepositories(final List<RemoteRepository> repositories) {
- this.remoteRepositories = repositories;
+ public String getDescription() {
+ return description;
}
- public void add(final RemoteRepository repository) {
- assert repository != null;
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ public Properties getProperties() {
+ if (properties == null) {
+ properties = new Properties();
+ }
+
+ return properties;
+ }
- getRemoteRepositories().add(repository);
+ public void setProperties(final Properties properties) {
+ this.properties = properties;
}
// DependencyArtifact
- public List<DependencyArtifact> getDependencies() {
+ public List<Artifact> getDependencies() {
if (dependencies == null) {
- dependencies = new ArrayList<DependencyArtifact>();
+ dependencies = new ArrayList<Artifact>();
}
return dependencies;
}
- public void setDependencies(final List<DependencyArtifact> dependencies) {
+ public void setDependencies(final List<Artifact> dependencies) {
this.dependencies = dependencies;
}
- public void add(final DependencyArtifact dependency) {
+ public void addDependency(final Artifact dependency) {
assert dependency != null;
getDependencies().add(dependency);
@@ -96,19 +127,19 @@
// PluginArtifact
- public List<PluginArtifact> getPlugins() {
+ public List<Artifact> getPlugins() {
if (plugins == null) {
- plugins = new ArrayList<PluginArtifact>();
+ plugins = new ArrayList<Artifact>();
}
return plugins;
}
- public void setPlugins(final List<PluginArtifact> plugins) {
+ public void setPlugins(final List<Artifact> plugins) {
this.plugins = plugins;
}
- public void add(final PluginArtifact plugin) {
+ public void addPlugin(final Artifact plugin) {
assert plugin != null;
getPlugins().add(plugin);
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/ApplicationModel.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java (from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Artifact.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java?p2=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java&p1=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Artifact.java&r1=705621&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/common/Artifact.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java Fri Oct 17 08:53:19 2008
@@ -17,10 +17,12 @@
* under the License.
*/
-package org.apache.geronimo.gshell.model.common;
+package org.apache.geronimo.gshell.model;
import org.apache.geronimo.gshell.model.Element;
+import java.io.File;
+
/**
* Defines an artifact (groupId, artifactId, version, etc).
*
@@ -29,6 +31,8 @@
public class Artifact
extends Element
{
+ public static final String DEFAULT_TYPE = "jar";
+
private String groupId;
private String artifactId;
@@ -39,6 +43,8 @@
private String version;
+ private File file;
+
public String getGroupId() {
return groupId;
}
@@ -64,6 +70,9 @@
}
public String getType() {
+ if (type == null) {
+ return DEFAULT_TYPE;
+ }
return type;
}
@@ -79,6 +88,14 @@
this.version = version;
}
+ public File getFile() {
+ return file;
+ }
+
+ public void setFile(final File file) {
+ this.file = file;
+ }
+
public String getId() {
return getGroupId() + ":" + getArtifactId() + ":" + getVersion() + ":" + getType();
}
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java
------------------------------------------------------------------------------
svn:mergeinfo =
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Artifact.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java (from r705621, geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Branding.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java?p2=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java&p1=geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Branding.java&r1=705621&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Branding.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java Fri Oct 17 08:53:19 2008
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.geronimo.gshell.model.application;
+package org.apache.geronimo.gshell.model;
import org.apache.geronimo.gshell.model.Element;
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/Branding.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/pom.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/pom.xml Fri Oct 17 08:53:19 2008
@@ -44,6 +44,11 @@
<dependencies>
<dependency>
<groupId>org.apache.geronimo.gshell.support</groupId>
+ <artifactId>gshell-io</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.gshell.support</groupId>
<artifactId>gshell-spring</artifactId>
</dependency>
Copied: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java (from r705563, geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/ArtifactResolver.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java?p2=geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java&p1=geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/ArtifactResolver.java&r1=705563&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/ArtifactResolver.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java Fri Oct 17 08:53:19 2008
@@ -19,12 +19,56 @@
package org.apache.geronimo.gshell.ivy;
+import org.springframework.beans.factory.FactoryBean;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.util.Message;
+import org.apache.ivy.util.DefaultMessageLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.URL;
+
/**
- * ???
+ * {@link Ivy} factory bean.
*
* @version $Rev$ $Date$
*/
-public interface ArtifactResolver
+public class IvyFactoryBean
+ implements FactoryBean
{
-
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private URL settingsUrl;
+
+ public void setSettingsUrl(final URL url) {
+ this.settingsUrl = url;
+ }
+
+ public URL getSettingsUrl() {
+ if (settingsUrl == null) {
+ throw new IllegalStateException("Missing property: settingsUrl");
+ }
+
+ return settingsUrl;
+ }
+
+ public Object getObject() throws Exception {
+ // FIXME: Install a better logging adapter
+ Message.setDefaultLogger(new DefaultMessageLogger(-1)); // Message.MSG_INFO));
+
+ Ivy ivy = Ivy.newInstance();
+ URL url = getSettingsUrl();
+ log.debug("Settings URL: {}", url);
+ ivy.configure(url);
+
+ return ivy;
+ }
+
+ public Class getObjectType() {
+ return Ivy.class;
+ }
+
+ public boolean isSingleton() {
+ return true;
+ }
}
\ No newline at end of file
Propchange: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java
------------------------------------------------------------------------------
svn:mergeinfo =
Propchange: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/IvyFactoryBean.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinner.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinner.java?rev=705650&r1=705621&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinner.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinner.java Fri Oct 17 08:53:19 2008
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.geronimo.gshell.artifact.monitor;
+package org.apache.geronimo.gshell.ivy.monitor;
/**
* Provides a fancy text-based progress spinner w/optional informative message.
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinnerMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinnerMonitor.java?rev=705650&r1=705621&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinnerMonitor.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ProgressSpinnerMonitor.java Fri Oct 17 08:53:19 2008
@@ -17,12 +17,9 @@
* under the License.
*/
-package org.apache.geronimo.gshell.artifact.monitor;
+package org.apache.geronimo.gshell.ivy.monitor;
import org.apache.geronimo.gshell.io.IO;
-import static org.apache.maven.wagon.WagonConstants.UNKNOWN_LENGTH;
-import org.apache.maven.wagon.events.TransferEvent;
-import static org.apache.maven.wagon.events.TransferEvent.REQUEST_PUT;
import java.io.IOException;
@@ -68,7 +65,8 @@
// that we are still working, then use the event to update the message. Or really, put the timer in
// the spinner impl, and then just update the status message
//
-
+
+ /*
public void transferStarted(final TransferEvent event) {
assert event != null;
@@ -122,4 +120,5 @@
// pad at end just incase, should really blank the reset of the line
print(type + " " + bytes + " ");
}
+ */
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/TransferListenerSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/TransferListenerSupport.java?rev=705650&r1=705621&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/TransferListenerSupport.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/TransferListenerSupport.java Fri Oct 17 08:53:19 2008
@@ -17,10 +17,8 @@
* under the License.
*/
-package org.apache.geronimo.gshell.artifact.monitor;
+package org.apache.geronimo.gshell.ivy.monitor;
-import org.apache.maven.wagon.events.TransferEvent;
-import org.apache.maven.wagon.events.TransferListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -30,10 +28,11 @@
* @version $Rev$ $Date$
*/
public class TransferListenerSupport
- implements TransferListener
+ // implements TransferListener
{
protected final Logger log = LoggerFactory.getLogger(getClass());
+ /*
public void transferInitiated(final TransferEvent event) {
log.trace("Transfer initiated: {}", event);
}
@@ -66,4 +65,5 @@
log.debug(message);
}
+ */
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/resources/META-INF/spring/components.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/resources/META-INF/spring/components.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/main/resources/META-INF/spring/components.xml Fri Oct 17 08:53:19 2008
@@ -25,4 +25,10 @@
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <bean class="org.apache.geronimo.gshell.ivy.IvyFactoryBean">
+ <property name="settingsUrl" value="file:${gshell.home}/etc/ivysettings.xml"/>
+ </bean>
+
</beans>
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-support/gshell-ivy/src/test/java/org/apache/geronimo/gshell/ivy/IvyTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-ivy/src/test/java/org/apache/geronimo/gshell/ivy/IvyTest.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-ivy/src/test/java/org/apache/geronimo/gshell/ivy/IvyTest.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-ivy/src/test/java/org/apache/geronimo/gshell/ivy/IvyTest.java Fri Oct 17 08:53:19 2008
@@ -50,14 +50,11 @@
Message.setDefaultLogger(new DefaultMessageLogger(-1)); // Message.MSG_INFO));
IvySettings settings = new IvySettings();
- log.debug("Settings: {}", settings);
-
URL url = getClass().getResource("ivysettings.xml");
log.debug("Settings URL: {}", url);
settings.load(url);
Ivy ivy = Ivy.newInstance(settings);
- log.debug("Ivy: {}", ivy);
ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache.geronimo.gshell.wisdom", "gshell-wisdom-bootstrap", "1.0-alpha-2-SNAPSHOT");
log.debug("MRID: {}", mrid);
@@ -100,7 +97,13 @@
log.debug("Artifact download reports");
for (ArtifactDownloadReport adl : report.getAllArtifactsReports()) {
Artifact artifact = adl.getArtifact();
- log.debug(" {} -> {}", artifact, adl.getLocalFile());
+ mrid = artifact.getModuleRevisionId();
+
+ log.info("groupId: " + mrid.getOrganisation());
+ log.info("artifactId: " + mrid.getName());
+ log.info("version: " + mrid.getRevision());
+ log.info("type: " + artifact.getType());
+ log.info("file: " + adl.getLocalFile());
}
}
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextImpl.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextImpl.java Fri Oct 17 08:53:19 2008
@@ -112,7 +112,12 @@
protected void loadBeanDefinitions(final XmlBeanDefinitionReader reader) throws BeansException, IOException {
assert reader != null;
- log.debug("Loading bean definitions from resources: {}", resources);
+ log.debug("Loading bean definitions from resources");
+ if (log.isTraceEnabled()) {
+ for (Resource resource : resources) {
+ log.trace(" {}", resource);
+ }
+ }
reader.loadBeanDefinitions(resources.toArray(new Resource[resources.size()]));
}
Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java Fri Oct 17 08:53:19 2008
@@ -91,7 +91,7 @@
public void loadBeans(final String[] locations) throws Exception {
assert locations != null;
- log.debug("Loading beans; locations: {}", locations);
+ log.debug("Loading beans");
StopWatch watch = new StopWatch(true);
Modified: geronimo/gshell/trunk/gshell-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/pom.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/pom.xml Fri Oct 17 08:53:19 2008
@@ -44,7 +44,6 @@
<module>gshell-chronos</module>
<module>gshell-terminal</module>
<module>gshell-ansi</module>
- <module>gshell-artifact</module>
<module>gshell-clp</module>
<module>gshell-i18n</module>
<module>gshell-io</module>
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml Fri Oct 17 08:53:19 2008
@@ -50,7 +50,7 @@
<dependency>
<groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-artifact</artifactId>
+ <artifactId>gshell-ivy</artifactId>
</dependency>
<dependency>
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationArtifactFilter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationArtifactFilter.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationArtifactFilter.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationArtifactFilter.java Fri Oct 17 08:53:19 2008
@@ -19,11 +19,12 @@
package org.apache.geronimo.gshell.wisdom.application;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
+import org.apache.ivy.util.filter.Filter;
+import org.apache.ivy.core.module.descriptor.Artifact;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Arrays;
/**
* Artifact filter for applications.
@@ -31,73 +32,52 @@
* @version $Rev$ $Date$
*/
public class ApplicationArtifactFilter
- implements ArtifactFilter
+ implements Filter
{
- private ArtifactFilter delegate;
-
- protected AndArtifactFilter createFilter() {
- AndArtifactFilter filter = new AndArtifactFilter();
+ private static final String[] EXCLUDES = {
+ "geronimo-annotation_1.0_spec",
+ "gshell-ansi",
+ "gshell-api",
+ "gshell-artifact",
+ "gshell-application",
+ "gshell-cli",
+ "gshell-clp",
+ "gshell-chronos",
+ "gshell-event",
+ "gshell-i18n",
+ "gshell-io",
+ "gshell-ivy",
+ "gshell-model",
+ "gshell-spring",
+ "gshell-terminal",
+ "gshell-wisdom-bootstrap",
+ "gshell-yarn",
+ "ivy",
+ "jcl-over-slf4j",
+ "jline",
+ "log4j",
+ "plexus-classworlds",
+ "slf4j-api",
+ "slf4j-log4j12",
+ "spring-core",
+ "spring-beans"
+ };
- filter.add(new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME));
+ private final Set<String> excludes = new HashSet<String>();
- // Exclude bootstrap classes (stuff which lives in ${gshell.home}/lib
- filter.add(new ExclusionSetFilter(new String[] {
- //
- // FIXME: Load this list from build-generated properties or something like that
- //
-
- "aopalliance",
- "aspectjrt",
- "geronimo-annotation_1.0_spec",
- "gshell-ansi",
- "gshell-api",
- "gshell-artifact",
- "gshell-application",
- "gshell-cli",
- "gshell-clp",
- "gshell-chronos",
- "gshell-i18n",
- "gshell-io",
- "gshell-model",
- "gshell-spring",
- "gshell-wisdom-bootstrap",
- "gshell-yarn",
- "jcl104-over-slf4j",
- "gshell-terminal",
- "jline",
- "log4j",
- "maven-artifact",
- "maven-model",
- "maven-profile",
- "maven-project",
- "maven-workspace",
- "maven-settings",
- "maven-plugin-registry",
- "plexus-component-annotations",
- "plexus-container-default",
- "plexus-interpolation",
- "plexus-utils",
- "plexus-classworlds",
- "slf4j-api",
- "slf4j-log4j12",
- "spring-core",
- "spring-context",
- "spring-beans",
- "wagon-file",
- "wagon-http-lightweight",
- "wagon-http-shared",
- "wagon-provider-api",
- "xbean-reflect"
- }));
+ public ApplicationArtifactFilter() {
+ excludes.addAll(Arrays.asList(EXCLUDES));
- return filter;
}
- public final boolean include(final Artifact artifact) {
- if (delegate == null) {
- delegate = createFilter();
+ public boolean accept(final Object target) {
+ if (!(target instanceof Artifact)) {
+ return false;
}
-
- return delegate.include(artifact);
+
+ Artifact artifact = (Artifact)target;
+ String name = artifact.getName();
+
+ return !excludes.contains(name);
}
}
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationImpl.java Fri Oct 17 08:53:19 2008
@@ -24,7 +24,7 @@
import org.apache.geronimo.gshell.application.ClassPath;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.io.IO;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
+import org.apache.geronimo.gshell.model.ApplicationModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java Fri Oct 17 08:53:19 2008
@@ -25,20 +25,22 @@
import org.apache.geronimo.gshell.application.ApplicationSecurityManager;
import org.apache.geronimo.gshell.application.ClassPath;
import org.apache.geronimo.gshell.application.plugin.PluginManager;
-import org.apache.geronimo.gshell.artifact.ArtifactManager;
import org.apache.geronimo.gshell.chronos.StopWatch;
import org.apache.geronimo.gshell.event.EventPublisher;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
-import org.apache.geronimo.gshell.model.application.DependencyArtifact;
-import org.apache.geronimo.gshell.model.common.LocalRepository;
-import org.apache.geronimo.gshell.model.common.RemoteRepository;
+import org.apache.geronimo.gshell.model.ApplicationModel;
+import org.apache.geronimo.gshell.model.Artifact;
import org.apache.geronimo.gshell.shell.Shell;
import org.apache.geronimo.gshell.spring.BeanContainer;
import org.apache.geronimo.gshell.spring.BeanContainerAware;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
-import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.module.descriptor.Configuration;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.report.ArtifactDownloadReport;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.core.resolve.ResolveOptions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -47,10 +49,10 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.net.URL;
import java.util.LinkedHashSet;
-import java.util.List;
import java.util.Set;
+import java.util.List;
+import java.net.URL;
/**
* Default implementation of the {@link ApplicationManager} component.
@@ -63,10 +65,10 @@
private final Logger log = LoggerFactory.getLogger(getClass());
@Autowired
- private ArtifactManager artifactManager;
+ private EventPublisher eventPublisher;
@Autowired
- private EventPublisher eventPublisher;
+ private Ivy ivy;
private BeanContainer container;
@@ -96,9 +98,6 @@
// Validate the configuration
config.validate();
- // Apply artifact manager configuration settings for application
- configureArtifactManager(config.getModel());
-
application = loadApplication(config);
log.debug("Application configured");
@@ -109,23 +108,6 @@
eventPublisher.publish(new ApplicationConfiguredEvent(application));
}
- private void configureArtifactManager(final ApplicationModel model) throws Exception {
- assert model != null;
- assert artifactManager != null;
-
- // Setup the local repository
- LocalRepository localRepository = model.getLocalRepository();
-
- if (localRepository != null) {
- artifactManager.getRepositoryManager().setLocalRepository(localRepository.getDirectoryFile());
- }
-
- // Setup remote repositories
- for (RemoteRepository repo : model.getRemoteRepositories()) {
- artifactManager.getRepositoryManager().addRemoteRepository(repo.getId(), repo.getLocationUri());
- }
- }
-
private ApplicationImpl loadApplication(final ApplicationConfiguration config) throws Exception {
assert config != null;
@@ -190,7 +172,7 @@
log.debug(" {}", url);
}
}
-
+
return classPath;
}
@@ -199,33 +181,65 @@
log.debug("Resolving application artifacts");
- ArtifactResolutionRequest request = new ArtifactResolutionRequest();
- request.setFilter(new ApplicationArtifactFilter());
-
Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
- List<DependencyArtifact> dependencies = model.getDependencies();
- if (!dependencies.isEmpty()) {
- assert artifactManager != null;
- ArtifactFactory factory = artifactManager.getArtifactFactory();
+ ResolveOptions options = new ResolveOptions();
+ options.setOutputReport(false);
+ options.setTransitive(true);
+ options.setArtifactFilter(new ApplicationArtifactFilter());
+
+ ModuleDescriptor md = createApplicationModuleDescriptor(model);
- log.debug("Application dependencies:");
+ StopWatch watch = new StopWatch(true);
- for (DependencyArtifact dep : dependencies) {
- Artifact artifact = factory.createArtifact(dep.getGroupId(), dep.getArtifactId(), dep.getVersion(), /*scope*/null, dep.getType());
- assert artifact != null;
+ ResolveReport resolveReport = ivy.resolve(md, options);
- log.debug(" {}", artifact);
+ log.debug("Resolve completed in: {}", watch);
- artifacts.add(artifact);
+ if (resolveReport.hasError()) {
+ log.error("Report has errors:");
+ // noinspection unchecked
+ List<String> problems = resolveReport.getAllProblemMessages();
+ for (String problem : problems) {
+ log.error(" {}", problem);
}
}
- request.setArtifactDependencies(artifacts);
+ log.debug("Application artifacts:");
+ for (ArtifactDownloadReport downloadReport : resolveReport.getAllArtifactsReports()) {
+ org.apache.ivy.core.module.descriptor.Artifact downloadedArtifact = downloadReport.getArtifact();
+ ModuleRevisionId id = downloadedArtifact.getModuleRevisionId();
+
+ Artifact resolved = new Artifact();
+ resolved.setGroupId(id.getOrganisation());
+ resolved.setArtifactId(id.getName());
+ resolved.setVersion(id.getRevision());
+ resolved.setType(downloadedArtifact.getType());
+ resolved.setFile(downloadReport.getLocalFile());
+ artifacts.add(resolved);
+
+ log.debug(" {}", resolved.getId());
+ }
+
+ return artifacts;
+ }
- ArtifactResolutionResult result = artifactManager.resolve(request);
+ private ModuleDescriptor createApplicationModuleDescriptor(final ApplicationModel model) {
+ assert model != null;
+
+ ModuleRevisionId appId = ModuleRevisionId.newInstance("gshell.application-" + model.getGroupId(), model.getArtifactId(), model.getVersion());
+ DefaultModuleDescriptor md = new DefaultModuleDescriptor(appId, "integration", null, true);
+ md.addConfiguration(new Configuration("default"));
+ md.setLastModified(System.currentTimeMillis());
+
+ for (Artifact dep : model.getDependencies()) {
+ ModuleRevisionId depId = ModuleRevisionId.newInstance(dep.getGroupId(), dep.getArtifactId(), dep.getVersion());
+ DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(md, depId, /* force */ false, /* changing*/ false, /* transitive */ true);
+ dd.addDependencyConfiguration("default", "default");
+ md.addDependency(dd);
+ }
- return result.getArtifacts();
+ return md;
}
//
@@ -240,8 +254,7 @@
log.debug("Created shell instance: {}", shell);
- InvocationHandler handler = new InvocationHandler()
- {
+ InvocationHandler handler = new InvocationHandler() {
//
// FIXME: Need to resolve how to handle the security manager for the application,
// the SM is not thread-specific, but VM specific... so not sure this is
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ClassPathImpl.java Fri Oct 17 08:53:19 2008
@@ -20,72 +20,62 @@
package org.apache.geronimo.gshell.wisdom.application;
import org.apache.geronimo.gshell.application.ClassPath;
-import org.apache.geronimo.gshell.model.common.Artifact;
+import org.apache.geronimo.gshell.model.Artifact;
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.Collection;
import java.util.Collections;
-import java.util.LinkedHashSet;
import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.io.File;
/**
- * {@link ClassPath} implementation backed up by a set of Maven artifacts.
+ * {@link ClassPath} implementation backed up by a set of artifacts.
*
* @version $Rev$ $Date$
*/
public class ClassPathImpl
implements ClassPath
-{
- private Collection<URL> urls;
-
+{
private Collection<Artifact> artifacts;
+ private Collection<URL> urls;
+
public ClassPathImpl() {}
-
- public ClassPathImpl(final Set<org.apache.maven.artifact.Artifact> artifacts) {
+
+ public ClassPathImpl(final Set<Artifact> artifacts) {
assert artifacts != null;
- this.artifacts = new LinkedHashSet<Artifact>();
- this.urls = new LinkedHashSet<URL>();
+ this.artifacts = artifacts;
+ }
- for (org.apache.maven.artifact.Artifact source : artifacts) {
- Artifact artifact = new Artifact();
- artifact.setGroupId(source.getGroupId());
- artifact.setArtifactId(source.getArtifactId());
- artifact.setType(source.getType());
- artifact.setVersion(source.getVersion());
-
- try {
- File file = source.getFile();
- if (file == null) {
- throw new IllegalStateException("Artifact missing resolved local-file: " + source);
- }
+ public Collection<Artifact> getArtifacts() {
+ assert artifacts != null;
+ return Collections.unmodifiableCollection(artifacts);
+ }
- //
- // TODO: Need to make this handle when ${gshell.home} is moved, so we can still re-use the cache.
- // Also need to, when unmarshalling, validate that the files still exist and invalidate if not
- //
-
- URL url = file.toURI().toURL();
- this.urls.add(url);
- }
- catch (MalformedURLException e) {
- throw new RuntimeException(e);
+ public Collection<URL> getUrls() {
+ if (urls == null) {
+ List<URL> list = new ArrayList<URL>(artifacts.size());
+
+ for (Artifact artifact : artifacts) {
+ File file = artifact.getFile();
+
+ if (file != null) {
+ try {
+ list.add(file.toURI().toURL());
+ }
+ catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
- this.artifacts.add(artifact);
+ this.urls = Collections.unmodifiableCollection(list);
}
- }
-
- public Collection<URL> getUrls() {
- assert urls != null;
- return Collections.unmodifiableCollection(urls);
- }
- public Collection<Artifact> getArtifacts() {
- assert artifacts != null;
- return Collections.unmodifiableCollection(artifacts);
+ return urls;
}
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/branding/GShellBranding.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/branding/GShellBranding.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/branding/GShellBranding.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/branding/GShellBranding.java Fri Oct 17 08:53:19 2008
@@ -22,7 +22,7 @@
import org.apache.geronimo.gshell.ansi.Buffer;
import org.apache.geronimo.gshell.ansi.Code;
import org.apache.geronimo.gshell.ansi.RenderWriter;
-import org.apache.geronimo.gshell.model.application.Branding;
+import org.apache.geronimo.gshell.model.Branding;
import java.io.PrintWriter;
import java.io.StringWriter;
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java Fri Oct 17 08:53:19 2008
@@ -21,13 +21,11 @@
import org.apache.geronimo.gshell.application.ApplicationConfiguration;
import org.apache.geronimo.gshell.application.ApplicationManager;
-import org.apache.geronimo.gshell.artifact.ArtifactManager;
-import org.apache.geronimo.gshell.artifact.monitor.ProgressSpinnerMonitor;
import org.apache.geronimo.gshell.chronos.StopWatch;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.io.SystemOutputHijacker;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
+import org.apache.geronimo.gshell.model.ApplicationModel;
import org.apache.geronimo.gshell.shell.Shell;
import org.apache.geronimo.gshell.spring.BeanContainer;
import org.apache.geronimo.gshell.spring.BeanContainerImpl;
@@ -151,8 +149,9 @@
//
// Configure download monitor
- ArtifactManager artifactManager = getContainer().getBean(ArtifactManager.class);
- artifactManager.setDownloadMonitor(new ProgressSpinnerMonitor(getIo()));
+ // FIXME:
+ // ArtifactManager artifactManager = getContainer().getBean(ArtifactManager.class);
+ // artifactManager.setDownloadMonitor(new ProgressSpinnerMonitor(getIo()));
ApplicationModel applicationModel = container.getBean(ApplicationModel.class);
applicationConfig.setModel(applicationModel);
Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java (from r705621, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationScope.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationScope.java&r1=705621&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationScope.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java Fri Oct 17 08:53:19 2008
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.geronimo.gshell.wisdom.application;
+package org.apache.geronimo.gshell.wisdom.scope;
import org.springframework.beans.factory.config.Scope;
import org.springframework.beans.factory.ObjectFactory;
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java
------------------------------------------------------------------------------
svn:mergeinfo =
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ApplicationScope.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java (from r705621, geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellScope.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java?p2=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java&p1=geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellScope.java&r1=705621&r2=705650&rev=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ShellScope.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java Fri Oct 17 08:53:19 2008
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.geronimo.gshell.wisdom.application;
+package org.apache.geronimo.gshell.wisdom.scope;
import org.springframework.beans.factory.config.Scope;
import org.springframework.beans.factory.ObjectFactory;
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java
------------------------------------------------------------------------------
svn:mergeinfo =
Propchange: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/scope/ShellScope.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/pom.xml Fri Oct 17 08:53:19 2008
@@ -60,16 +60,6 @@
<dependency>
<groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-chronos</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
- <artifactId>gshell-artifact</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.gshell.support</groupId>
<artifactId>gshell-vfs-meta</artifactId>
</dependency>
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginArtifactFilter.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginArtifactFilter.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginArtifactFilter.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginArtifactFilter.java Fri Oct 17 08:53:19 2008
@@ -19,11 +19,9 @@
package org.apache.geronimo.gshell.wisdom.plugin;
-import org.apache.geronimo.gshell.wisdom.application.ApplicationArtifactFilter;
import org.apache.geronimo.gshell.application.Application;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
-import org.apache.maven.artifact.Artifact;
+import org.apache.geronimo.gshell.wisdom.application.ApplicationArtifactFilter;
+import org.apache.ivy.core.module.descriptor.Artifact;
import java.util.Set;
import java.util.HashSet;
@@ -36,33 +34,24 @@
public class PluginArtifactFilter
extends ApplicationArtifactFilter
{
- private final Application application;
+ private final Set<String> excludes = new HashSet<String>();
public PluginArtifactFilter(final Application application) {
assert application != null;
- this.application = application;
- }
-
- @Override
- protected AndArtifactFilter createFilter() {
- AndArtifactFilter filter = super.createFilter();
-
// Filter out application artifacts, need to use gid:aid to make sure we don't clober anything which has the same artifactId, but different groupId
- final Set<String> excludes = new HashSet<String>();
- for (org.apache.geronimo.gshell.model.common.Artifact a : application.getClassPath().getArtifacts()) {
- String id = a.getGroupId() + ":" + a.getArtifactId();
+ for (org.apache.geronimo.gshell.model.Artifact artifact : application.getClassPath().getArtifacts()) {
+ String id = artifact.getGroupId() + ":" + artifact.getArtifactId();
excludes.add(id);
}
+ }
- filter.add(new ArtifactFilter() {
- public boolean include(final Artifact artifact) {
- assert artifact != null;
- String id = artifact.getGroupId() + ":" + artifact.getArtifactId();
- return !excludes.contains(id);
- }
- });
-
- return filter;
+ public boolean accept(final Object target) {
+ if (super.accept(target)) {
+ Artifact artifact = (Artifact)target;
+ String id = artifact.getModuleRevisionId().getOrganisation() + ":" + artifact.getName();
+ return !excludes.contains(id);
+ }
+ return false;
}
}
\ No newline at end of file
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginImpl.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginImpl.java Fri Oct 17 08:53:19 2008
@@ -20,9 +20,8 @@
package org.apache.geronimo.gshell.wisdom.plugin;
import org.apache.geronimo.gshell.application.plugin.Plugin;
-import org.apache.geronimo.gshell.application.Application;
import org.apache.geronimo.gshell.application.ClassPath;
-import org.apache.geronimo.gshell.model.application.PluginArtifact;
+import org.apache.geronimo.gshell.model.Artifact;
import org.apache.geronimo.gshell.spring.BeanContainer;
import org.apache.geronimo.gshell.spring.BeanContainerAware;
import org.apache.geronimo.gshell.wisdom.plugin.activation.ActivationContext;
@@ -55,7 +54,7 @@
private boolean enabled = false;
*/
- private PluginArtifact artifact;
+ private Artifact artifact;
private ClassPath classPath;
@@ -81,14 +80,14 @@
return name;
}
- public PluginArtifact getArtifact() {
+ public Artifact getArtifact() {
if (artifact == null) {
throw new IllegalStateException("Artifact not initialized");
}
return artifact;
}
- void initArtifact(final PluginArtifact artifact) {
+ void initArtifact(final Artifact artifact) {
assert artifact != null;
this.artifact = artifact;
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java?rev=705650&r1=705649&r2=705650&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginLoadedEvent.java Fri Oct 17 08:53:19 2008
@@ -21,7 +21,7 @@
import org.apache.geronimo.gshell.application.plugin.Plugin;
import org.apache.geronimo.gshell.event.Event;
-import org.apache.geronimo.gshell.model.common.Artifact;
+import org.apache.geronimo.gshell.model.Artifact;
/**
* Event fired once a plugin has been loaded.