synched to trunk (-r706114) in prep for merge

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-124@706118 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2008-10-20 04:17:16 +00:00
parent be6db50a31
commit 0aebcb478c
190 changed files with 2853 additions and 1246 deletions

View File

@ -106,9 +106,42 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-beanshell</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<evaluateBeanshell>
<message>Site descriptor needs to be updated for the current release version</message>
<condition>
<![CDATA[
javax.xml.xpath.XPath xpath = javax.xml.xpath.XPathFactory.newInstance().newXPath();
org.xml.sax.InputSource is = new org.xml.sax.InputSource( new java.io.FileInputStream( "${basedir}/src/site/site.xml" ) );
xpath.evaluate( "//project/body/breadcrumbs/item[@name='${project.version}']/@href", is ).equals( "/docs/${project.version}" )
]]>
</condition>
</evaluateBeanshell>
<evaluateBeanshell>
<message>Release notes need to be updated for the current release version</message>
<condition>
<![CDATA[
org.codehaus.plexus.util.FileUtils.fileRead( "${basedir}/src/site/apt/release-notes.apt" ).indexOf( "Release Notes for Archiva ${project.version}" ) >= 0
]]>
</condition>
</evaluateBeanshell>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -13,8 +13,6 @@ Configuration Files of Apache Archiva
* <<<security.properties>>> - this configures the security as described in the {{{security.html} security configuration documentation}}
* <<<plexus.xml>>> - only applies when running the standalone Archiva instance, as described in the {{{standalone.html} installing Archiva standalone documentation}}
This section will focus on the <<<archiva.xml>>> file.
* The Archiva configuration file

View File

