]> source.dussan.org Git - archiva.git/commitdiff
use single container xwork integration
authorBrett Porter <brett@apache.org>
Wed, 12 Jul 2006 16:15:07 +0000 (16:15 +0000)
committerBrett Porter <brett@apache.org>
Wed, 12 Jul 2006 16:15:07 +0000 (16:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@421300 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-configuration/src/main/java/org/apache/maven/repository/configuration/DefaultConfigurationStore.java
maven-repository-webapp/pom.xml
maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/QuickSearchAction.java
maven-repository-webapp/src/main/java/org/apache/maven/repository/manager/web/action/admin/ConfigureAction.java
maven-repository-webapp/src/main/plexus/plexus.xml [new file with mode: 0644]
maven-repository-webapp/src/main/resources/plexus-application.xml [deleted file]
maven-repository-webapp/src/main/resources/xwork.xml
maven-repository-webapp/src/main/webapp/WEB-INF/web.xml
maven-repository-webapp/src/main/webapp/css/site.css

index f10588f82f24b467ccbe15f96a84ab02fb106439..2eb858d2af5085982ff3b5748f4b96e836d6f0d8 100644 (file)
@@ -39,7 +39,7 @@ import java.util.List;
  * @todo would be great for plexus to do this for us - so the configuration would be a component itself rather than this store
  * @todo would be good to monitor the store file for changes
  * @todo support other implementations than XML file
- * @plexus.component role="org.apache.maven.repository.configuration.ConfigurationStore" role-hint="default"
+ * @plexus.component role="org.apache.maven.repository.configuration.ConfigurationStore"
  */
 public class DefaultConfigurationStore
     extends AbstractLogEnabled
@@ -84,6 +84,7 @@ public class DefaultConfigurationStore
                 return configuration;
             }
 
