- optimized imports - ran code formatting git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@467926 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-0.9-alpha-1
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -15,7 +16,7 @@ | |||
--> | |||
<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"> | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<parent> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -1,5 +1,22 @@ | |||
<?xml version="1.0"?> | |||
<project> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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>archiva</artifactId> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -5,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,5 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -7,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,11 +1,5 @@ | |||
package org.apache.maven.archiva.configuration; | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import org.easymock.MockControl; | |||
import java.io.File; | |||
import java.util.Properties; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
@@ -13,7 +7,7 @@ import java.util.Properties; | |||
* 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 | |||
* 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, | |||
@@ -22,6 +16,12 @@ import java.util.Properties; | |||
* limitations under the License. | |||
*/ | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import org.easymock.MockControl; | |||
import java.io.File; | |||
import java.util.Properties; | |||
/** | |||
* Test the configuration store. | |||
* |
@@ -1,103 +1,103 @@ | |||
package org.apache.maven.archiva.configuration; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.List; | |||
import java.util.Properties; | |||
/** | |||
* @author Edwin Punzalan | |||
*/ | |||
public class MavenProxyPropertyLoaderTest | |||
extends PlexusTestCase | |||
{ | |||
private static final int DEFAULT_CACHE_PERIOD = 3600; | |||
private MavenProxyPropertyLoader loader; | |||
public void testLoadValidMavenProxyConfiguration() | |||
throws IOException, InvalidConfigurationException | |||
{ | |||
File confFile = getTestFile( "src/test/conf/maven-proxy-complete.conf" ); | |||
Configuration configuration = new Configuration(); | |||
Proxy proxy = new Proxy(); | |||
proxy.setHost( "original-host" ); | |||
configuration.setProxy( proxy ); // overwritten | |||
configuration.setIndexPath( "index-path" ); // existing value | |||
loader.load( new FileInputStream( confFile ), configuration ); | |||
List list = configuration.getRepositories(); | |||
assertEquals( "check single managed repository", 1, list.size() ); | |||
RepositoryConfiguration managedRepository = (RepositoryConfiguration) list.iterator().next(); | |||
assertEquals( "cache path changed", "target", managedRepository.getDirectory() ); | |||
assertEquals( "Count repositories", 4, configuration.getProxiedRepositories().size() ); | |||
list = configuration.getProxiedRepositories(); | |||
ProxiedRepositoryConfiguration repo = (ProxiedRepositoryConfiguration) list.get( 0 ); | |||
assertEquals( "Repository name not as expected", "local-repo", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "file://target", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", 0, repo.getSnapshotsInterval() ); | |||
assertFalse( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 1 ); | |||
assertEquals( "Repository name not as expected", "www-ibiblio-org", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://www.ibiblio.org/maven2", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertTrue( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 2 ); | |||
assertEquals( "Repository name not as expected", "dist-codehaus-org", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://dist.codehaus.org", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertTrue( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 3 ); | |||
assertEquals( "Repository name not as expected", "private-example-com", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://private.example.com/internal", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertFalse( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
} | |||
public void testInvalidConfiguration() | |||
{ | |||
Configuration configuration = new Configuration(); | |||
try | |||
{ | |||
loader.load( new Properties(), configuration ); | |||
fail( "Incomplete config should have failed" ); | |||
} | |||
catch ( InvalidConfigurationException e ) | |||
{ | |||
assertTrue( true ); | |||
} | |||
} | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
super.setUp(); | |||
loader = new MavenProxyPropertyLoader(); | |||
} | |||
} | |||
package org.apache.maven.archiva.configuration; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.List; | |||
import java.util.Properties; | |||
/** | |||
* @author Edwin Punzalan | |||
*/ | |||
public class MavenProxyPropertyLoaderTest | |||
extends PlexusTestCase | |||
{ | |||
private static final int DEFAULT_CACHE_PERIOD = 3600; | |||
private MavenProxyPropertyLoader loader; | |||
public void testLoadValidMavenProxyConfiguration() | |||
throws IOException, InvalidConfigurationException | |||
{ | |||
File confFile = getTestFile( "src/test/conf/maven-proxy-complete.conf" ); | |||
Configuration configuration = new Configuration(); | |||
Proxy proxy = new Proxy(); | |||
proxy.setHost( "original-host" ); | |||
configuration.setProxy( proxy ); // overwritten | |||
configuration.setIndexPath( "index-path" ); // existing value | |||
loader.load( new FileInputStream( confFile ), configuration ); | |||
List list = configuration.getRepositories(); | |||
assertEquals( "check single managed repository", 1, list.size() ); | |||
RepositoryConfiguration managedRepository = (RepositoryConfiguration) list.iterator().next(); | |||
assertEquals( "cache path changed", "target", managedRepository.getDirectory() ); | |||
assertEquals( "Count repositories", 4, configuration.getProxiedRepositories().size() ); | |||
list = configuration.getProxiedRepositories(); | |||
ProxiedRepositoryConfiguration repo = (ProxiedRepositoryConfiguration) list.get( 0 ); | |||
assertEquals( "Repository name not as expected", "local-repo", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "file://target", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", 0, repo.getSnapshotsInterval() ); | |||
assertFalse( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 1 ); | |||
assertEquals( "Repository name not as expected", "www-ibiblio-org", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://www.ibiblio.org/maven2", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertTrue( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 2 ); | |||
assertEquals( "Repository name not as expected", "dist-codehaus-org", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://dist.codehaus.org", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertTrue( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
repo = (ProxiedRepositoryConfiguration) list.get( 3 ); | |||
assertEquals( "Repository name not as expected", "private-example-com", repo.getId() ); | |||
assertEquals( "Repository url does not match its name", "http://private.example.com/internal", repo.getUrl() ); | |||
assertEquals( "Repository cache period check failed", DEFAULT_CACHE_PERIOD, repo.getSnapshotsInterval() ); | |||
assertFalse( "Repository failure caching check failed", repo.isCacheFailures() ); | |||
} | |||
public void testInvalidConfiguration() | |||
{ | |||
Configuration configuration = new Configuration(); | |||
try | |||
{ | |||
loader.load( new Properties(), configuration ); | |||
fail( "Incomplete config should have failed" ); | |||
} | |||
catch ( InvalidConfigurationException e ) | |||
{ | |||
assertTrue( true ); | |||
} | |||
} | |||
protected void setUp() | |||
throws Exception | |||
{ | |||
super.setUp(); | |||
loader = new MavenProxyPropertyLoader(); | |||
} | |||
} |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -5,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>test</groupId> | |||
<artifactId>newversion-artifact</artifactId> |
@@ -1,5 +1,22 @@ | |||
<?xml version="1.0"?> | |||
<project> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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>archiva</artifactId> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -1,5 +1,21 @@ | |||
package org.apache.maven.archiva; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import org.apache.maven.archiva.converter.RepositoryConversionException; | |||
import org.apache.maven.archiva.converter.RepositoryConverter; | |||
import org.apache.maven.archiva.discoverer.ArtifactDiscoverer; |
@@ -1,5 +1,21 @@ | |||
package org.apache.maven.archiva; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import org.apache.maven.archiva.converter.RepositoryConversionException; | |||
import org.apache.maven.archiva.discoverer.DiscovererException; | |||
@@ -17,15 +17,15 @@ package org.apache.maven.archiva.proxy; | |||
*/ | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ConfigurationChangeException; | |||
import org.apache.maven.archiva.configuration.ConfigurationChangeListener; | |||
import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.ConfiguredRepositoryFactory; | |||
import org.apache.maven.archiva.configuration.InvalidConfigurationException; | |||
import org.apache.maven.archiva.configuration.ProxiedRepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.Proxy; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.ConfigurationChangeListener; | |||
import org.apache.maven.archiva.configuration.InvalidConfigurationException; | |||
import org.apache.maven.archiva.configuration.ConfigurationChangeException; | |||
import org.apache.maven.artifact.repository.ArtifactRepository; | |||
import org.apache.maven.wagon.ResourceDoesNotExistException; | |||
import org.apache.maven.wagon.proxy.ProxyInfo; |
@@ -18,9 +18,9 @@ package org.apache.maven.archiva.scheduler.executors; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.ConfiguredRepositoryFactory; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.discoverer.ArtifactDiscoverer; | |||
import org.apache.maven.archiva.discoverer.DiscovererException; | |||
import org.apache.maven.archiva.discoverer.MetadataDiscoverer; |
@@ -1,4 +1,20 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<component-set> | |||
<components> | |||
@@ -1,5 +1,21 @@ | |||
package org.apache.maven.archiva; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import org.codehaus.plexus.PlexusTestCase; | |||
import java.io.File; |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -22,7 +22,6 @@ import org.codehaus.plexus.util.DirectoryScanner; | |||
import org.codehaus.plexus.util.FileUtils; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.Iterator; |
@@ -1,7 +1,5 @@ | |||
package org.apache.maven.archiva.discoverer; | |||
import java.util.Iterator; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
@@ -18,6 +16,8 @@ import java.util.Iterator; | |||
* limitations under the License. | |||
*/ | |||
import java.util.Iterator; | |||
/** | |||
* @author Edwin Punzalan | |||
*/ |
@@ -6,6 +6,23 @@ | |||
24 July 2006 | |||
----- | |||
~~ Copyright 2006 The Apache Software Foundation. | |||
~~ | |||
~~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~~ you may not use this file except in compliance with the License. | |||
~~ You may obtain a copy of the License at | |||
~~ | |||
~~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~~ | |||
~~ Unless required by applicable law or agreed to in writing, software | |||
~~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~~ See the License for the specific language governing permissions and | |||
~~ limitations under the License. | |||
~~ NOTE: For help with the syntax of this file, see: | |||
~~ http://maven.apache.org/guides/mini/guide-apt-format.html | |||
Discoverer Design | |||
The artifact discoverer is designed to traverse the paths in the repository and identify files that are part of |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven</groupId> | |||
</metadata> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven.update</groupId> | |||
<artifactId>test-not-updated</artifactId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven.update</groupId> | |||
<artifactId>test-updated</artifactId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.testgroup</groupId> | |||
<artifactId>discovery</artifactId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.testgroup</groupId> | |||
<artifactId>discovery</artifactId> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -15,7 +16,7 @@ | |||
--> | |||
<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"> | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
<parent> | |||
<groupId>org.apache.maven.archiva</groupId> | |||
<artifactId>archiva</artifactId> |
@@ -1,8 +1,5 @@ | |||
package org.apache.maven.archiva.indexer.record; | |||
import java.util.Date; | |||
import java.util.List; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
@@ -19,6 +16,9 @@ import java.util.List; | |||
* limitations under the License. | |||
*/ | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* The a record with the fields in the minimal index. | |||
* |
@@ -1,9 +1,5 @@ | |||
package org.apache.maven.archiva.indexer.record; | |||
import java.util.ArrayList; | |||
import java.util.Collections; | |||
import java.util.List; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
@@ -20,6 +16,10 @@ import java.util.List; | |||
* limitations under the License. | |||
*/ | |||
import java.util.ArrayList; | |||
import java.util.Collections; | |||
import java.util.List; | |||
/** | |||
* The a record with the fields in the standard index. | |||
* |
@@ -6,6 +6,23 @@ | |||
25 July 2006 | |||
----- | |||
~~ Copyright 2006 The Apache Software Foundation. | |||
~~ | |||
~~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~~ you may not use this file except in compliance with the License. | |||
~~ You may obtain a copy of the License at | |||
~~ | |||
~~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~~ | |||
~~ Unless required by applicable law or agreed to in writing, software | |||
~~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~~ See the License for the specific language governing permissions and | |||
~~ limitations under the License. | |||
~~ NOTE: For help with the syntax of this file, see: | |||
~~ http://maven.apache.org/guides/mini/guide-apt-format.html | |||
Indexer Design | |||
<<Note: The current indexer design is under review. This document will grow into what it should be, and the code and |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-artifact</artifactId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-artifact</artifactId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>org.apache.maven</groupId> | |||
<plugins> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<metadata> | |||
<groupId>test</groupId> | |||
<plugins> |
@@ -1,4 +1,22 @@ | |||
<?xml version="1.0" encoding="UTF-8"?><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"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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>archiva</artifactId> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<application> | |||
<services> |
@@ -1 +1,18 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<plexus/> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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> |
@@ -1,4 +1,19 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<plexus> | |||
<load-on-start> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<assembly> | |||
<id>bin</id> | |||
<formats> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
~~ Copyright 2006 The Apache Software Foundation. | |||
~~ | |||
~~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~~ you may not use this file except in compliance with the License. | |||
~~ You may obtain a copy of the License at | |||
~~ | |||
~~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~~ | |||
~~ Unless required by applicable law or agreed to in writing, software | |||
~~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~~ See the License for the specific language governing permissions and | |||
~~ limitations under the License. | |||
~~ NOTE: For help with the syntax of this file, see: | |||
~~ http://maven.apache.org/guides/mini/guide-apt-format.html | |||
ProxyManager | |||
The ProxyManager is designed to be used as a simple object or bean for use by |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,12 +1,5 @@ | |||
package org.apache.maven.archiva.reporting; | |||
import org.apache.maven.artifact.Artifact; | |||
import org.apache.maven.artifact.repository.ArtifactRepository; | |||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; | |||
import org.apache.maven.model.Model; | |||
import java.util.Map; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
@@ -23,6 +16,13 @@ import java.util.Map; | |||
* limitations under the License. | |||
*/ | |||
import org.apache.maven.artifact.Artifact; | |||
import org.apache.maven.artifact.repository.ArtifactRepository; | |||
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; | |||
import org.apache.maven.model.Model; | |||
import java.util.Map; | |||
/** | |||
* A grouping or report processors for execution as a visible report from the web interface - eg, "health", | |||
* "old artifacts", etc. |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,4 +1,5 @@ | |||
This file is here to make sure that it will not be processed during unit <!-- | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
@@ -14,4 +15,5 @@ This file is here to make sure that it will not be processed during unit <!-- | |||
~ limitations under the License. | |||
--> | |||
This file is here to make sure that it will not be processed during unit | |||
test. |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<component-set> | |||
<components> | |||
<component> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,5 +1,4 @@ | |||
<?xml version="1.0"?> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -16,7 +15,8 @@ | |||
~ limitations under the License. | |||
--> | |||
<project> | |||
<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>archiva</artifactId> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,4 +1,22 @@ | |||
<?xml version="1.0"?><project> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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>archiva</artifactId> | |||
<groupId>org.apache.maven.archiva</groupId> |
@@ -18,8 +18,8 @@ package org.apache.maven.archiva.security; | |||
import org.codehaus.plexus.rbac.profile.AbstractRoleProfile; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* @todo why does this need to be created in the client app? |
@@ -18,8 +18,8 @@ package org.apache.maven.archiva.security; | |||
import org.codehaus.plexus.rbac.profile.AbstractDynamicRoleProfile; | |||
import java.util.List; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* @plexus.component role="org.codehaus.plexus.rbac.profile.DynamicRoleProfile" |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<component-set> | |||
<components> | |||
<!-- TODO: wouldn't need to redeclare if it was composition --> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,5 +1,4 @@ | |||
<?xml version="1.0" ?> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -120,8 +119,8 @@ | |||
<version>2.1-SNAPSHOT</version> | |||
<exclusions> | |||
<exclusion> | |||
<groupId>plexus</groupId> | |||
<artifactId>plexus-utils</artifactId> | |||
<groupId>plexus</groupId> | |||
<artifactId>plexus-utils</artifactId> | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
@@ -190,12 +189,12 @@ | |||
<groupId>org.codehaus.plexus</groupId> | |||
<artifactId>plexus-utils</artifactId> | |||
<version>1.2</version> | |||
</dependency> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.codehaus.plexus</groupId> | |||
<artifactId>plexus-mail-sender-javamail</artifactId> | |||
<version>1.0-alpha-3</version> | |||
</dependency> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.derby</groupId> | |||
<artifactId>derby</artifactId> | |||
@@ -239,13 +238,20 @@ | |||
<includes> | |||
<!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin --> | |||
<include>META-INF</include> | |||
<include>WEB-INF/classes</include> <!-- Classes and Resources from other wars --> | |||
<include>WEB-INF/lib</include> <!-- Dependencies from other wars --> | |||
<include>WEB-INF/database</include> <!-- Database location configured in application.xml --> | |||
<include>WEB-INF/logs</include> <!-- Log file location specified in application.xml --> | |||
<include>pss</include> <!-- plexus-security css and javascript --> | |||
<include>WEB-INF/jsp/pss</include> <!-- plexus-security jsps --> | |||
<include>WEB-INF/template/pss</include> <!-- plexus-security xwork templates --> | |||
<include>WEB-INF/classes</include> | |||
<!-- Classes and Resources from other wars --> | |||
<include>WEB-INF/lib</include> | |||
<!-- Dependencies from other wars --> | |||
<include>WEB-INF/database</include> | |||
<!-- Database location configured in application.xml --> | |||
<include>WEB-INF/logs</include> | |||
<!-- Log file location specified in application.xml --> | |||
<include>pss</include> | |||
<!-- plexus-security css and javascript --> | |||
<include>WEB-INF/jsp/pss</include> | |||
<!-- plexus-security jsps --> | |||
<include>WEB-INF/template/pss</include> | |||
<!-- plexus-security xwork templates --> | |||
</includes> | |||
</fileset> | |||
</filesets> |
@@ -1,6 +1,21 @@ | |||
<?xml version="1.0"?> | |||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | |||
<Configure class="org.mortbay.jetty.webapp.WebAppContext"> | |||
<New id="users" class="org.mortbay.jetty.plus.naming.Resource"> |
@@ -16,20 +16,18 @@ package org.apache.maven.archiva.web.action; | |||
* limitations under the License. | |||
*/ | |||
import com.opensymphony.webwork.interceptor.ServletResponseAware; | |||
import org.apache.maven.archiva.proxy.ProxyException; | |||
import org.apache.maven.archiva.proxy.ProxyManager; | |||
import org.apache.maven.wagon.ResourceDoesNotExistException; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.FileNotFoundException; | |||
import java.io.InputStream; | |||
import com.opensymphony.webwork.interceptor.ServletResponseAware; | |||
import javax.servlet.http.HttpServletResponse; | |||
/** | |||
* Proxy functionality. | |||
* |
@@ -31,8 +31,8 @@ import org.apache.maven.archiva.indexer.RepositoryIndexSearchException; | |||
import org.apache.maven.archiva.indexer.lucene.LuceneQuery; | |||
import org.apache.maven.archiva.indexer.lucene.LuceneRepositoryArtifactIndex; | |||
import org.apache.maven.archiva.indexer.record.StandardIndexRecordFields; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import org.apache.maven.archiva.web.util.VersionMerger; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import java.io.File; | |||
import java.net.MalformedURLException; |
@@ -28,6 +28,7 @@ import org.apache.maven.archiva.indexer.RepositoryIndexException; | |||
import org.apache.maven.archiva.indexer.RepositoryIndexSearchException; | |||
import org.apache.maven.archiva.indexer.lucene.LuceneQuery; | |||
import org.apache.maven.archiva.indexer.record.StandardArtifactIndexRecord; | |||
import org.apache.maven.archiva.web.util.VersionMerger; | |||
import org.apache.maven.artifact.Artifact; | |||
import org.apache.maven.artifact.factory.ArtifactFactory; | |||
import org.apache.maven.artifact.metadata.ArtifactMetadataSource; | |||
@@ -46,7 +47,6 @@ import org.apache.maven.report.projectinfo.dependencies.ReportResolutionListener | |||
import org.codehaus.plexus.util.StringUtils; | |||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import org.apache.maven.archiva.web.util.VersionMerger; | |||
import java.io.File; | |||
import java.io.IOException; | |||
@@ -55,7 +55,6 @@ import java.util.Collection; | |||
import java.util.Collections; | |||
import java.util.HashSet; | |||
import java.util.Iterator; | |||
import java.util.LinkedHashMap; | |||
import java.util.LinkedList; | |||
import java.util.List; | |||
import java.util.Map; |
@@ -25,14 +25,14 @@ import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.InvalidConfigurationException; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileException; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileManager; | |||
import org.codehaus.plexus.security.rbac.RbacManagerException; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileException; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileManager; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import java.io.IOException; | |||
@@ -23,11 +23,11 @@ import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.InvalidConfigurationException; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import java.io.IOException; | |||
@@ -18,11 +18,7 @@ package org.apache.maven.archiva.web.action.admin; | |||
import org.apache.maven.archiva.configuration.AbstractRepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileException; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import java.io.File; | |||
import java.io.IOException; |
@@ -19,11 +19,11 @@ package org.apache.maven.archiva.web.action.admin; | |||
import org.apache.maven.archiva.scheduler.RepositoryTaskScheduler; | |||
import org.apache.maven.archiva.scheduler.TaskExecutionException; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException; | |||
import org.codehaus.plexus.security.ui.web.interceptor.SecureAction; | |||
import org.codehaus.plexus.security.rbac.Resource; | |||
import org.codehaus.plexus.xwork.action.PlexusActionSupport; | |||
/** | |||
* Configures the application. |
@@ -1,17 +1,7 @@ | |||
package org.apache.maven.archiva.web.check; | |||
import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileException; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileManager; | |||
import org.codehaus.plexus.security.system.check.EnvironmentCheck; | |||
import org.codehaus.plexus.logging.AbstractLogEnabled; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
/* | |||
* Copyright 2006 The Apache Software Foundation. | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
@@ -26,6 +16,17 @@ import java.util.List; | |||
* limitations under the License. | |||
*/ | |||
import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.codehaus.plexus.logging.AbstractLogEnabled; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileException; | |||
import org.codehaus.plexus.rbac.profile.RoleProfileManager; | |||
import org.codehaus.plexus.security.system.check.EnvironmentCheck; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
/** | |||
* RoleExistanceEnvironmentCheck: | |||
* |
@@ -16,6 +16,8 @@ package org.apache.maven.archiva.web.servlet.repository; | |||
* limitations under the License. | |||
*/ | |||
import it.could.webdav.DAVTransaction; | |||
import it.could.webdav.DAVUtilities; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ConfigurationStore; | |||
import org.apache.maven.archiva.configuration.ConfigurationStoreException; | |||
@@ -33,19 +35,15 @@ import org.codehaus.plexus.security.ui.web.filter.authentication.HttpAuthenticat | |||
import org.codehaus.plexus.util.FileUtils; | |||
import org.codehaus.plexus.util.StringUtils; | |||
import it.could.webdav.DAVTransaction; | |||
import it.could.webdav.DAVUtilities; | |||
import javax.servlet.ServletException; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import java.io.IOException; | |||
import java.util.ArrayList; | |||
import java.util.HashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
import javax.servlet.ServletException; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
/** | |||
* RepositoryAccess - access read/write to the repository. | |||
* |
@@ -16,17 +16,16 @@ package org.apache.maven.archiva.web.servlet.repository; | |||
* limitations under the License. | |||
*/ | |||
import it.could.webdav.DAVListener; | |||
import it.could.webdav.DAVProcessor; | |||
import it.could.webdav.DAVRepository; | |||
import it.could.webdav.DAVResource; | |||
import org.apache.maven.archiva.configuration.RepositoryConfiguration; | |||
import org.codehaus.plexus.logging.Logger; | |||
import java.io.File; | |||
import java.io.IOException; | |||
import it.could.webdav.DAVListener; | |||
import it.could.webdav.DAVProcessor; | |||
import it.could.webdav.DAVRepository; | |||
import it.could.webdav.DAVResource; | |||
/** | |||
* RepositoryMapping | |||
* |
@@ -16,17 +16,17 @@ package org.apache.maven.archiva.web.util; | |||
* limitations under the License. | |||
*/ | |||
import org.apache.maven.model.Dependency; | |||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion; | |||
import org.apache.maven.archiva.indexer.record.StandardArtifactIndexRecord; | |||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion; | |||
import org.apache.maven.model.Dependency; | |||
import java.util.ArrayList; | |||
import java.util.Collection; | |||
import java.util.Collections; | |||
import java.util.HashSet; | |||
import java.util.Iterator; | |||
import java.util.List; | |||
import java.util.LinkedHashMap; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.Set; | |||
@@ -1,62 +1,62 @@ | |||
package org.apache.maven.archiva.web.validator; | |||
/* | |||
* Copyright 2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import com.opensymphony.xwork.validator.validators.ValidatorSupport; | |||
import com.opensymphony.xwork.validator.ValidationException; | |||
import com.opensymphony.xwork.validator.ValidatorContext; | |||
/** | |||
* | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class IntervalValidator | |||
extends ValidatorSupport | |||
{ | |||
public void validate( Object obj ) | |||
throws ValidationException | |||
{ | |||
String snapshotsPolicy = ( String ) getFieldValue( "snapshotsPolicy", obj ); | |||
String releasesPolicy = ( String ) getFieldValue( "releasesPolicy", obj ); | |||
Integer snapshotsInterval = ( Integer ) getFieldValue( "snapshotsInterval", obj ); | |||
Integer releasesInterval = ( Integer ) getFieldValue( "releasesInterval", obj ); | |||
ValidatorContext ctxt = getValidatorContext(); | |||
if( !snapshotsPolicy.equals( "interval" ) ) | |||
{ | |||
if( snapshotsInterval.intValue() != 0 ) | |||
{ | |||
ctxt.addActionError( "Snapshots Interval must be set to zero." ); | |||
} | |||
} | |||
if( !releasesPolicy.equals( "interval" ) ) | |||
{ | |||
if( releasesInterval.intValue() != 0 ) | |||
{ | |||
ctxt.addActionError( "Releases Interval must be set to zero." ); | |||
} | |||
} | |||
if( ctxt.hasActionErrors() ) | |||
{ | |||
return; | |||
} | |||
} | |||
} | |||
package org.apache.maven.archiva.web.validator; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import com.opensymphony.xwork.validator.ValidationException; | |||
import com.opensymphony.xwork.validator.ValidatorContext; | |||
import com.opensymphony.xwork.validator.validators.ValidatorSupport; | |||
/** | |||
* | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class IntervalValidator | |||
extends ValidatorSupport | |||
{ | |||
public void validate( Object obj ) | |||
throws ValidationException | |||
{ | |||
String snapshotsPolicy = ( String ) getFieldValue( "snapshotsPolicy", obj ); | |||
String releasesPolicy = ( String ) getFieldValue( "releasesPolicy", obj ); | |||
Integer snapshotsInterval = ( Integer ) getFieldValue( "snapshotsInterval", obj ); | |||
Integer releasesInterval = ( Integer ) getFieldValue( "releasesInterval", obj ); | |||
ValidatorContext ctxt = getValidatorContext(); | |||
if( !snapshotsPolicy.equals( "interval" ) ) | |||
{ | |||
if( snapshotsInterval.intValue() != 0 ) | |||
{ | |||
ctxt.addActionError( "Snapshots Interval must be set to zero." ); | |||
} | |||
} | |||
if( !releasesPolicy.equals( "interval" ) ) | |||
{ | |||
if( releasesInterval.intValue() != 0 ) | |||
{ | |||
ctxt.addActionError( "Releases Interval must be set to zero." ); | |||
} | |||
} | |||
if( ctxt.hasActionErrors() ) | |||
{ | |||
return; | |||
} | |||
} | |||
} |
@@ -1,111 +1,111 @@ | |||
package org.apache.maven.archiva.web.validator; | |||
/* | |||
* Copyright 2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import com.opensymphony.xwork.validator.validators.ValidatorSupport; | |||
import com.opensymphony.xwork.validator.ValidationException; | |||
import com.opensymphony.xwork.validator.ValidatorContext; | |||
/** | |||
* Validator for synced repository form. The values to be validated depends on the | |||
* selected sync method to be used. | |||
* | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class SyncedRepositoryValidator | |||
extends ValidatorSupport | |||
{ | |||
public void validate( Object obj ) | |||
throws ValidationException | |||
{ | |||
String method = ( String ) getFieldValue( "method", obj ); | |||
ValidatorContext ctxt = getValidatorContext(); | |||
if( method.equals( "rsync" ) ) | |||
{ | |||
String rsyncHost = ( String ) getFieldValue( "rsyncHost", obj ); | |||
if( rsyncHost == null || rsyncHost.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync host is required." ); | |||
} | |||
String rsyncDirectory = ( String ) getFieldValue( "rsyncDirectory", obj ); | |||
if( rsyncDirectory == null || rsyncDirectory.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync directory is required." ); | |||
} | |||
String rsyncMethod = ( String ) getFieldValue( "rsyncMethod", obj ); | |||
if( rsyncMethod == null || rsyncMethod.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync method is required." ); | |||
} | |||
else | |||
{ | |||
if( !rsyncMethod.equals( "anonymous" ) && !rsyncMethod.equals( "ssh" ) ) | |||
{ | |||
ctxt.addActionError( "Invalid rsync method" ); | |||
} | |||
} | |||
String username = ( String ) getFieldValue( "username", obj ); | |||
if( username == null || username.equals("") ) | |||
{ | |||
ctxt.addActionError( "Username is required." ); | |||
} | |||
} | |||
else if ( method.equals( "svn" ) ) | |||
{ | |||
String svnUrl = ( String ) getFieldValue( "svnUrl", obj ); | |||
if( svnUrl == null || svnUrl.equals("") ) | |||
{ | |||
ctxt.addActionError( "SVN url is required." ); | |||
} | |||
String username = ( String ) getFieldValue( "username", obj ); | |||
if( username == null || username.equals("") ) | |||
{ | |||
ctxt.addActionError( "Username is required." ); | |||
} | |||
} | |||
else if ( method.equals( "cvs" ) ) | |||
{ | |||
String cvsRoot = ( String ) getFieldValue( "cvsRoot", obj ); | |||
if( cvsRoot == null || cvsRoot.equals("") ) | |||
{ | |||
ctxt.addActionError( "CVS root is required." ); | |||
} | |||
} | |||
else if ( method.equals( "file" ) ) | |||
{ | |||
String directory = ( String ) getFieldValue( "directory", obj ); | |||
if( directory == null || directory.equals("") ) | |||
{ | |||
ctxt.addActionError( "Directory is required." ); | |||
} | |||
} | |||
if( ctxt.hasActionErrors() ) | |||
{ | |||
return; | |||
} | |||
} | |||
} | |||
package org.apache.maven.archiva.web.validator; | |||
/* | |||
* Copyright 2005-2006 The Apache Software Foundation. | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import com.opensymphony.xwork.validator.ValidationException; | |||
import com.opensymphony.xwork.validator.ValidatorContext; | |||
import com.opensymphony.xwork.validator.validators.ValidatorSupport; | |||
/** | |||
* Validator for synced repository form. The values to be validated depends on the | |||
* selected sync method to be used. | |||
* | |||
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> | |||
*/ | |||
public class SyncedRepositoryValidator | |||
extends ValidatorSupport | |||
{ | |||
public void validate( Object obj ) | |||
throws ValidationException | |||
{ | |||
String method = ( String ) getFieldValue( "method", obj ); | |||
ValidatorContext ctxt = getValidatorContext(); | |||
if( method.equals( "rsync" ) ) | |||
{ | |||
String rsyncHost = ( String ) getFieldValue( "rsyncHost", obj ); | |||
if( rsyncHost == null || rsyncHost.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync host is required." ); | |||
} | |||
String rsyncDirectory = ( String ) getFieldValue( "rsyncDirectory", obj ); | |||
if( rsyncDirectory == null || rsyncDirectory.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync directory is required." ); | |||
} | |||
String rsyncMethod = ( String ) getFieldValue( "rsyncMethod", obj ); | |||
if( rsyncMethod == null || rsyncMethod.equals("") ) | |||
{ | |||
ctxt.addActionError( "Rsync method is required." ); | |||
} | |||
else | |||
{ | |||
if( !rsyncMethod.equals( "anonymous" ) && !rsyncMethod.equals( "ssh" ) ) | |||
{ | |||
ctxt.addActionError( "Invalid rsync method" ); | |||
} | |||
} | |||
String username = ( String ) getFieldValue( "username", obj ); | |||
if( username == null || username.equals("") ) | |||
{ | |||
ctxt.addActionError( "Username is required." ); | |||
} | |||
} | |||
else if ( method.equals( "svn" ) ) | |||
{ | |||
String svnUrl = ( String ) getFieldValue( "svnUrl", obj ); | |||
if( svnUrl == null || svnUrl.equals("") ) | |||
{ | |||
ctxt.addActionError( "SVN url is required." ); | |||
} | |||
String username = ( String ) getFieldValue( "username", obj ); | |||
if( username == null || username.equals("") ) | |||
{ | |||
ctxt.addActionError( "Username is required." ); | |||
} | |||
} | |||
else if ( method.equals( "cvs" ) ) | |||
{ | |||
String cvsRoot = ( String ) getFieldValue( "cvsRoot", obj ); | |||
if( cvsRoot == null || cvsRoot.equals("") ) | |||
{ | |||
ctxt.addActionError( "CVS root is required." ); | |||
} | |||
} | |||
else if ( method.equals( "file" ) ) | |||
{ | |||
String directory = ( String ) getFieldValue( "directory", obj ); | |||
if( directory == null || directory.equals("") ) | |||
{ | |||
ctxt.addActionError( "Directory is required." ); | |||
} | |||
} | |||
if( ctxt.hasActionErrors() ) | |||
{ | |||
return; | |||
} | |||
} | |||
} |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -5,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -5,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
@@ -5,7 +6,7 @@ | |||
~ 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 | |||
~ 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, |
@@ -1,18 +1,35 @@ | |||
<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="interval" class="org.apache.maven.archiva.web.validator.IntervalValidator"/> | |||
<validator name="syncedrepo" class="org.apache.maven.archiva.web.validator.SyncedRepositoryValidator"/> | |||
</validators> | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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="interval" class="org.apache.maven.archiva.web.validator.IntervalValidator"/> | |||
<validator name="syncedrepo" class="org.apache.maven.archiva.web.validator.SyncedRepositoryValidator"/> | |||
</validators> | |||
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<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"> | |||
<modelVersion>4.0.0</modelVersion> |
@@ -1,4 +1,19 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<project name="Archiva"> | |||
<bannerLeft> | |||
<src>http://www.apache.org/images/asf_logo_wide.gif</src> |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,4 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<document> | |||
<properties> | |||
<title>Archiva</title> |
@@ -1,3 +1,20 @@ | |||
<?xml version="1.0" encoding="ISO-8859-1"?> | |||
<!-- | |||
~ Copyright 2005-2006 The Apache Software Foundation. | |||
~ | |||
~ Licensed under the Apache License, Version 2.0 (the "License"); | |||
~ you may not use this file except in compliance with the License. | |||
~ You may obtain a copy of the License at | |||
~ | |||
~ http://www.apache.org/licenses/LICENSE-2.0 | |||
~ | |||
~ Unless required by applicable law or agreed to in writing, software | |||
~ distributed under the License is distributed on an "AS IS" BASIS, | |||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
~ See the License for the specific language governing permissions and | |||
~ limitations under the License. | |||
--> | |||
<document> | |||
<properties> | |||
<title>Archiva</title> |