@ -1,12 +1,11 @@
-----
Release Notes for Archiva 1.1.1
Release Notes for Archiva 1.2-SNAPSHOT
-----
Release Notes for Archiva 1.1.1
Release Notes for Archiva 1.2-SNAPSHOT
The Apache Archiva team would like to announce the release of Archiva 1.1.1.
Archiva 1.1.1 is {{{http://archiva.apache.org/download.html} available for download from the web site}}.
The Apache Archiva team would like to announce the release of Archiva 1.2. Archiva is {{{http://archiva.apache.org/download.html}
available for download from the web site}}.
Archiva is an application for managing one or more remote repositories, including administration, artifact handling, browsing and searching.
@ -16,46 +15,77 @@ Release Notes for Archiva 1.1.1
* the archiva-user mailing list: {{http://archiva.apache.org/mail-lists.html}}
* New in Archiva 1.1
* New in Archiva 1.2
** Artifact Uploads
To simplify adding artifacts to a repository, an upload form has been put in place that allows you to put an artifact and POM into
the repository without the need for the Maven <<<deploy-file>>> command.
** RSS
RSS is now available for getting a feed of new artifacts being added to a given repository. Two types of feeds are generated by Archiva:
new artifacts in a repository and new versions of a specific artifact. Details are available in {{{userguide/rss.html}Rss Feeds}}.
** Virtual Repositories
Virtual repositories or repository groups allows downloading from a group of repositories via one url. For more details of this feature,
see {{{userguide/virtual-repositories.html}Virtual Repositories}}.
** Timeouts
Connections to remote repositories can now have a configurable timeout value
** New Runtime Bundle
The application is now distributed using Jetty 6.1 and it's documented configuration, rather than the previous
Plexus application server bundle. It continues to use the Java Service Wrapper (v3.2.3) for application monitoring,
though the configuration has been improved, particularly with regard to separating the application configuration from the installation.
** Using Spring
Archiva now uses the Spring Framework as it's underlying container instead of Plexus. This results in a boost in performance and
stability for the web application in particular.
** Using Apache Jackrabbit WebDAV Servlet
Archiva now uses Apache Jackrabbit's WebDAV servlet for serving repository content instead of plexus-webdav. The change results in reduced
codebase complexity, increased standards compliance, better webdav client support and a small peformance boost.
~~TODO
* Release Notes
The Archiva 1.1 feature set can be seen in the {{{tour/index.html} feature tour}}.
The Archiva 1.2 feature set can be seen in the {{{tour/index.html} feature tour}}.
* Changes in Archiva 1.2
~~TODO
* Changes in Archiva 1.1.3
** Bug
* [MRM-967] - Security Issue: If repository observer role is enabled for the 'guest' user, an invalid user is able to deploy to that repository
* [MRM-397] - background of the Archiva logo is not transparent in repositories page
* [MRM-580] - does not give error message when one defines an illegal directory for a managed repository
* [MRM-954] - Footer doesn't stretch across repositoryGroups page
* Changes in Archiva 1.1.2
** Bug
* [MRM-765] - should not be possible to create a proxy connector if there are no remote repositories
* [MRM-807] - Deployed dll won't be indexed
* [MRM-834] - Wrong repository url when archiva is used behind Apache with mof_proxy
* [MRM-841] - Introducing a new scannable artifact file type requires restart in order for some consumers to work
* [MRM-880] - Archiva does not start up on Solaris 64-Bit
* [MRM-881] - Failing to startup due to invalid bean definition
* [MRM-893] - Illegal browse operation allow
* [MRM-902] - If path has leading slash when being checked againts whitelists and blacklists causes matching failure
* [MRM-903] - Repository scanning should not stop when encounters error
* [MRM-905] - EL Expression failed with empty/not functions
* [MRM-911] - Archiva checks user's credentials before guest's rights on the repository
* [MRM-912] - rss urls seem to use fixed webcontext "archiva" instead of actual webcontext
* [MRM-915] - NPE with rss links
* [MRM-926] - NPE with search page
* [MRM-932] - Error 500 when clicking the Next or Previous icon of the results of a search, if user is trying to search for java classes, packages or methods.
* [MRM-934] - For bytecode search, only 1 version of the artifact is returned even if there are more than 1 version of that artifact which matched the search
* [MRM-943] - results search option should only be available on results page
** Improvement
* [MRM-839] - change RSS URLs
* [MRM-848] - Pre-configured repositories initially appear to be empty
* [MRM-874] - POM snippet for plugins should be <plugin> not <dependency>
The full list of changes can be found {{{http://jira.codehaus.org/secure/ReleaseNote.jspa?version=14491&styleName=Text&projectId=10980} in JIRA}}.
* Changes in Archiva 1.1.1

View File

@ -21,7 +21,7 @@
<project>
<body>
<breadcrumbs>
<item name="1.1.1" href="/docs/1.1.1" />
<item name="1.2-SNAPSHOT" href="/docs/1.2-SNAPSHOT" />
</breadcrumbs>
<menu name="Introduction">

View File

@ -284,10 +284,4 @@
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>codehaus.snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -137,7 +137,7 @@ public class VersionUtil
}
else
{
return version.endsWith( SNAPSHOT );
return isGenericSnapshot(version);
}
}

View File

@ -32,6 +32,7 @@ import org.apache.maven.archiva.database.ArchivaDAO;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ObjectNotFoundException;
import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArchivaModelCloner;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.Keys;
import org.apache.maven.archiva.model.RepositoryProblem;
@ -41,7 +42,6 @@ import org.apache.maven.archiva.repository.RepositoryContentFactory;
import org.apache.maven.archiva.repository.RepositoryException;
import org.apache.maven.archiva.repository.content.ManagedLegacyRepositoryContent;
import org.apache.maven.archiva.repository.project.ProjectModelException;
import org.apache.maven.archiva.repository.project.ProjectModelFilter;
import org.apache.maven.archiva.repository.project.ProjectModelReader;
import org.apache.maven.archiva.repository.project.filters.EffectiveProjectModelFilter;
import org.apache.maven.archiva.repository.project.readers.ProjectModel300Reader;
@ -85,11 +85,6 @@ public class ProjectModelToDatabaseConsumer
*/
private RepositoryContentFactory repositoryFactory;
/**
* @plexus.requirement role-hint="expression"
*/
private ProjectModelFilter expressionModelFilter;
/**
* @plexus.requirement role="org.apache.maven.archiva.repository.project.ProjectModelFilter"
* role-hint="effective"
@ -160,23 +155,22 @@ public class ProjectModelToDatabaseConsumer
{
model = reader.read( artifactFile );
model.setOrigin( "filesystem" );
// The version should be updated to the artifact/filename version if it is a unique snapshot
if ( VersionUtil.isUniqueSnapshot( artifact.getVersion() ) )
{
model.setVersion( artifact.getVersion() );
}
// Filter the model
model = expressionModelFilter.filter( model );
// Resolve the project model
// Resolve the project model (build effective model, resolve expressions)
model = effectiveModelFilter.filter( model );
if ( isValidModel( model, repo, artifact ) )
{
log.debug( "Adding project model to database - " + Keys.toKey( model ) );
// Clone model, since DAO while detachingCopy resets its contents
// This changes contents of the cache in EffectiveProjectModelFilter
model = ArchivaModelCloner.clone( model );
dao.getProjectModelDAO().saveProjectModel( model );
}
else
@ -356,5 +350,4 @@ public class ProjectModelToDatabaseConsumer
}
}
}
}

View File

@ -0,0 +1,125 @@
package org.apache.maven.archiva.consumers.database;
/*
* 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.
*/
import java.io.File;
import java.util.Iterator;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.consumers.ConsumerException;
import org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ObjectNotFoundException;
import org.apache.maven.archiva.database.ProjectModelDAO;
import org.apache.maven.archiva.model.ArchivaArtifact;
import org.apache.maven.archiva.model.ArchivaArtifactModel;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.Dependency;
import org.apache.maven.archiva.model.Keys;
import org.codehaus.plexus.spring.PlexusInSpringTestCase;
/**
* Test for ProjectModelToDatabaseConsumerTest
*
* @author <a href="mailto:michal.stochmialek@eurobank.pl">Michal Stochmialek</a>
*/
public class ProjectModelToDatabaseConsumerTest
extends PlexusInSpringTestCase
{
private ProjectModelToDatabaseConsumer consumer;
private ProjectModelDAO modelDao;
public void setUp()
throws Exception
{
super.setUp();
ArchivaConfiguration archivaConfig = (ArchivaConfiguration) lookup( ArchivaConfiguration.class );
Configuration configuration = archivaConfig.getConfiguration();
ManagedRepositoryConfiguration repo = configuration.findManagedRepositoryById( "internal" );
repo.setLocation( new File( getBasedir(), "src/test/resources/test-repo" ).toString() );
consumer =
(ProjectModelToDatabaseConsumer) lookup( DatabaseUnprocessedArtifactConsumer.class, "update-db-project" );
modelDao = (ProjectModelDAO) lookup( ProjectModelDAO.class, "jdo" );
}
public void testProcess()
throws Exception
{
ArchivaProjectModel model = processAndGetModel( "test-project", "test-project-endpoint-pom", "2.4.4" );
assertNotNull( model.getParentProject() );
assertEquals( "test-project:test-project:2.4.4", Keys.toKey( model.getParentProject() ) );
assertFalse( model.getDependencyManagement().isEmpty() );
model = processAndGetModel( "test-project", "test-project-endpoint-ejb", "2.4.4" );
assertNotNull( model.getParentProject() );
assertEquals( "test-project:test-project-endpoint-pom:2.4.4", Keys.toKey( model.getParentProject() ) );
assertTrue( hasDependency( model, "test-project:test-project-api:2.4.4" ) );
assertTrue( hasDependency( model, "commons-id:commons-id:0.1-dev" ) );
model = processAndGetModel( "test-project", "test-project", "2.4.4" );
assertFalse( model.getDependencyManagement().isEmpty() );
}
private boolean hasDependency( ArchivaProjectModel model, String key )
{
for ( Iterator i = model.getDependencies().iterator(); i.hasNext(); )
{
Dependency dependency = (Dependency) i.next();
if ( key.equals( Keys.toKey( dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion() ) ) )
{
return true;
}
}
return false;
}
private ArchivaProjectModel processAndGetModel( String group, String artifactId, String version )
throws ConsumerException, ObjectNotFoundException, ArchivaDatabaseException
{
ArchivaArtifact artifact = createArtifact( group, artifactId, version, "pom" );
consumer.processArchivaArtifact( artifact );
ArchivaProjectModel model = modelDao.getProjectModel( group, artifactId, version );
assertEquals( group, model.getGroupId() );
assertEquals( artifactId, model.getArtifactId() );
assertEquals( version, model.getVersion() );
return model;
}
protected ArchivaArtifact createArtifact( String group, String artifactId, String version, String type )
{
ArchivaArtifactModel model = new ArchivaArtifactModel();
model.setGroupId( group );
model.setArtifactId( artifactId );
model.setVersion( version );
model.setType( type );
model.setRepositoryId( "internal" );
return new ArchivaArtifact( model );
}
}

View File

@ -0,0 +1,86 @@
<?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.
-->
<component-set>
<components>
<!-- JdoAccess -->
<component>
<role>org.apache.maven.archiva.database.jdo.JdoAccess</role>
<role-hint>archiva</role-hint>
<implementation>org.apache.maven.archiva.database.jdo.JdoAccess</implementation>
<requirements>
<requirement>
<role>org.codehaus.plexus.jdo.JdoFactory</role>
<role-hint>archiva</role-hint>
</requirement>
</requirements>
</component>
<!-- JDO Factory -->
<component>
<role>org.codehaus.plexus.jdo.JdoFactory</role>
<role-hint>archiva</role-hint>
<implementation>org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory</implementation>
<configuration>
<!-- Database Configuration -->
<driverName>org.hsqldb.jdbcDriver</driverName>
<url>jdbc:hsqldb:mem:TESTDB</url>
<userName>sa</userName>
<password></password>
<!-- JPOX and JDO configuration -->
<persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
<otherProperties>
<property>
<name>javax.jdo.PersistenceManagerFactoryClass</name>
<value>org.jpox.PersistenceManagerFactoryImpl</value>
</property>
<property>
<name>org.jpox.autoCreateSchema</name>
<value>true</value>
</property>
</otherProperties>
</configuration>
</component>
<component>
<role>org.codehaus.plexus.cache.Cache</role>
<role-hint>effective-project-cache</role-hint>
<implementation>org.codehaus.plexus.cache.ehcache.EhcacheCache</implementation>
<description>Effective Project Cache</description>
<configuration>
<disk-expiry-thread-interval-seconds>600</disk-expiry-thread-interval-seconds>
<disk-persistent>true</disk-persistent>
<disk-store-path>${java.io.tmpdir}/archiva/effectiveproject</disk-store-path>
<eternal>true</eternal>
<max-elements-in-memory>1000</max-elements-in-memory>
<memory-eviction-policy>LRU</memory-eviction-policy>
<name>effective-project-cache</name>
<overflow-to-disk>false</overflow-to-disk>
<!-- TODO: Adjust the time to live to be more sane (ie: huge 4+ hours) -->
<!-- 45 minutes = 2700 seconds -->
<time-to-idle-seconds>2700</time-to-idle-seconds>
<!-- 30 minutes = 1800 seconds -->
<time-to-live-seconds>1800</time-to-live-seconds>
</configuration>
</component>
</components>
</component-set>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<name>Test Project API</name>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project-broker-pom</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-broker-ejb</artifactId>
<name>Test Project Broker EJB</name>
<packaging>ejb</packaging>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<type>test-jar</type>
<version>${pom.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-broker-pom</artifactId>
<name>Test Project Broker POM</name>
<packaging>pom</packaging>
<modules>
<module>broker-ejb</module>
</modules>
</project>

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<name>Test Project Commons</name>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project-endpoint-pom</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-endpoint-ejb</artifactId>
<name>Test Project Endpoint EJB</name>
<packaging>ejb</packaging>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<!-- for tests only -->
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-endpoint-pom</artifactId>
<name>Test Project Endpoint POM</name>
<packaging>pom</packaging>
<modules>
<module>endpoint-ejb</module>
</modules>
</project>

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<name>Test Project</name>
<version>2.4.4</version>
<packaging>pom</packaging>
<organization>
<name>Company</name>
<url>http://www.company.com/</url>
</organization>
<inceptionYear>2002</inceptionYear>
<modules>
<module>api</module>
<module>common</module>
<module>broker</module>
<module>endpoint</module>
</modules>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- common version strategy -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.7</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
<version>0.1-dev</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
<version>1.0.5-xml</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -893,7 +893,7 @@
StringBuffer key = new StringBuffer();
key.append( defaultString( reference.getGroupId() ) ).append( ":" );
key.append( defaultString( reference.getArtifactId() ) ).append( ":" );
key.append( defaultString( reference.getArtifactId() ) );
return key.toString();
}
@ -969,7 +969,7 @@
key.append( defaultString( reference.getGroupId() ) ).append( ":" );
key.append( defaultString( reference.getArtifactId() ) ).append( ":" );
key.append( defaultString( reference.getVersion() ) ).append( ":" );
key.append( defaultString( reference.getVersion() ) );
return key.toString();
}

View File

@ -104,7 +104,8 @@ public class FilenameParser
// check it starts with the same version up to the snapshot part
int leadingLength = expected.length() - 9;
if ( version.startsWith( expected.substring( 0, leadingLength ) ) && version.length() > leadingLength )
if ( leadingLength > 0 && version.startsWith( expected.substring( 0, leadingLength ) ) &&
version.length() > leadingLength )
{
// If we expect a non-generic snapshot - look for the timestamp
Matcher m = SNAPSHOT_PATTERN.matcher( version.substring( leadingLength + 1 ) );

View File

@ -77,6 +77,7 @@ public class ProjectModelMerge
ArchivaProjectModel merged = new ArchivaProjectModel();
// Unmerged.
merged.setParentProject(mainProject.getParentProject());
merged.setArtifactId( mainProject.getArtifactId() );
merged.setPackaging( StringUtils.defaultIfEmpty( mainProject.getPackaging(), "jar" ) );
merged.setRelocation( mainProject.getRelocation() );
@ -334,6 +335,7 @@ public class ProjectModelMerge
}
Properties merged = new Properties();
merged.putAll(mainProperties);
Enumeration keys = parentProperties.propertyNames();
while ( keys.hasMoreElements() )

View File

@ -100,20 +100,23 @@ public class EffectiveProjectModelFilter
// Clone submitted project (so that we don't mess with it)
effectiveProject = ArchivaModelCloner.clone( project );
// Setup Expression Evaluation pieces.
effectiveProject = expressionFilter.filter( effectiveProject );
DEBUG( "Starting build of effective with: " + effectiveProject );
// Merge in all the parent poms.
effectiveProject = mergeParent( effectiveProject );
// Setup Expression Evaluation pieces.
effectiveProject = expressionFilter.filter( effectiveProject );
// Resolve dependency versions from dependency management.
applyDependencyManagement( effectiveProject );
// groupId or version could be updated by parent or expressions
projectKey = toProjectKey( effectiveProject );
// Do not add project into cache if it contains no groupId and
// version information
if ( project.getGroupId() != null && project.getVersion() != null )
if ( effectiveProject.getGroupId() != null && effectiveProject.getVersion() != null )
{
synchronized ( effectiveProjectCache )
{
@ -191,8 +194,8 @@ public class EffectiveProjectModelFilter
if ( parentProject != null )
{
// Merge the pom with the parent pom.
parentProject = expressionFilter.filter( parentProject );
parentProject = mergeParent( parentProject );
parentProject = expressionFilter.filter( parentProject );
// Cache the pre-merged parent.
synchronized ( effectiveProjectCache )

View File

@ -104,11 +104,24 @@ public class ProjectModelExpressionFilter
try
{
// Setup some common properties.
VersionedReference parent = model.getParentProject();
if ( parent != null )
{
String parentGroupId = StringUtils.defaultString( evaluator.expand( parent.getGroupId() ) );
String parentArtifactId = StringUtils.defaultString( evaluator.expand( parent.getArtifactId() ) );
String parentVersion = StringUtils.defaultString( evaluator.expand( parent.getVersion() ) );
props.setProperty( "parent.groupId", parentGroupId );
props.setProperty( "parent.artifactId", parentArtifactId );
props.setProperty( "parent.version", parentVersion );
}
String groupId = StringUtils.defaultString( evaluator.expand( model.getGroupId() ) );
String artifactId = StringUtils.defaultString( evaluator.expand( model.getArtifactId() ) );
String version = StringUtils.defaultString( evaluator.expand( model.getVersion() ) );
String name = StringUtils.defaultString( evaluator.expand( model.getName() ) );
/* Archiva doesn't need to handle a full expression language with object tree walking
* as the requirements within Archiva are much smaller, a quick replacement of the
* important fields (groupId, artifactId, version, name) are handled specifically.

View File

@ -94,6 +94,8 @@ public class ProjectModel300Reader
model.setProperties( getProperties( xml.getElement( "//project/properties" ) ) );
model.setDependencies( getDependencies( xml ) );
model.setOrigin("filesystem");
/* Following are not valid for <pomVersion>3</pomVersion> / Maven 1 pom files.
*
* model.setDependencyManagement()

View File

@ -104,6 +104,8 @@ public class ProjectModel400Reader
model.setBuildExtensions( getBuildExtensions( xml ) );
model.setRelocation( getRelocation( xml ) );
model.setOrigin("filesystem");
return model;
}

View File

@ -430,6 +430,16 @@
<artifactId>archiva-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-test-A</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-test-B</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>

View File

@ -0,0 +1,243 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 9/17/08 5:36 PM -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Effective POM for project -->
<!-- 'test-project:test-project-endpoint-ejb:ejb:2.4.4' -->
<!-- -->
<!-- ====================================================================== -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>test-project-endpoint-pom</artifactId>
<groupId>test-project</groupId>
<version>2.4.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>test-project</groupId>
<artifactId>test-project-endpoint-ejb</artifactId>
<packaging>ejb</packaging>
<name>Test Project Endpoint EJB</name>
<version>2.4.4</version>
<inceptionYear>2002</inceptionYear>
<organization>
<name>Company</name>
<url>http://www.company.com/</url>
</organization>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>2.4.4</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
<version>0.1-dev</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.7</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-jdbc</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
<version>0.1-dev</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
<version>1.0.5-xml</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -295,6 +295,15 @@ public class DefaultPathParserTest
assertLayout( path, groupId, artifactId, version, classifier, type );
}
/**
* A timestamped versioned artifact but without release version part. Like on axiom trunk.
*/
public void testBadSnapshotWithoutReleasePart()
{
assertBadPath( "org/apache/ws/commons/axiom/axiom/SNAPSHOT/axiom-20070912.093446-2.pom",
"snapshot version without release part");
}
/**
* A timestamped versioned artifact, should reside in a SNAPSHOT baseversion directory.
* @throws LayoutException

View File

@ -169,6 +169,15 @@ public class FilenameParserTest
assertNull( parser.expect( "2.0-SNAPSHOT" ) );
}
public void testExpectWrongSnapshot2()
{
// tests parsing axiom snapshots without exceptions
FilenameParser parser = new FilenameParser( "axiom-20080221.062205-9.pom" );
assertEquals( "axiom", parser.nextNonVersion() );
assertNull( parser.expect( "SNAPSHOT" ) );
}
public void testClassifier()
{
FilenameParser parser = new FilenameParser( "artifact-id-1.0-20070219.171202-34-test-sources.jar" );

View File

@ -81,20 +81,29 @@ public class EffectiveProjectModelFilterTest
public void testBuildEffectiveProject()
throws Exception
{
assertEffectiveProject(
"/org/apache/maven/archiva/archiva-model/1.0-SNAPSHOT/archiva-model-1.0-SNAPSHOT.pom",
"/archiva-model-effective.pom");
assertEffectiveProject(
"/test-project/test-project-endpoint-ejb/2.4.4/test-project-endpoint-ejb-2.4.4.pom",
"/test-project-model-effective.pom");
}
private void assertEffectiveProject(String pomFile, String effectivePomFile) throws Exception,
ProjectModelException {
initTestResolverFactory();
EffectiveProjectModelFilter filter = lookupEffective();
ArchivaProjectModel startModel = createArchivaProjectModel( DEFAULT_REPOSITORY
+ "/org/apache/maven/archiva/archiva-model/1.0-SNAPSHOT/archiva-model-1.0-SNAPSHOT.pom" );
ArchivaProjectModel startModel = createArchivaProjectModel( DEFAULT_REPOSITORY + pomFile );
ArchivaProjectModel effectiveModel = filter.filter( startModel );
ArchivaProjectModel expectedModel = createArchivaProjectModel( "src/test/expected-poms/"
+ "/archiva-model-effective.pom" );
ArchivaProjectModel expectedModel = createArchivaProjectModel( "src/test/expected-poms/" + effectivePomFile);
assertModel( expectedModel, effectiveModel );
}
/**
* [MRM-510] In Repository Browse, the first unique snapshot version clicked is getting persisted in the
* request resulting to 'version does not match' error
@ -272,7 +281,7 @@ public class EffectiveProjectModelFilterTest
while ( it.hasNext() )
{
Dependency dep = it.next();
String key = Dependency.toVersionlessKey( dep );
String key = Dependency.toKey( dep );
map.put( key, dep );
}
return map;

View File

@ -92,6 +92,6 @@ public class ProjectModel400ReaderTest
assertEquals( "Parent Version", "1.0-SNAPSHOT", parentRef.getVersion() );
assertNotNull( "Dependencies", project.getDependencies() );
assertEquals( "Dependencies.size", 6, project.getDependencies().size() );
assertEquals( "Dependencies.size", 8, project.getDependencies().size() );
}
}

View File

@ -33,6 +33,16 @@
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-test-A</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.archiva</groupId>
<artifactId>archiva-test-B</artifactId>
<version>${parent.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<name>Test Project API</name>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project-broker-pom</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-broker-ejb</artifactId>
<name>Test Project Broker EJB</name>
<packaging>ejb</packaging>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<type>test-jar</type>
<version>${pom.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-broker-pom</artifactId>
<name>Test Project Broker POM</name>
<packaging>pom</packaging>
<modules>
<module>broker-ejb</module>
</modules>
</project>

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<name>Test Project Commons</name>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project-endpoint-pom</artifactId>
<version>2.4.4</version>
</parent>
<groupId>test-project</groupId>
<artifactId>test-project-endpoint-ejb</artifactId>
<name>Test Project Endpoint EJB</name>
<packaging>ejb</packaging>
<dependencies>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>test-project</groupId>
<artifactId>test-project-api</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<!-- for tests only -->
<groupId>test-project</groupId>
<artifactId>test-project-common</artifactId>
<version>${pom.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-endpoint-pom</artifactId>
<name>Test Project Endpoint POM</name>
<packaging>pom</packaging>
<modules>
<module>endpoint-ejb</module>
</modules>
</project>

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<name>Test Project</name>
<version>2.4.4</version>
<packaging>pom</packaging>
<organization>
<name>Company</name>
<url>http://www.company.com/</url>
</organization>
<inceptionYear>2002</inceptionYear>
<modules>
<module>api</module>
<module>common</module>
<module>broker</module>
<module>endpoint</module>
</modules>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- common version strategy -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.7</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>commons-id</groupId>
<artifactId>commons-id</artifactId>
<version>0.1-dev</version>
</dependency>
<dependency>
<groupId>org.codehaus.castor</groupId>
<artifactId>castor</artifactId>
<version>1.0.5-xml</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax.management</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -24,6 +24,7 @@ import java.util.List;
import org.apache.maven.archiva.database.ArchivaDAO;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ObjectNotFoundException;
import org.apache.maven.archiva.model.ArchivaModelCloner;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.VersionedReference;
import org.apache.maven.archiva.repository.project.ProjectModelException;
@ -135,7 +136,9 @@ public class ProjectModelToDatabaseListener
return;
}
model.setOrigin( "filesystem" );
// Clone model, since DAO while detachingCopy resets contents of the model
// this changes behaviour of EffectiveProjectModelFilter
model = ArchivaModelCloner.clone( model );
try
{

View File

@ -132,8 +132,8 @@
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>com.opensymphony</groupId>
<artifactId>webwork</artifactId>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus.registry</groupId>
@ -158,23 +158,28 @@
<!-- Plexus Security Dependencies -->
<dependency>
<groupId>org.codehaus.redback</groupId>
<artifactId>redback-xwork-content</artifactId>
<artifactId>redback-struts2-content</artifactId>
<type>war</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.codehaus.redback</groupId>
<artifactId>redback-xwork-integration</artifactId>
<artifactId>redback-struts2-integration</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.redback</groupId>
<artifactId>redback-taglib</artifactId>
<artifactId>redback-struts2-taglib</artifactId>
</dependency>
<!-- Other dependencies -->
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-webdav</artifactId>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
@ -296,8 +301,6 @@
<!-- Directory created by jetty:run -->
<include>WEB-INF/temp</include>
<!-- Directory created by jetty:run -->
<include>WEB-INF/jasperreports</include>
<!-- Directory created by jasperreports-maven-plugin -->
</includes>
</fileset>
</filesets>
@ -327,12 +330,16 @@
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.1</version>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.0.0pre3</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextPath>/</contextPath>
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
<webAppConfig>
<contextPath>/</contextPath>
<jettyEnvXmlFile>src/jetty-env.xml</jettyEnvXmlFile>
</webAppConfig>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>9091</port>
@ -416,7 +423,7 @@
<configuration>
<roleDefaults>
<roleDefault>
<role>com.opensymphony.xwork.Action</role>
<role>com.opensymphony.xwork2.Action</role>
<instantiation-strategy>per-lookup</instantiation-strategy>
</roleDefault>
</roleDefaults>
@ -486,57 +493,5 @@
</plugins>
</build>
</profile>
<profile>
<!--
Inclusion of this profile brings in Jasper, which is not distributed by default due to ASF licensing policy
regarding LGPL dependencies. A basic report is used instead.
Note: in the future, it may be better to use the jasperreports plugin at all times (so the compiled report is
included), so that we just require that the JAR be on the classpath to activate it. We haven't taken this step
here because the jasperreports plugin is not yet released.
See also: MRM-447
-->
<id>jasper</id>
<dependencies>
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
<configuration>
<targetDirectory>src/main/webapp/WEB-INF/jasperreports</targetDirectory>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

View File

@ -22,14 +22,13 @@ package org.apache.maven.archiva.web.action;
import java.util.Collections;
import java.util.List;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork2.ActionContext;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.database.browsing.BrowsingResults;
import org.apache.maven.archiva.database.browsing.RepositoryBrowsing;
import org.apache.maven.archiva.security.*;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
/**
* Browse the repository.
@ -37,7 +36,7 @@ import org.codehaus.plexus.xwork.action.PlexusActionSupport;
* @todo cache browsing results.
* @todo implement repository selectors (all or specific repository)
* @todo implement security around browse (based on repository id at first)
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="browseAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="browseAction"
*/
public class BrowseAction
extends PlexusActionSupport

View File

@ -0,0 +1,54 @@
package org.apache.maven.archiva.web.action;
/*
* 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.
*/
import com.opensymphony.xwork2.ActionSupport;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;
import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.logging.Logger;
/**
* LogEnabled and SessionAware ActionSupport
*/
public abstract class PlexusActionSupport
extends ActionSupport
implements LogEnabled, SessionAware
{
protected Map session;
private Logger logger;
public void setSession( Map map )
{
//noinspection AssignmentToCollectionOrArrayFieldFromParameter
this.session = map;
}
public void enableLogging( Logger logger )
{
this.logger = logger;
}
protected Logger getLogger()
{
return logger;
}
}

View File

@ -42,15 +42,14 @@ import org.apache.maven.archiva.security.ArchivaSecurityException;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.apache.maven.archiva.security.PrincipalNotFoundException;
import org.apache.maven.archiva.security.UserRepositories;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.Preparable;
/**
* Search all indexed fields by the given criteria.
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="searchAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="searchAction"
*/
public class SearchAction
extends PlexusActionSupport
@ -307,8 +306,7 @@ public class SearchAction
return RESULTS;
}
@Override
public String doInput()
{
return INPUT;

View File

@ -32,17 +32,16 @@ import org.apache.maven.archiva.security.ArchivaSecurityException;
import org.apache.maven.archiva.security.PrincipalNotFoundException;
import org.apache.maven.archiva.security.UserRepositories;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Validateable;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.Validateable;
/**
* Browse the repository.
*
* TODO change name to ShowVersionedAction to conform to terminology.
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="showArtifactAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction"
*/
public class ShowArtifactAction
extends PlexusActionSupport

View File

@ -61,12 +61,11 @@ import org.apache.maven.archiva.security.ArchivaSecurityException;
import org.apache.maven.archiva.security.PrincipalNotFoundException;
import org.apache.maven.archiva.security.UserRepositories;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
@ -76,7 +75,7 @@ import org.apache.commons.lang.StringUtils;
*
* @author <a href="mailto:wsmoak@apache.org">Wendy Smoak</a>
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="uploadAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="uploadAction"
*/
public class UploadAction
extends PlexusActionSupport

View File

@ -27,17 +27,17 @@ import org.apache.maven.archiva.scheduled.tasks.ArchivaTask;
import org.apache.maven.archiva.scheduled.tasks.DatabaseTask;
import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.taskqueue.TaskQueueException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
/**
* Configures the application.
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="schedulerAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="schedulerAction"
*/
public class SchedulerAction
extends PlexusActionSupport

View File

@ -22,9 +22,9 @@ package org.apache.maven.archiva.web.action.admin.appearance;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.OrganisationInformation;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
/**
* AbstractAppearanceAction

View File

@ -19,22 +19,22 @@ package org.apache.maven.archiva.web.action.admin.appearance;
* under the License.
*/
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.OrganisationInformation;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
/**
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @version $Id: ConfigurationAction.java 480950 2006-11-30 14:58:35Z evenisse $
*
* @plexus.component role="com.opensymphony.xwork.Action"
* @plexus.component role="com.opensymphony.xwork2.Action"
* role-hint="editOrganisationInfo"
*/
public class EditOrganisationInfoAction

View File

@ -22,7 +22,7 @@ package org.apache.maven.archiva.web.action.admin.appearance;
/**
* Stores the organisation information for displaying on the page.
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="organisationInfo"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="organisationInfo"
*/
public class OrganisationInfoAction
extends AbstractAppearanceAction

View File

@ -28,12 +28,12 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
import org.apache.maven.archiva.configuration.functors.ProxyConnectorSelectionPredicate;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import java.util.List;
import java.util.Map;

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.connectors.proxy;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
import org.apache.maven.archiva.policies.DownloadErrorPolicy;

View File

@ -28,7 +28,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="addProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addProxyConnectorAction"
*/
public class AddProxyConnectorAction
extends AbstractProxyConnectorFormAction
@ -40,6 +40,7 @@ public class AddProxyConnectorAction
connector = new ProxyConnectorConfiguration();
}
@Override
public String input()
{
return INPUT;

View File

@ -27,7 +27,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteProxyConnectorAction"
*/
public class DeleteProxyConnectorAction
extends AbstractProxyConnectorAction

View File

@ -24,7 +24,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
/**
* DisableProxyConnectorAction
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="disableProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="disableProxyConnectorAction"
*/
public class DisableProxyConnectorAction extends AbstractProxyConnectorAction
{

View File

@ -28,7 +28,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="editProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editProxyConnectorAction"
*/
public class EditProxyConnectorAction
extends AbstractProxyConnectorFormAction

View File

@ -24,7 +24,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
/**
* EnableProxyConnectorAction
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="enableProxyConnectorAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="enableProxyConnectorAction"
*/
public class EnableProxyConnectorAction extends AbstractProxyConnectorAction
{

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.connectors.proxy;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.configuration.AbstractRepositoryConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
@ -35,7 +35,7 @@ import java.util.Map;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="proxyConnectorsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="proxyConnectorsAction"
*/
public class ProxyConnectorsAction
extends AbstractProxyConnectorAction

View File

@ -30,7 +30,7 @@ import java.util.List;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="sortProxyConnectorsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortProxyConnectorsAction"
*/
public class SortProxyConnectorsAction
extends AbstractProxyConnectorAction

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.database;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.collections.CollectionUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
@ -28,12 +28,12 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio
import org.apache.maven.archiva.database.updater.DatabaseConsumers;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.admin.scanning.AdminRepositoryConsumerComparator;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import java.util.Collections;
import java.util.List;
@ -43,7 +43,7 @@ import java.util.List;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="databaseAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="databaseAction"
*/
public class DatabaseAction
extends PlexusActionSupport

View File

@ -26,16 +26,15 @@ import org.apache.maven.archiva.configuration.LegacyArtifactPath;
import org.apache.maven.archiva.model.ArtifactReference;
import org.apache.maven.archiva.repository.ManagedRepositoryContent;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import com.opensymphony.webwork.components.ActionError;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
/**
* Add a LegacyArtifactPath to archiva configuration
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="addLegacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addLegacyArtifactPathAction"
*/
public class AddLegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -25,15 +25,15 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.IndeterminateConfigurationException;
import org.apache.maven.archiva.configuration.LegacyArtifactPath;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
/**
* Delete a LegacyArtifactPath to archiva configuration
*
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteLegacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteLegacyArtifactPathAction"
*/
public class DeleteLegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -30,19 +30,19 @@ import org.apache.maven.archiva.configuration.LegacyArtifactPath;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.util.ContextUtils;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.Preparable;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
/**
* Shows the LegacyArtifactPath Tab for the administrator.
*
* @since 1.1
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="legacyArtifactPathAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="legacyArtifactPathAction"
*/
public class LegacyArtifactPathAction
extends PlexusActionSupport

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.networkproxies;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.functors.NotPredicate;
import org.apache.commons.lang.StringUtils;
@ -29,19 +29,19 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio
import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
import org.apache.maven.archiva.configuration.functors.NetworkProxySelectionPredicate;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
/**
* ConfigureNetworkProxyAction
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="configureNetworkProxyAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="configureNetworkProxyAction"
*/
public class ConfigureNetworkProxyAction
extends PlexusActionSupport

View File

@ -19,15 +19,15 @@ package org.apache.maven.archiva.web.action.admin.networkproxies;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import java.util.List;
@ -37,7 +37,7 @@ import java.util.List;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="networkProxiesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="networkProxiesAction"
*/
public class NetworkProxiesAction
extends PlexusActionSupport

View File

@ -25,14 +25,14 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
/**
* Abstract AdminRepositories Action base.

View File

@ -19,8 +19,8 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
@ -35,7 +35,7 @@ import java.io.IOException;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="addManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addManagedRepositoryAction"
*/
public class AddManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -19,8 +19,8 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
@ -34,7 +34,7 @@ import java.io.IOException;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="addRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addRemoteRepositoryAction"
*/
public class AddRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -48,7 +48,7 @@ import java.util.Map;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteManagedRepositoryAction"
*/
public class DeleteManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -34,7 +34,7 @@ import java.util.List;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRemoteRepositoryAction"
*/
public class DeleteRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -30,7 +30,7 @@ import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
*
* @author
* @version
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="deleteRepositoryGroupAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="deleteRepositoryGroupAction"
*/
public class DeleteRepositoryGroupAction
extends AbstractRepositoriesAdminAction

View File

@ -19,8 +19,8 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -37,7 +37,7 @@ import java.io.IOException;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="editManagedRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editManagedRepositoryAction"
*/
public class EditManagedRepositoryAction
extends AbstractManagedRepositoriesAction

View File

@ -19,7 +19,7 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -34,7 +34,7 @@ import java.io.IOException;
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
*
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="editRemoteRepositoryAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="editRemoteRepositoryAction"
*/
public class EditRemoteRepositoryAction
extends AbstractRemoteRepositoriesAction

View File

@ -19,8 +19,8 @@ package org.apache.maven.archiva.web.action.admin.repositories;
* under the License.
*/
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.Preparable;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.opensymphony.xwork2.Preparable;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
@ -31,11 +31,11 @@ import org.apache.maven.archiva.database.constraints.MostRecentRepositoryScanSta
import org.apache.maven.archiva.model.RepositoryContentStatistics;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.util.ContextUtils;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
@ -49,7 +49,7 @@ import java.util.Map;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="repositoriesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoriesAction"
*/
public class RepositoriesAction
extends PlexusActionSupport

View File

@ -26,8 +26,8 @@ import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.Preparable;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.Configuration;
@ -40,7 +40,7 @@ import org.apache.maven.archiva.web.util.ContextUtils;
*
* @author
* @version
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="repositoryGroupsAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryGroupsAction"
*/
public class RepositoryGroupsAction
extends AbstractRepositoriesAdminAction

View File

@ -30,7 +30,7 @@ import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
*
* @author
* @version
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="sortRepositoriesAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="sortRepositoriesAction"
*/
public class SortRepositoriesAction
extends AbstractRepositoriesAdminAction

View File

@ -19,8 +19,8 @@ package org.apache.maven.archiva.web.action.admin.scanning;
* under the License.
*/
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.Validateable;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@ -32,12 +32,13 @@ import org.apache.maven.archiva.configuration.functors.FiletypeSelectionPredicat
import org.apache.maven.archiva.configuration.functors.FiletypeToMapClosure;
import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
import org.codehaus.plexus.registry.RegistryException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import java.util.ArrayList;
import java.util.Collections;
@ -49,7 +50,7 @@ import java.util.Map;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="repositoryScanningAction"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="repositoryScanningAction"
*/
public class RepositoryScanningAction
extends PlexusActionSupport

View File

@ -19,9 +19,7 @@ package org.apache.maven.archiva.web.action.reports;
* under the License.
*/
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork2.Preparable;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@ -45,10 +43,6 @@ import org.apache.maven.archiva.reporting.RepositoryStatistics;
import org.apache.maven.archiva.reporting.RepositoryStatisticsReportGenerator;
import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.codehaus.plexus.redback.rbac.Resource;
import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -62,9 +56,14 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.apache.maven.archiva.web.action.PlexusActionSupport;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;
import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;
/**
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="generateReport"
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="generateReport"
*/
public class GenerateReportAction
extends PlexusActionSupport

View File

@ -19,9 +19,9 @@ package org.apache.maven.archiva.web.interceptor;
* under the License.
*/
import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.xwork.ActionInvocation;
import com.opensymphony.xwork.interceptor.Interceptor;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import javax.servlet.ServletContext;
@ -30,7 +30,7 @@ import javax.servlet.ServletContext;
* An interceptor that makes the configuration bits available, both to the application and the webapp
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
* @plexus.component role="com.opensymphony.xwork.interceptor.Interceptor"
* @plexus.component role="com.opensymphony.xwork2.interceptor.Interceptor"
* role-hint="configurationInterceptor"
*/
public class ConfigurationInterceptor

View File

@ -19,8 +19,9 @@ package org.apache.maven.archiva.web.mapper;
* under the License.
*/
import com.opensymphony.webwork.dispatcher.mapper.ActionMapping;
import com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapper;
import com.opensymphony.xwork2.config.ConfigurationManager;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.dispatcher.mapper.DefaultActionMapper;
import org.apache.commons.lang.StringUtils;
@ -69,7 +70,7 @@ public class RepositoryActionMapper
private static final String PARAM_VERSION = "version";
public ActionMapping getMapping( HttpServletRequest httpServletRequest )
public ActionMapping getMapping( HttpServletRequest httpServletRequest, ConfigurationManager manager )
{
String path = httpServletRequest.getServletPath();
@ -141,9 +142,10 @@ public class RepositoryActionMapper
}
}
return super.getMapping( httpServletRequest );
return super.getMapping( httpServletRequest, manager );
}
@Override
public String getUriFromActionMapping( ActionMapping actionMapping )
{
Map params = actionMapping.getParams();

View File

@ -52,7 +52,7 @@ import org.codehaus.plexus.redback.policy.AccountLockedException;
import org.codehaus.plexus.redback.policy.MustChangePasswordException;
import org.codehaus.plexus.redback.system.SecuritySession;
import org.codehaus.plexus.redback.users.UserNotFoundException;
import org.codehaus.plexus.redback.xwork.filter.authentication.HttpAuthenticator;
import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator;
import org.codehaus.plexus.spring.PlexusToSpringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -51,12 +51,14 @@ public class CopyPasteSnippetTag
public static final String TOGGLE = "toggle";
@Override
public void release()
{
object = null;
super.release();
}
@Override
public int doEndTag()
throws JspException
{

View File

@ -19,10 +19,10 @@ package org.apache.maven.archiva.web.tags;
* under the License.
*/
import com.opensymphony.webwork.WebWorkException;
import com.opensymphony.webwork.components.Component;
import com.opensymphony.xwork.util.OgnlValueStack;
import org.apache.struts2.StrutsException;
import org.apache.struts2.components.Component;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.database.ArchivaDAO;
@ -51,7 +51,7 @@ import javax.servlet.jsp.PageContext;
*
* @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
* @version $Id$
* @plexus.component role="com.opensymphony.webwork.components.Component" role-hint="download-artifact"
* @plexus.component role="org.apache.struts2.components.Component" role-hint="download-artifact"
* instantiation-strategy="per-lookup"
*/
public class DownloadArtifact
@ -82,7 +82,7 @@ public class DownloadArtifact
private DecimalFormat decimalFormat;
public DownloadArtifact( OgnlValueStack stack, PageContext pageContext )
public DownloadArtifact( ValueStack stack, PageContext pageContext )
{
super( stack );
decimalFormat = new DecimalFormat( "#,#00" );
@ -100,6 +100,7 @@ public class DownloadArtifact
}
}
@Override
public boolean end( Writer writer, String body )
{
StringBuffer sb = new StringBuffer();
@ -109,7 +110,7 @@ public class DownloadArtifact
Constraint constraint = new ArtifactsRelatedConstraint( groupId, artifactId, version );
List<ArchivaArtifact> relatedArtifacts = dao.getArtifactDAO().queryArtifacts( constraint );
if ( relatedArtifacts != null )
if ( relatedArtifacts != null && relatedArtifacts.size() > 0 )
{
String repoId = ( (ArchivaArtifact) relatedArtifacts.get( 0 ) ).getModel().getRepositoryId();
ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
@ -151,7 +152,7 @@ public class DownloadArtifact
}
catch ( IOException e )
{
throw new WebWorkException( "IOError: " + e.getMessage(), e );
throw new StrutsException( "IOError: " + e.getMessage(), e );
}
return super.end( writer, body );

View File

@ -19,10 +19,15 @@ package org.apache.maven.archiva.web.tags;
* under the License.
*/
import com.opensymphony.webwork.views.jsp.TagUtils;
import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.TagUtils;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts2.views.jsp.ComponentTagSupport;
/**
* DownloadArtifactTag
@ -31,7 +36,7 @@ import javax.servlet.jsp.tagext.TagSupport;
* @version $Id$
*/
public class DownloadArtifactTag
extends TagSupport
extends ComponentTagSupport
{
private String groupId_; // stores EL-based groupId property
@ -49,19 +54,23 @@ public class DownloadArtifactTag
private boolean mini; // stores the evaluated mini object.
@Override
public Component getBean(ValueStack valueStack, HttpServletRequest request, HttpServletResponse response) {
return new DownloadArtifact(valueStack, pageContext);
}
@Override
public int doEndTag()
throws JspException
{
evaluateExpressions();
DownloadArtifact download = new DownloadArtifact( TagUtils.getStack( pageContext ), pageContext );
DownloadArtifact download = (DownloadArtifact)component;
download.setGroupId( groupId );
download.setArtifactId( artifactId );
download.setVersion( version );
download.setMini( mini );
download.end( pageContext.getOut(), "" );
return super.doEndTag();
}

View File

@ -19,10 +19,10 @@ package org.apache.maven.archiva.web.tags;
* under the License.
*/
import com.opensymphony.webwork.WebWorkException;
import com.opensymphony.webwork.components.Component;
import com.opensymphony.xwork.util.OgnlValueStack;
import org.apache.struts2.StrutsException;
import org.apache.struts2.components.Component;
import com.opensymphony.xwork2.util.ValueStack;
import java.io.IOException;
import java.io.Writer;
import java.util.StringTokenizer;
@ -57,13 +57,14 @@ public class GroupIdLink
private boolean includeTop = false;
public GroupIdLink( OgnlValueStack stack, HttpServletRequest req, HttpServletResponse res )
public GroupIdLink( ValueStack stack, HttpServletRequest req, HttpServletResponse res )
{
super( stack );
this.req = req;
this.res = res;
}
@Override
public boolean end( Writer writer, String body )
{
StringBuffer sb = new StringBuffer();
@ -105,7 +106,7 @@ public class GroupIdLink
}
catch ( IOException e )
{
throw new WebWorkException( "IOError: " + e.getMessage(), e );
throw new StrutsException( "IOError: " + e.getMessage(), e );
}
return super.end( writer, body );
@ -113,16 +114,14 @@ public class GroupIdLink
private String determineBrowseActionUrl()
{
return determineActionURL( "browse", NAMESPACE, method, req, res, parameters, req.getScheme(), includeContext,
encode, true );
return determineActionURL( "browse", NAMESPACE, method, req, res, parameters, req.getScheme(), includeContext, encode, false, false );
}
private String determineBrowseGroupActionUrl( String gid )
{
parameters.put( "groupId", gid );
return determineActionURL( ACTION, NAMESPACE, method, req, res, parameters, req.getScheme(), includeContext,
encode, true );
return determineActionURL( ACTION, NAMESPACE, method, req, res, parameters, req.getScheme(), includeContext, encode, false, false );
}
public String getGroupId()

View File

@ -19,12 +19,13 @@ package org.apache.maven.archiva.web.tags;
* under the License.
*/
import com.opensymphony.webwork.views.jsp.TagUtils;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.components.Component;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts2.views.jsp.ComponentTagSupport;
/**
* GroupIdLink
@ -33,7 +34,7 @@ import javax.servlet.jsp.tagext.TagSupport;
* @version $Id$
*/
public class GroupIdLinkTag
extends TagSupport
extends ComponentTagSupport
{
private String var_; // stores EL-based property
@ -41,6 +42,12 @@ public class GroupIdLinkTag
private boolean includeTop = false;
@Override
public Component getBean(ValueStack valueStack, HttpServletRequest request, HttpServletResponse response) {
return new GroupIdLink( valueStack, request, response );
}
@Override
public void release()
{
var_ = null;
@ -50,18 +57,16 @@ public class GroupIdLinkTag
super.release();
}
@Override
public int doEndTag()
throws JspException
{
evaluateExpressions();
GroupIdLink groupIdLink = (GroupIdLink)component;
GroupIdLink gidlink = new GroupIdLink( TagUtils.getStack( pageContext ), (HttpServletRequest) pageContext
.getRequest(), (HttpServletResponse) pageContext.getResponse() );
gidlink.setGroupId( var );
gidlink.setIncludeTop( includeTop );
gidlink.end( pageContext.getOut(), "" );
groupIdLink.setGroupId( var );
groupIdLink.setIncludeTop( includeTop );
return super.doEndTag();
}

View File

@ -19,9 +19,9 @@ package org.apache.maven.archiva.web.validator;
* under the License.
*/
import com.opensymphony.xwork.validator.ValidationException;
import com.opensymphony.xwork.validator.ValidatorContext;
import com.opensymphony.xwork.validator.validators.FieldValidatorSupport;
import com.opensymphony.xwork2.validator.ValidationException;
import com.opensymphony.xwork2.validator.ValidatorContext;
import com.opensymphony.xwork2.validator.validators.FieldValidatorSupport;
/**
* Reused from Continuum crontab validator
@ -44,4 +44,4 @@ public class CronExpressionValidator
return;
}
}
}
}

View File

@ -19,9 +19,9 @@ package org.apache.maven.archiva.web.validator;
* under the License.
*/
import com.opensymphony.xwork.validator.ValidationException;
import com.opensymphony.xwork.validator.ValidatorContext;
import com.opensymphony.xwork.validator.validators.ValidatorSupport;
import com.opensymphony.xwork2.validator.ValidationException;
import com.opensymphony.xwork2.validator.ValidatorContext;
import com.opensymphony.xwork2.validator.validators.ValidatorSupport;
/**
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>

View File

@ -19,9 +19,9 @@ package org.apache.maven.archiva.web.validator;
* under the License.
*/
import com.opensymphony.xwork.validator.ValidationException;
import com.opensymphony.xwork.validator.ValidatorContext;
import com.opensymphony.xwork.validator.validators.ValidatorSupport;
import com.opensymphony.xwork2.validator.ValidationException;
import com.opensymphony.xwork2.validator.ValidatorContext;
import com.opensymphony.xwork2.validator.validators.ValidatorSupport;
/**
* Validator for synced repository form. The values to be validated depends on the

View File

@ -202,7 +202,7 @@
<component>
<role>org.codehaus.plexus.redback.system.check.EnvironmentCheck</role>
<role-hint>locked-admin-check</role-hint>
<implementation>org.codehaus.plexus.redback.xwork.checks.security.LockedAdminEnvironmentCheck</implementation>
<implementation>org.codehaus.plexus.redback.struts2.checks.security.LockedAdminEnvironmentCheck</implementation>
<description>LockedAdminEnvironmentCheck: checks if accounts marked as system administrator are locked
and unlocks them on startup.
</description>

View File

@ -73,12 +73,12 @@
<appender-ref ref="rolling" />
</logger>
<logger name="com.opensymphony.xwork">
<logger name="com.opensymphony.xwork2">
<level value="info"/>
<appender-ref ref="rolling" />
</logger>
<logger name="com.opensymphony.webwork">
<logger name="org.apache.struts2">
<level value="info"/>
<appender-ref ref="rolling" />
</logger>

View File

@ -18,14 +18,15 @@
#
# define our own action mapper here
webwork.mapper.class = org.apache.maven.archiva.web.mapper.RepositoryActionMapper
webwork.objectFactory = org.codehaus.plexus.spring.WebWorkPlexusInSpringObjectFactory
webwork.url.includeParams = none
struts.mapper.class = org.apache.maven.archiva.web.mapper.RepositoryActionMapper
struts.objectFactory = org.codehaus.plexus.spring.Struts2PlexusInSpringObjectFactory
struts.url.includeParams = none
#webwork.devMode = true
webwork.multipart.parser=jakarta
struts.devMode = true
struts.configuration.xml.reload=true
struts.multipart.parser=jakarta
# TODO: package up a theme and share with Continuum. Should contain everything from xhtml, and set templateDir to WEB-INF/themes
# Localization
webwork.custom.i18n.resources=org.codehaus.plexus.redback.xwork.default,org.apache.maven.archiva.redback.custom
struts.custom.i18n.resources=org.codehaus.plexus.redback.xwork.default,org.apache.maven.archiva.redback.custom

View File

@ -18,24 +18,21 @@
~ under the License.
-->
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1//EN"
"http://www.opensymphony.com/xwork/xwork-1.1.dtd">
<xwork>
<!-- TODO: better error handling for exceptions needed [MRM-490] -->
<include file="webwork-default.xml"/>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- Include plexus-security xwork configurations. -->
<include file="xwork-security.xml"/>
<include file="struts-security.xml"/>
<package name="base" extends="webwork-default">
<package name="base" extends="struts-default">
<interceptors>
<interceptor name="configuration" class="configurationInterceptor"/>
<interceptor name="redbackForceAdminUser" class="redbackForceAdminUserInterceptor"/>
<interceptor name="redbackSecureActions" class="redbackSecureActionInterceptor"/>
<interceptor name="redbackAutoLogin" class="redbackAutoLoginInterceptor"/>
<interceptor name="redbackPolicyEnforcement" class="redbackPolicyEnforcementInterceptor"/>
<interceptor name="paramFilter" class="com.opensymphony.xwork.interceptor.ParameterFilterInterceptor"/>
<interceptor name="paramFilter" class="com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor"/>
<interceptor-stack name="configuredArchivaStack">
<interceptor-ref name="redbackForceAdminUser"/>
@ -220,7 +217,7 @@
</package>
<package name="components" namespace="/components" extends="webwork-default">
<package name="components" namespace="/components" extends="struts-default">
<default-interceptor-ref name="basicStack"/>
<action name="companyInfo" class="organisationInfo">
<result>/WEB-INF/jsp/components/companyLogo.jsp</result>
@ -502,22 +499,10 @@
</action>
<action name="generateReport" class="generateReport">
<result name="jasper" type="jasper">
<param name="location">/WEB-INF/jasperreports/report.jasper</param>
<param name="dataSource">reports</param>
<param name="format">HTML</param>
</result>
<result name="input">/WEB-INF/jsp/reports/pickReport.jsp</result>
<result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
<result>/WEB-INF/jsp/reports/basicReport.jsp</result>
</action>
<action name="generateStatisticsReport" class="generateReport" method="generateStatistics">
<result name="input">/WEB-INF/jsp/reports/pickReport.jsp</result>
<result name="blank">/WEB-INF/jsp/reports/blankReport.jsp</result>
<result>/WEB-INF/jsp/reports/statisticsReport.jsp</result>
</action>
</package>
</xwork>
</struts>

View File

@ -1,4 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator Config 1.0//EN"
"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
@ -19,19 +24,19 @@
-->
<validators>
<validator name="required" class="com.opensymphony.xwork.validator.validators.RequiredFieldValidator"/>
<validator name="requiredstring" class="com.opensymphony.xwork.validator.validators.RequiredStringValidator"/>
<validator name="int" class="com.opensymphony.xwork.validator.validators.IntRangeFieldValidator"/>
<validator name="double" class="com.opensymphony.xwork.validator.validators.DoubleRangeFieldValidator"/>
<validator name="date" class="com.opensymphony.xwork.validator.validators.DateRangeFieldValidator"/>
<validator name="expression" class="com.opensymphony.xwork.validator.validators.ExpressionValidator"/>
<validator name="fieldexpression" class="com.opensymphony.xwork.validator.validators.FieldExpressionValidator"/>
<validator name="email" class="com.opensymphony.xwork.validator.validators.EmailValidator"/>
<validator name="url" class="com.opensymphony.xwork.validator.validators.URLValidator"/>
<validator name="visitor" class="com.opensymphony.xwork.validator.validators.VisitorFieldValidator"/>
<validator name="conversion" class="com.opensymphony.xwork.validator.validators.ConversionErrorFieldValidator"/>
<validator name="stringlength" class="com.opensymphony.xwork.validator.validators.StringLengthFieldValidator"/>
<validator name="regex" class="com.opensymphony.xwork.validator.validators.RegexFieldValidator"/>
<validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
<validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>
<validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/>
<validator name="double" class="com.opensymphony.xwork2.validator.validators.DoubleRangeFieldValidator"/>
<validator name="date" class="com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator"/>
<validator name="expression" class="com.opensymphony.xwork2.validator.validators.ExpressionValidator"/>
<validator name="fieldexpression" class="com.opensymphony.xwork2.validator.validators.FieldExpressionValidator"/>
<validator name="email" class="com.opensymphony.xwork2.validator.validators.EmailValidator"/>
<validator name="url" class="com.opensymphony.xwork2.validator.validators.URLValidator"/>
<validator name="visitor" class="com.opensymphony.xwork2.validator.validators.VisitorFieldValidator"/>
<validator name="conversion" class="com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator"/>
<validator name="stringlength" class="com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator"/>
<validator name="regex" class="com.opensymphony.xwork2.validator.validators.RegexFieldValidator"/>
<validator name="interval" class="org.apache.maven.archiva.web.validator.IntervalValidator"/>
<validator name="syncedrepo" class="org.apache.maven.archiva.web.validator.SyncedRepositoryValidator"/>
<validator name="crontab" class="org.apache.maven.archiva.web.validator.CronExpressionValidator"/>

View File

@ -17,13 +17,13 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>You have access to no repositories</title>
<ww:head/>
<s:head/>
</head>
<body>

View File

@ -17,12 +17,12 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Admin: Add Legacy Artifact Path</title>
<ww:head/>
<s:head/>
</head>
<body>
@ -65,17 +65,17 @@
}
</script>
<ww:actionmessage/>
<ww:actionerror/>
<ww:form method="post" action="addLegacyArtifactPath!commit" namespace="/admin" validate="true">
<ww:textfield name="legacyArtifactPath.path" label="Path" size="50" required="true" onchange="parse( this.value )"/>
<ww:textfield name="groupId" label="GroupId" size="20" required="true"/>
<ww:textfield name="artifactId" label="ArtifactId" size="20" required="true"/>
<ww:textfield name="version" label="Version" size="20" required="true"/>
<ww:textfield name="classifier" label="Classifier" size="20" required="false"/>
<ww:textfield name="type" label="Type" size="20" required="true"/>
<ww:submit value="Add Legacy Artifact Path"/>
</ww:form>
<s:actionmessage/>
<s:actionerror/>
<s:form method="post" action="addLegacyArtifactPath!commit" namespace="/admin" validate="true">
<s:textfield name="legacyArtifactPath.path" label="Path" size="50" required="true" onchange="parse( this.value )"/>
<s:textfield name="groupId" label="GroupId" size="20" required="true"/>
<s:textfield name="artifactId" label="ArtifactId" size="20" required="true"/>
<s:textfield name="version" label="Version" size="20" required="true"/>
<s:textfield name="classifier" label="Classifier" size="20" required="false"/>
<s:textfield name="type" label="Type" size="20" required="true"/>
<s:submit value="Add Legacy Artifact Path"/>
</s:form>
<script type="text/javascript">
var ref = document.getElementById("addLegacyArtifactPath_legacyArtifactPath_artifact").value;

View File

@ -17,12 +17,12 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Admin: Add Proxy Connector</title>
<ww:head/>
<s:head/>
</head>
<body>
@ -31,13 +31,13 @@
<div id="contentArea">
<ww:actionerror/>
<ww:actionmessage/>
<s:actionerror/>
<s:actionmessage/>
<ww:form name="saveProxyConnector" method="post" action="addProxyConnector!commit" namespace="/admin" validate="true">
<s:form name="saveProxyConnector" method="post" action="addProxyConnector!commit" namespace="/admin" validate="true">
<%@ include file="/WEB-INF/jsp/admin/include/proxyConnectorForm.jspf" %>
<ww:submit value="Add Proxy Connector"/>
</ww:form>
<s:submit value="Add Proxy Connector"/>
</s:form>
</div>

View File

@ -17,12 +17,12 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Admin: Add Remote Repository</title>
<ww:head/>
<s:head/>
</head>
<body>
@ -31,12 +31,12 @@
<div id="contentArea">
<ww:actionmessage/>
<ww:form method="post" action="addRemoteRepository!commit" namespace="/admin" validate="true">
<ww:textfield name="repository.id" label="Identifier" size="10" required="true"/>
<s:actionmessage/>
<s:form method="post" action="addRemoteRepository!commit" namespace="/admin" validate="true">
<s:textfield name="repository.id" label="Identifier" size="10" required="true"/>
<%@ include file="/WEB-INF/jsp/admin/include/remoteRepositoryForm.jspf" %>
<ww:submit value="Add Repository"/>
</ww:form>
<s:submit value="Add Repository"/>
</s:form>
<script type="text/javascript">
document.getElementById("addRemoteRepository_id").focus();

View File

@ -17,12 +17,12 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Admin: Add Managed Repository</title>
<ww:head/>
<s:head/>
</head>
<body>
@ -30,13 +30,13 @@
<h1>Admin: Add Managed Repository</h1>
<div id="contentArea">
<ww:actionerror/>
<ww:actionmessage/>
<ww:form method="post" action="addRepository!commit" namespace="/admin" validate="true">
<ww:textfield name="repository.id" label="Identifier" size="10" required="true"/>
<s:actionerror/>
<s:actionmessage/>
<s:form method="post" action="addRepository!commit" namespace="/admin" validate="true">
<s:textfield name="repository.id" label="Identifier" size="10" required="true"/>
<%@ include file="/WEB-INF/jsp/admin/include/repositoryForm.jspf" %>
<ww:submit value="Add Repository"/>
</ww:form>
<s:submit value="Add Repository"/>
</s:form>
<script type="text/javascript">
document.getElementById("addRepository_repository_id").focus();

View File

@ -17,26 +17,26 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Configure Appearance</title>
<ww:head/>
<s:head/>
</head>
<body>
<h1>Appearance</h1>
<div style="float: right">
<a href="<ww:url action='editAppearance' />">Edit</a>
<a href="<s:url action='editAppearance' />">Edit</a>
</div>
<h2>Organization Details</h2>
<p>
The logo in the top right of the screen is controlled by the following settings.
<a href="<ww:url action='editAppearance' />">Change your appearence</a>
<a href="<s:url action='editAppearance' />">Change your appearence</a>
</p>
<h3>Organization Information</h3>
@ -60,7 +60,7 @@
<tr>
<th>&nbsp;</th>
<td>
<img src="${organisationLogo}" title="${organisationName}" border="0" alt=""/>
<img src="${organisationLogo}" title="${organisationName}" border="0" alt=""/>
</td>
</tr>
</table>

View File

@ -17,13 +17,13 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Admin: Add Managed Repository</title>
<ww:head/>
<s:head/>
</head>
<body>
@ -103,33 +103,33 @@
</table>
</div>
<ww:form method="post" action="${action}" namespace="/admin" validate="true" theme="simple">
<s:form method="post" action="%{action}" namespace="/admin" validate="true" theme="simple">
<div class="buttons">
<ww:hidden name="repository.id" value="${repository.id}"/>
<ww:hidden name="repository.name" value="${repository.name}"/>
<ww:hidden name="repository.location" value="${repository.location}"/>
<ww:hidden name="repository.indexDir" value="${repository.indexDir}"/>
<ww:hidden name="repository.layout" value="${repository.layout}"/>
<ww:hidden name="repository.refreshCronExpression" value="${repository.refreshCronExpression}"/>
<ww:hidden name="repository.daysOlder" value="${repository.daysOlder}"/>
<ww:hidden name="repository.retentionCount" value="${repository.retentionCount}"/>
<ww:hidden name="repository.releases" value="${repository.releases}"/>
<ww:hidden name="repository.snapshots" value="${repository.snapshots}"/>
<ww:hidden name="repository.scanned" value="${repository.scanned}"/>
<ww:hidden name="repository.deleteReleasedSnapshots" value="${repository.deleteReleasedSnapshots}"/>
<s:hidden name="repository.id" value="%{#attr.repository.id}"/>
<s:hidden name="repository.name" value="%{#attr.repository.name}"/>
<s:hidden name="repository.location" value="%{#attr.repository.location}"/>
<s:hidden name="repository.indexDir" value="%{#attr.repository.indexDir}"/>
<s:hidden name="repository.layout" value="%{#attr.repository.layout}"/>
<s:hidden name="repository.refreshCronExpression" value="%{#attr.repository.refreshCronExpression}"/>
<s:hidden name="repository.daysOlder" value="%{#attr.repository.daysOlder}"/>
<s:hidden name="repository.retentionCount" value="%{#attr.repository.retentionCount}"/>
<s:hidden name="repository.releases" value="%{#attr.repository.releases}"/>
<s:hidden name="repository.snapshots" value="%{#attr.repository.snapshots}"/>
<s:hidden name="repository.scanned" value="%{#attr.repository.scanned}"/>
<s:hidden name="repository.deleteReleasedSnapshots" value="%{#attr.repository.deleteReleasedSnapshots}"/>
<c:choose>
<c:when test="${action == 'addRepository'}">
<ww:submit value="Save" method="confirmAdd"/>
<s:submit value="Save" method="confirmAdd"/>
</c:when>
<c:otherwise>
<ww:submit value="Save" method="confirmUpdate"/>
<s:submit value="Save" method="confirmUpdate"/>
</c:otherwise>
</c:choose>
<ww:submit value="Cancel" method="execute"/>
<s:submit value="Cancel" method="execute"/>
</div>
</ww:form>
</s:form>
</body>
</html>

View File

@ -17,7 +17,7 @@
~ under the License.
--%>
<%@ taglib prefix="ww" uri="/webwork"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
@ -26,7 +26,7 @@
<html>
<head>
<title>Administration - Database</title>
<ww:head />
<s:head />
</head>
<body>
@ -35,8 +35,8 @@
<div id="contentArea">
<ww:actionerror />
<ww:actionmessage />
<s:actionerror />
<s:actionmessage />
<c:url var="iconDeleteUrl" value="/images/icons/delete.gif" />
<c:url var="iconCreateUrl" value="/images/icons/create.png" />
@ -45,21 +45,21 @@
<h2>Database - Unprocessed Artifacts Scanning</h2>
<ww:form method="post" action="database!updateSchedule"
<s:form method="post" action="database!updateSchedule"
namespace="/admin" validate="false" theme="simple">
<table>
<ww:textfield name="cron" label="Cron" size="40" theme="xhtml" />
<s:textfield name="cron" label="Cron" size="40" theme="xhtml" />
<tr>
<td colspan="2">
<ww:submit value="Update Cron" />
<s:submit value="Update Cron" />
</td>
</tr>
</table>
</ww:form>
</s:form>
<ww:form action="updateDatabase" theme="simple">
<ww:submit value="Update Database Now"/>
</ww:form>
<s:form action="updateDatabase" theme="simple">
<s:submit value="Update Database Now"/>
</s:form>
<h2>Database - Unprocessed Artifacts Scanning</h2>
@ -71,7 +71,7 @@
<c:otherwise>
<%-- Display the consumers. --%>
<ww:form method="post" action="database!updateUnprocessedConsumers"
<s:form method="post" action="database!updateUnprocessedConsumers"
namespace="/admin" validate="false" theme="simple">
<table class="consumers">
<tr>
@ -107,11 +107,11 @@
</c:forEach>
<tr>
<td colspan="4">
<ww:submit value="Update Consumers" />
<s:submit value="Update Consumers" />
</td>
</tr>
</table>
</ww:form>
</s:form>
</c:otherwise>
</c:choose>
@ -126,7 +126,7 @@
<c:otherwise>
<%-- Display the consumers. --%>
<ww:form method="post" action="database!updateCleanupConsumers"
<s:form method="post" action="database!updateCleanupConsumers"
namespace="/admin" validate="false" theme="simple">
<table class="consumers">
<tr>
@ -162,11 +162,11 @@
</c:forEach>
<tr>
<td colspan="4">
<ww:submit value="Update Consumers" />
<s:submit value="Update Consumers" />
</td>
</tr>
</table>
</ww:form>
</s:form>
</c:otherwise>
</c:choose>

Some files were not shown because too many files have changed in this diff Show More