* @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
return configuration;
}
+ getLogger().info( "Reading configuration from " + file );
try
{
configuration = reader.read( fileReader );
ConfigurationXpp3Writer writer = new ConfigurationXpp3Writer();
+ getLogger().info( "Writing configuration to " + file );
FileWriter fileWriter = null;
try
{
</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>
/**
* 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
/**
* 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
--- /dev/null
+<!--
+ ~ 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>
+++ /dev/null
-<!--
- ~ 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>
<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">
<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>
.actionMessage {
font-weight: bold;
}
-sage {
- font-weight: bold;
-}