You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2006/10/31 21:56:38 UTC

svn commit: r469650 - in /maven/archiva/trunk: archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ archiva-indexer/src/test/repository/org/apache/maven/ archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/ archiv...

Author: brett
Date: Tue Oct 31 12:56:37 2006
New Revision: 469650

URL: http://svn.apache.org/viewvc?view=rev&rev=469650
Log:
set native property

Modified:
    maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java   (contents, props changed)
    maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml   (contents, props changed)
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java   (contents, props changed)
    maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java   (contents, props changed)
    maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml   (contents, props changed)
    maven/archiva/trunk/src/site/apt/guides/developing/index.apt   (contents, props changed)

Modified: maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java (original)
+++ maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java Tue Oct 31 12:56:37 2006
@@ -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();
+    }
+}

Propchange: maven/archiva/trunk/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/MavenProxyPropertyLoaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml (original)
+++ maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml Tue Oct 31 12:56:37 2006
@@ -1,26 +1,26 @@
-<?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>
-    <plugin>
-      <prefix>org.apache.maven</prefix>
-      <artifactId>org.apache.maven-maven-plugin</artifactId>
-    </plugin>
-  </plugins>
-</metadata>
+<?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>
+    <plugin>
+      <prefix>org.apache.maven</prefix>
+      <artifactId>org.apache.maven-maven-plugin</artifactId>
+    </plugin>
+  </plugins>
+</metadata>

Propchange: maven/archiva/trunk/archiva-indexer/src/test/repository/org/apache/maven/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java Tue Oct 31 12:56:37 2006
@@ -1,62 +1,62 @@
-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;
-        }
-    }
-}
+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;
+        }
+    }
+}

Propchange: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/IntervalValidator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java Tue Oct 31 12:56:37 2006
@@ -1,111 +1,111 @@
-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;
-        }
-    }
-
-}
+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;
+        }
+    }
+
+}

Propchange: maven/archiva/trunk/archiva-webapp/src/main/java/org/apache/maven/archiva/web/validator/SyncedRepositoryValidator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml (original)
+++ maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml Tue Oct 31 12:56:37 2006
@@ -1,35 +1,35 @@
-<?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>
-
+<?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>
+

Propchange: maven/archiva/trunk/archiva-webapp/src/main/resources/validators.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/trunk/src/site/apt/guides/developing/index.apt
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/src/site/apt/guides/developing/index.apt?view=diff&rev=469650&r1=469649&r2=469650
==============================================================================
--- maven/archiva/trunk/src/site/apt/guides/developing/index.apt (original)
+++ maven/archiva/trunk/src/site/apt/guides/developing/index.apt Tue Oct 31 12:56:37 2006
@@ -1,79 +1,79 @@
- -----
- Developing Archiva
- -----
- Henri Yandell
- -----
- 20 October 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
-
-Goal
-
-  The idea here is to explain how to develop Archiva; or at least to provide some 
-  insight into what is what within the maven/archiva/ directory.
-
-Subprojects
-
-  The following subprojects exist within Archiva:
-
-  * archiva-applet - The progress bar on the checksum checking page.
-
-  * archiva-configuration - A facade on top of the Plexus configuration XML.
-
-  * archiva-converter - converts an m1 repository to an m2 one - currently not hooked up
-
-  * archiva-core - central code, business objects, modello etc.
-
-  * archiva-discoverer - monitors the managed repositories and kicks off the indexing.
-
-  * archiva-indexer - the lucene indexing.
-
-  * archiva-plexus-application - archiva can run on plexus as well as as a war. This creates a plexus app.
-
-  * archiva-plexus-runtime - archiva can run on plexus as well as as a war. This runs lots of apps.
-
-  * archiva-proxy - proxies repositories?
-
-  * archiva-reports-standard - a couple of reports are implemented. Not very pluginable yet.
-
-  * archiva-repository-layer - a query layer for the reports
-
-  * archiva-security - webapp security
-
-  * archiva-utils - some handy archiva specific utils
-
-  * archiva-webapp - creates a war file
-
-  * design - contains a mock-up currently
-
-  * maven-meeper - rsync scripts to sync repositories. Also converts m1 repositories to m2 repositories.
-
-Concepts
-
-  There are various terms in Archiva that are worth explaining and defining. 
-
-  * "Managed" - A managed repository is a repository which Archiva is sitting on top of that may be browsed.
-
-  * "Indexed" - The ability to search a managed repository.
-
-  * "Proxied" - A remote repository which an existing managed repository can be used as a facade for.
-
-  * "Synchronized" - A remote repository which is physically copied down to be managed under Archiva. 
-
-  * "Identifier" - A short ID for your repository that will be used in URLs.
+ -----
+ Developing Archiva
+ -----
+ Henri Yandell
+ -----
+ 20 October 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
+
+Goal
+
+  The idea here is to explain how to develop Archiva; or at least to provide some 
+  insight into what is what within the maven/archiva/ directory.
+
+Subprojects
+
+  The following subprojects exist within Archiva:
+
+  * archiva-applet - The progress bar on the checksum checking page.
+
+  * archiva-configuration - A facade on top of the Plexus configuration XML.
+
+  * archiva-converter - converts an m1 repository to an m2 one - currently not hooked up
+
+  * archiva-core - central code, business objects, modello etc.
+
+  * archiva-discoverer - monitors the managed repositories and kicks off the indexing.
+
+  * archiva-indexer - the lucene indexing.
+
+  * archiva-plexus-application - archiva can run on plexus as well as as a war. This creates a plexus app.
+
+  * archiva-plexus-runtime - archiva can run on plexus as well as as a war. This runs lots of apps.
+
+  * archiva-proxy - proxies repositories?
+
+  * archiva-reports-standard - a couple of reports are implemented. Not very pluginable yet.
+
+  * archiva-repository-layer - a query layer for the reports
+
+  * archiva-security - webapp security
+
+  * archiva-utils - some handy archiva specific utils
+
+  * archiva-webapp - creates a war file
+
+  * design - contains a mock-up currently
+
+  * maven-meeper - rsync scripts to sync repositories. Also converts m1 repositories to m2 repositories.
+
+Concepts
+
+  There are various terms in Archiva that are worth explaining and defining. 
+
+  * "Managed" - A managed repository is a repository which Archiva is sitting on top of that may be browsed.
+
+  * "Indexed" - The ability to search a managed repository.
+
+  * "Proxied" - A remote repository which an existing managed repository can be used as a facade for.
+
+  * "Synchronized" - A remote repository which is physically copied down to be managed under Archiva. 
+
+  * "Identifier" - A short ID for your repository that will be used in URLs.

Propchange: maven/archiva/trunk/src/site/apt/guides/developing/index.apt
------------------------------------------------------------------------------
    svn:eol-style = native