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/11/22 08:14:04 UTC

svn commit: r719819 [2/2] - in /geronimo/gshell/trunk: ./ gshell-support/ gshell-support/gshell-artifact-ivy/ gshell-support/gshell-artifact-ivy/src/main/java/org/apache/geronimo/gshell/ivy/monitor/ gshell-support/gshell-artifact-maven/ gshell-support/...

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml?rev=719819&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml Fri Nov 21 23:14:03 2008
@@ -0,0 +1,72 @@
+<?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$ -->
+
+<plexus>
+    <components>
+        <!--
+        Force our custom GShellArtifactResolver to be the default, and re-assign the default implementation as a delegate.
+        -->
+
+        <component>
+            <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+            <role-hint>default</role-hint>
+            <implementation>org.apache.geronimo.gshell.artifact.GShellArtifactResolver</implementation>
+            <isolated-realm>false</isolated-realm>
+            <requirements>
+                <requirement>
+                    <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+                    <role-hint>delegate</role-hint>
+                    <field-name>delegate</field-name>
+                </requirement>
+                <requirement>
+                    <role>org.apache.geronimo.gshell.artifact.ArtifactRepositoryManager</role>
+                    <field-name>repositoryManager</field-name>
+                </requirement>
+            </requirements>
+        </component>
+
+        <component>
+            <role>org.apache.maven.artifact.resolver.ArtifactResolver</role>
+            <role-hint>delegate</role-hint>
+            <implementation>org.apache.maven.artifact.resolver.DefaultArtifactResolver</implementation>
+            <isolated-realm>false</isolated-realm>
+            <requirements>
+                <requirement>
+                    <role>org.apache.maven.artifact.manager.WagonManager</role>
+                    <field-name>wagonManager</field-name>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.transform.ArtifactTransformationManager</role>
+                    <field-name>transformationManager</field-name>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.factory.ArtifactFactory</role>
+                    <field-name>artifactFactory</field-name>
+                </requirement>
+                <requirement>
+                    <role>org.apache.maven.artifact.resolver.ArtifactCollector</role>
+                    <field-name>artifactCollector</field-name>
+                </requirement>
+            </requirements>
+        </component>
+    </components>
+</plexus>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/plexus/plexus.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml?rev=719819&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml Fri Nov 21 23:14:03 2008
@@ -0,0 +1,30 @@
+<?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$ -->
+        
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="artifactManager" class="org.apache.geronimo.gshell.artifact.ArtifactManagerFactory"/>
+    
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java?rev=719819&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java Fri Nov 21 23:14:03 2008
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+package org.apache.geronimo.gshell.artifact;
+
+import org.apache.geronimo.gshell.spring.SpringTestSupport;
+import org.apache.geronimo.gshell.chronos.StopWatch;
+import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+import java.util.LinkedHashSet;
+import java.io.File;
+
+/**
+ * Unit tests for the {@link ArtifactManagerFactory} class.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ArtifactManagerFactoryTest
+    extends SpringTestSupport
+{
+    /*
+    public void testProcessor() throws Exception {
+        ArtifactManager artifactManager = getBeanContainer().getBean("artifactManager", ArtifactManager.class);
+        assertNotNull(artifactManager);
+    }
+    */
+    
+    public void testResolve() throws Exception {
+        ArtifactManager artifactManager = getBean(ArtifactManager.class);
+        artifactManager.getRepositoryManager().setLocalRepository(new File("/tmp/repo"));
+        artifactManager.getRepositoryManager().addRemoteRepository("local-cache", new File("/Users/jason/.m2/repository").toURI());
+        
+        ArtifactResolutionRequest request = new ArtifactResolutionRequest();
+        Set<Artifact> deps = new LinkedHashSet<Artifact>();
+        deps.add(artifactManager.getArtifactFactory().createArtifact("org.apache.geronimo.gshell.wisdom", "gshell-wisdom-bootstrap", "1.0-alpha-2-SNAPSHOT", Artifact.SCOPE_RUNTIME, "jar"));
+        request.setArtifactDependencies(deps);
+
+        StopWatch watch = new StopWatch(true);
+
+        ArtifactResolutionResult result = artifactManager.resolve(request);
+        log.debug("Resolution completed in: {}", watch);
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/java/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml?rev=719819&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml Fri Nov 21 23:14:03 2008
@@ -0,0 +1,39 @@
+<?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$ -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+        
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%-5p %-25.30c{1} [%t] %m%n"/>
+        </layout>
+    </appender>
+
+    <root>
+        <level value="DEBUG"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+
+</log4j:configuration>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/log4j.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml?rev=719819&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml (added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml Fri Nov 21 23:14:03 2008
@@ -0,0 +1,30 @@
+<?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$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="artifactManager" class="org.apache.geronimo.gshell.artifact.ArtifactManagerFactory"/>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/test/resources/org/apache/geronimo/gshell/artifact/ArtifactManagerFactoryTest-context.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/gshell/trunk/gshell-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/pom.xml?rev=719819&r1=719818&r2=719819&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/pom.xml Fri Nov 21 23:14:03 2008
@@ -56,7 +56,8 @@
         <module>gshell-vfs-truezip</module>
         <module>gshell-security</module>
         <module>gshell-artifact</module>
-        <module>gshell-ivy</module>
+        <!--<module>gshell-artifact-maven</module>-->
+        <module>gshell-artifact-ivy</module>
         <module>gshell-marshal</module>
         <module>gshell-xstore</module>
     </modules>

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=719819&r1=719818&r2=719819&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/pom.xml Fri Nov 21 23:14:03 2008
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-ivy</artifactId>
+            <artifactId>gshell-artifact-ivy</artifactId>
         </dependency>
 
         <dependency>

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=719819&r1=719818&r2=719819&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Fri Nov 21 23:14:03 2008
@@ -251,10 +251,16 @@
             
             <dependency>
                 <groupId>org.apache.geronimo.gshell.support</groupId>
-                <artifactId>gshell-ivy</artifactId>
+                <artifactId>gshell-artifact-maven</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
             </dependency>
-            
+
+            <dependency>
+                <groupId>org.apache.geronimo.gshell.support</groupId>
+                <artifactId>gshell-artifact-ivy</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+
             <dependency>
                 <groupId>org.apache.geronimo.gshell.support</groupId>
                 <artifactId>gshell-marshal</artifactId>