]> source.dussan.org Git - archiva.git/commitdiff
working archiva-ali again
authorJesse McConnell <jmcconnell@apache.org>
Fri, 13 Apr 2007 15:32:51 +0000 (15:32 +0000)
committerJesse McConnell <jmcconnell@apache.org>
Fri, 13 Apr 2007 15:32:51 +0000 (15:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@528525 13f79535-47bb-0310-9956-ffa450edef68

archiva-jpox-database-refactor/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/ArchivaConfiguration.java
archiva-jpox-database-refactor/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultArchivaConfiguration.java
archiva-jpox-database-refactor/archiva-cli/pom.xml
archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
archiva-jpox-database-refactor/archiva-cli/src/main/resources/META-INF/plexus/components.xml
archiva-jpox-database-refactor/archiva-web/archiva-webapp/src/main/resources/META-INF/plexus/application.xml

index a914ce712d816327f1a5c3cb27e69991f1b092c5..a8034a847028710f1d32367748c8dc32b9fe840c 100644 (file)
@@ -27,6 +27,8 @@ import org.codehaus.plexus.registry.RegistryListener;
  */
 public interface ArchivaConfiguration
 {
+    public static final String ROLE = ArchivaConfiguration.class.getName();
+    
     /**
      * Get the configuration.
      *
@@ -50,4 +52,6 @@ public interface ArchivaConfiguration
      * @param listener the listener
      */
     void addChangeListener( RegistryListener listener );
+    
 }
+
index ab64a661d4f006e87644082bc5cf75b63b975e13..1b62c3f4b0e6b8069b677fab8775ce41e1300dc9 100644 (file)
@@ -33,7 +33,7 @@ import java.util.Iterator;
 /**
  * Implementation of configuration holder that retrieves it from the registry.
  *
- * @plexus.component
+ * @plexus.component role="org.apache.maven.archiva.configuration.ArchivaConfiguration"
  */
 public class DefaultArchivaConfiguration
     implements ArchivaConfiguration, RegistryListener, Initializable
index ded6638b05e6febfd820f8499ebbbaa867ee5418..c6397dc0a8f4f2984b6ec2f720d30506eb545e92 100644 (file)
       <groupId>org.apache.maven.archiva</groupId>
       <artifactId>archiva-core-consumers</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.archiva</groupId>
-      <artifactId>archiva-database-consumers</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.archiva</groupId>
-      <artifactId>archiva-lucene-consumers</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-digest</artifactId>
@@ -93,7 +85,8 @@
        <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-maven-plugin</artifactId>
-        <executions>
+        <version>1.3.5</version>
+         <executions>
           <execution>
             <id>merge</id>
             <goals>
index ae4e878269cb86af570bdaa5d00a464fd680002f..e69189d2fcb00f6770f8aee08b20188f588ec222 100644 (file)
@@ -298,8 +298,8 @@ public class ArchivaCli
     }
     
     private void dumpConfiguration( PlexusContainer plexus ) throws ComponentLookupException
-    {
-        archivaConfiguration = (ArchivaConfiguration) plexus.lookup( ArchivaConfiguration.ROLE );
+    {    
+        archivaConfiguration = (ArchivaConfiguration) plexus.lookup( ArchivaConfiguration.ROLE, "cli" );
         
         System.out.println( "File Type Count: " + archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().size() );
     }
index 6873d9f8fc896e3909dc7438e3b1ab995d549281..ad355c6557811c6ec83dfaf26e7d6230f5ef5c91 100644 (file)
@@ -1,52 +1,50 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <!--
-  ~ 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.
-  -->
-  
-<components>
-   <component>
-      <role>org.codehaus.plexus.registry.Registry</role>
-      <implementation>
-         org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry
-      </implementation>
-      <role-hint>commons-configuration</role-hint>
-      <configuration>
-         <properties>
-            <system />
-            <xml fileName="${user.home}/.m2/archiva.xml"
-               config-optional="true"
-               config-name="org.apache.maven.archiva.user"
-               config-at="org.apache.maven.archiva" />
-            <xml fileName="${user.home}/.m2/shared.xml"
-               config-optional="true"
-               config-name="org.apache.maven.shared.app.user"
-               config-at="org.apache.maven.shared.app"
-               config-forceCreate="true" />
-            <properties fileName="${user.home}/.m2/security.properties"
-               config-optional="true"
-               config-at="org.codehaus.plexus.security" />
-            <properties fileName="${user.home}/.m2/archiva.properties"
-               config-optional="true"
-               config-at="org.codehaus.plexus.security" />
-            <xml fileName="org/apache/maven/archiva/configuration/default-archiva.xml" 
-               config-optional="true"
-               config-at="org.apache.maven.archiva"/>    
-         </properties>
-      </configuration>
-   </component>
-</components>
+   ~ 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.
+-->
+<component-set>
+   <components>
+      <component>
+         <role>org.codehaus.plexus.registry.Registry</role>
+         <implementation>
+            org.codehaus.plexus.registry.commons.CommonsConfigurationRegistry
+         </implementation>
+         <role-hint>commons-configuration</role-hint>
+         <configuration>
+            <properties>
+               <system />
+               <xml fileName="${appserver.base}/conf/archiva.xml"
+                  config-optional="true"
+                  config-name="org.apache.maven.archiva.base"
+                  config-at="org.apache.maven.archiva" />
+               <xml fileName="${appserver.home}/conf/archiva.xml"
+                  config-optional="true"
+                  config-at="org.apache.maven.archiva" />
+               <xml fileName="${user.home}/.m2/archiva.xml"
+                  config-optional="true"
+                  config-name="org.apache.maven.archiva.user"
+                  config-at="org.apache.maven.archiva" />
+               <xml
+                  fileName="org/apache/maven/archiva/configuration/default-archiva.xml"
+                  config-optional="true"
+                  config-at="org.apache.maven.archiva" />
+            </properties>
+         </configuration>
+      </component>
+   </components>
+</component-set>
\ No newline at end of file
index 701a4f3ddede61562b4c478fe38bf5c97a388ac9..a470eae16c9b182b618d161df174fc10c8907d83 100644 (file)
@@ -50,7 +50,7 @@
           <xml fileName="${appserver.home}/conf/shared.xml" config-optional="true"
                config-at="org.apache.maven.shared.app"/>
           <xml fileName="${appserver.home}/conf/common.xml" config-optional="true"/>
-          <properties fileName="org/apache/maven/archiva/configuration/default-archiva.properties" config-at="org.apache.maven.archiva.base"/>
+          <xml fileName="org/apache/maven/archiva/configuration/default-archiva.xml" config-at="org.apache.maven.archiva.base"/>
           <properties fileName="${appserver.home}/conf/security.properties" config-optional="true"
                       config-at="org.codehaus.plexus.security"/>
           <properties fileName="org/apache/maven/archiva/security.properties" config-at="org.codehaus.plexus.security"/>