+            getLogger().info( "Reading configuration from " + file );
             try
             {
                 configuration = reader.read( fileReader );
@@ -116,6 +117,7 @@ public class DefaultConfigurationStore
 
         ConfigurationXpp3Writer writer = new ConfigurationXpp3Writer();
 
+        getLogger().info( "Writing configuration to " + file );
         FileWriter fileWriter = null;
         try
         {
index ad9236fdeea4bd989cd0df3e910562b8b919a305..d588a485d2ebf951856397a0c6a9ac12533c3702 100644 (file)
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-xwork-integration</artifactId>
+      <artifactId>plexus-xwork-integration-single</artifactId>
       <version>1.0-alpha-2-SNAPSHOT</version>
     </dependency>
+    <!-- TODO: remove if using the new xwork permanently
+        <dependency>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-xwork-integration</artifactId>
+          <version>1.0-alpha-2-SNAPSHOT</version>
+        </dependency>
+    -->
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-log4j-logging</artifactId>
       <groupId>org.apache.maven.repository</groupId>
       <artifactId>maven-repository-proxy</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.repository</groupId>
+      <artifactId>maven-repository-core</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven.repository</groupId>
       <artifactId>maven-repository-artifact-applet</artifactId>
       <!-- TODO: actually, just exclude from WAR plugin -->
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-quartz</artifactId>
-      <version>1.0-alpha-2</version>
-    </dependency>
-    <dependency>
-      <groupId>dom4j</groupId>
-      <artifactId>dom4j</artifactId>
-      <version>1.6.1</version>
-    </dependency>
   </dependencies>
   <build>
     <finalName>maven-repository-webapp</finalName>
           </instrumentation>
         </configuration>
       </plugin>
+      <!-- TODO: remove if we use the new xwork integration
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-maven-plugin</artifactId>
         <configuration>
-          <fileName>plexus-request.xml</fileName>
+          <fileName>plexus-application.xml</fileName>
           <containerDescriptor>true</containerDescriptor>
         </configuration>
+        <executions>
+          <execution>
+            <id>merge</id>
+            <configuration>
+              <output>${project.build.outputDirectory}/META-INF/plexus/plexus-application.xml</output>
+              <descriptors>
+                <descriptor>${project.build.directory}/generated-resources/plexus/plexus-application.xml</descriptor>
+                <descriptor>src/main/plexus/plexus.xml</descriptor>
+              </descriptors>
+            </configuration>
+            <goals>
+              <goal>merge-descriptors</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      -->
+      <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-maven-plugin</artifactId>
+        <configuration>
+          <fileName>plexus.xml</fileName>
+          <containerDescriptor>true</containerDescriptor>
+        </configuration>
+        <executions>
+          <execution>
+            <id>merge</id>
+            <configuration>
+              <output>${project.build.outputDirectory}/META-INF/plexus/plexus.xml</output>
+              <descriptors>
+                <descriptor>${project.build.directory}/generated-resources/plexus/plexus.xml</descriptor>
+                <descriptor>src/main/plexus/plexus.xml</descriptor>
+              </descriptors>
+            </configuration>
+            <goals>
+              <goal>merge-descriptors</goal>
+            </goals>
+          </execution>
+        </executions>
       </plugin>
     </plugins>
   </build>
index 35f5de74fa251527eacc0ff26ddd0e07b9ae6044..4c0e8ba43d90c36bce4a6433f63a689e7f40e4ed 100644 (file)
@@ -37,7 +37,7 @@ import java.util.Map;
 /**
  * Searches for searchString in all indexed fields.
  *
- * @plexus.component role="com.opensymphony.xwork.Action" role-hint="quickSearchAction"
+ * @plexus.component role="com.opensymphony.xwork.Action" role-hint="quickSearchAction" instantiation-strategy="per-lookup"
  */
 public class QuickSearchAction
     extends ActionSupport
index 6ccb922a3ff631084549c121f278ee5a70d2a685..82288d76174334aecb85ec09e8a9a67e7fffa7a0 100644 (file)
@@ -32,7 +32,7 @@ import java.io.IOException;
 /**
  * Configures the application.
  *
- * @plexus.component role="com.opensymphony.xwork.Action" role-hint="configureAction"
+ * @plexus.component role="com.opensymphony.xwork.Action" role-hint="configureAction" instantiation-strategy="per-lookup"
  */
 public class ConfigureAction
     extends ActionSupport
diff --git a/maven-repository-webapp/src/main/plexus/plexus.xml b/maven-repository-webapp/src/main/plexus/plexus.xml
new file mode 100644 (file)
index 0000000..d8d3b78
--- /dev/null
@@ -0,0 +1,94 @@
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.
+  -->
+
+<plexus>
+  <components>
+    <!--
+     | Logger manager
+     -->
+    <component>
+      <role>org.codehaus.plexus.logging.LoggerManager</role>
+      <implementation>org.codehaus.plexus.logging.log4j.Log4JLoggerManager</implementation>
+      <lifecycle-handler>basic</lifecycle-handler>
+
+      <configuration>
+        <threshold>DEBUG</threshold>
+        <default-appender>console</default-appender>
+        <appenders>
+          <appender>
+            <id>console</id>
+            <threshold>DEBUG</threshold>
+            <type>org.apache.log4j.ConsoleAppender</type>
+            <conversion-pattern>%d [%t] %-5p %-30c{1} - %m%n</conversion-pattern>
+          </appender>
+        </appenders>
+        <levels>
+          <level>
+            <hierarchy>org.codehaus.plexus.velocity</hierarchy>
+            <level>WARN</level>
+          </level>
+          <level>
+            <hierarchy>org.codehaus.plexus.mailsender.MailSender</hierarchy>
+            <level>INFO</level>
+          </level>
+          <level>
+            <hierarchy>org.apache.jasper</hierarchy>
+            <level>INFO</level>
+          </level>
+          <level>
+            <hierarchy>com.opensymphony.xwork</hierarchy>
+            <level>INFO</level>
+          </level>
+          <level>
+            <hierarchy>com.opensymphony.webwork</hierarchy>
+            <level>INFO</level>
+          </level>
+        </levels>
+      </configuration>
+    </component>
+  </components>
+
+  <!-- Override default configuration of components -->
+  <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
+    <default-lifecycle-handler-id>webapp</default-lifecycle-handler-id>
+    <lifecycle-handlers>
+      <lifecycle-handler implementation="org.codehaus.plexus.personality.plexus.PlexusLifecycleHandler">
+        <id>webapp</id>
+        <name>Web Application Component Lifecycle Handler</name>
+        <begin-segment>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogEnablePhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizePhase"/>
+          <phase implementation="org.codehaus.plexus.xwork.ConfigurationPhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ServiceablePhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase"/>
+        </begin-segment>
+        <suspend-segment>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.SuspendPhase"/>
+        </suspend-segment>
+        <resume-segment>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ResumePhase"/>
+        </resume-segment>
+        <end-segment>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StopPhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.DisposePhase"/>
+          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogDisablePhase"/>
+        </end-segment>
+      </lifecycle-handler>
+    </lifecycle-handlers>
+  </lifecycle-handler-manager>
+</plexus>
diff --git a/maven-repository-webapp/src/main/resources/plexus-application.xml b/maven-repository-webapp/src/main/resources/plexus-application.xml
deleted file mode 100644 (file)
index d8d3b78..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-  ~ Copyright 2005-2006 The Apache Software Foundation.
-  ~
-  ~ Licensed 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.
-  -->
-
-<plexus>
-  <components>
-    <!--
-     | Logger manager
-     -->
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.log4j.Log4JLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-
-      <configuration>
-        <threshold>DEBUG</threshold>
-        <default-appender>console</default-appender>
-        <appenders>
-          <appender>
-            <id>console</id>
-            <threshold>DEBUG</threshold>
-            <type>org.apache.log4j.ConsoleAppender</type>
-            <conversion-pattern>%d [%t] %-5p %-30c{1} - %m%n</conversion-pattern>
-          </appender>
-        </appenders>
-        <levels>
-          <level>
-            <hierarchy>org.codehaus.plexus.velocity</hierarchy>
-            <level>WARN</level>
-          </level>
-          <level>
-            <hierarchy>org.codehaus.plexus.mailsender.MailSender</hierarchy>
-            <level>INFO</level>
-          </level>
-          <level>
-            <hierarchy>org.apache.jasper</hierarchy>
-            <level>INFO</level>
-          </level>
-          <level>
-            <hierarchy>com.opensymphony.xwork</hierarchy>
-            <level>INFO</level>
-          </level>
-          <level>
-            <hierarchy>com.opensymphony.webwork</hierarchy>
-            <level>INFO</level>
-          </level>
-        </levels>
-      </configuration>
-    </component>
-  </components>
-
-  <!-- Override default configuration of components -->
-  <lifecycle-handler-manager implementation="org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager">
-    <default-lifecycle-handler-id>webapp</default-lifecycle-handler-id>
-    <lifecycle-handlers>
-      <lifecycle-handler implementation="org.codehaus.plexus.personality.plexus.PlexusLifecycleHandler">
-        <id>webapp</id>
-        <name>Web Application Component Lifecycle Handler</name>
-        <begin-segment>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogEnablePhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizePhase"/>
-          <phase implementation="org.codehaus.plexus.xwork.ConfigurationPhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ServiceablePhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase"/>
-        </begin-segment>
-        <suspend-segment>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.SuspendPhase"/>
-        </suspend-segment>
-        <resume-segment>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.ResumePhase"/>
-        </resume-segment>
-        <end-segment>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.StopPhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.DisposePhase"/>
-          <phase implementation="org.codehaus.plexus.personality.plexus.lifecycle.phase.LogDisablePhase"/>
-        </end-segment>
-      </lifecycle-handler>
-    </lifecycle-handlers>
-  </lifecycle-handler-manager>
-</plexus>
index c7952d0edd0859df86536e026a58fbccc3eb2daa..9a4ccfd010f9124da5d16e07345a8032caf1fb1e 100644 (file)
@@ -24,7 +24,7 @@
   <include file="webwork-default.xml"/>
 
   <!-- Configuration for the default package. -->
-  <package name="default" extends="webwork-default">
+  <package name="default" extends="webwork-default" namespace="/">
     <interceptors>
       <interceptor name="configuration" class="configurationInterceptor"/>
       <interceptor-stack name="configuredStack">
index cb00405bb74d9c17be3cdd54e1af140e11851137..d364847cc783ed033fdcacada3858ee7e5c3ce0b 100644 (file)
 <web-app>
   <display-name>Maven Repository Manager</display-name>
 
-  <filter>
-    <filter-name>plexus</filter-name>
-    <filter-class>org.codehaus.plexus.xwork.PlexusFilter</filter-class>
-  </filter>
+  <!-- TODO: remove if we use the new xwork integration
+    <filter>
+      <filter-name>plexus</filter-name>
+      <filter-class>org.codehaus.plexus.xwork.PlexusFilter</filter-class>
+    </filter>
+  -->
 
   <filter>
     <filter-name>webwork-cleanup</filter-name>
   </filter>
 
   <!-- this must be before the webwork filter -->
+  <!-- TODO: remove if we use the new xwork integration
   <filter-mapping>
     <filter-name>plexus</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
+  -->
 
   <!-- this must be before the sitemesh filter -->
   <filter-mapping>
index 877d3da3fdb1c11552782253fba3989ceb02056f..6c4e271c6d61318390fd226b3c1bfc55c7fd82a0 100644 (file)
 .actionMessage {
     font-weight: bold;
 }
-sage {
-    font-weight: bold;
-}