use single container xwork integration

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@421300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-07-12 16:15:07 +00:00
parent 2b3ca9ed34
commit 4a36b8e50d
8 changed files with 67 additions and 23 deletions

View 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
{

View File

@ -39,9 +39,16 @@
</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>
@ -68,22 +75,16 @@
<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>
@ -137,13 +138,53 @@
</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>

View 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

View 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

View 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">

View File

@ -21,10 +21,12 @@
<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>
@ -42,10 +44,12 @@
</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>

View File

@ -119,6 +119,3 @@
.actionMessage {
font-weight: bold;
}
sage {
font-weight: bold;
}