aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-xmlrpc
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc')
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java36
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java32
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/pom.xml2
7 files changed, 12 insertions, 68 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
index 3a2f625ba..8a190a1e2 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-xmlrpc</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>archiva-xmlrpc-api</artifactId>
<name>Archiva Web :: XML-RPC API</name>
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml
index 98723d9ed..492d5b8d4 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml
@@ -19,7 +19,7 @@
<parent>
<artifactId>archiva-xmlrpc</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-xmlrpc-client</artifactId>
@@ -63,7 +63,7 @@
<mainClass>org.apache.archiva.web.xmlrpc.client.SampleClient</mainClass>
<arguments>
<!--
- URL: ex. http://127.0.0.1:8080/archiva/xmlrpc
+ URL: ex. http://127.0.0.1:9091/xmlrpc
USERNAME & PASSWORD: Archiva credentials
-->
<argument>${archiva.url}/xmlrpc</argument>
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml
index 22391115a..62d2859a0 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-xmlrpc</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>archiva-xmlrpc-security</artifactId>
<name>Archiva Web :: XML-RPC Security</name>
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
index 5a545c48c..71f5e2638 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-xmlrpc</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>archiva-xmlrpc-services</artifactId>
<name>Archiva Web :: XML-RPC Services</name>
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
index 385db320a..8493e309a 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.archiva.web.xmlrpc.api.AdministrationService;
import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
@@ -38,7 +39,6 @@ import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ArtifactDAO;
import org.apache.maven.archiva.database.constraints.ArtifactVersionsConstraint;
-import org.apache.maven.archiva.database.updater.DatabaseCleanupConsumer;
import org.apache.maven.archiva.database.updater.DatabaseConsumers;
import org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer;
import org.apache.maven.archiva.model.ArchivaArtifact;
@@ -49,7 +49,6 @@ import org.apache.maven.archiva.repository.RepositoryContentFactory;
import org.apache.maven.archiva.repository.RepositoryException;
import org.apache.maven.archiva.repository.RepositoryNotFoundException;
import org.apache.maven.archiva.repository.events.RepositoryListener;
-import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.maven.archiva.scheduled.ArchivaTaskScheduler;
import org.apache.maven.archiva.scheduled.tasks.DatabaseTask;
import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
@@ -101,50 +100,29 @@ public class AdministrationServiceImpl
*/
public Boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception
{
- List<DatabaseCleanupConsumer> cleanupConsumers = dbConsumersUtil.getAvailableCleanupConsumers();
List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers =
dbConsumersUtil.getAvailableUnprocessedConsumers();
boolean found = false;
- boolean isCleanupConsumer = false;
- for( DatabaseCleanupConsumer consumer : cleanupConsumers )
+
+ for( DatabaseUnprocessedArtifactConsumer consumer : unprocessedConsumers )
{
if( consumer.getId().equals( consumerId ) )
{
found = true;
- isCleanupConsumer = true;
break;
}
}
if( !found )
{
- for( DatabaseUnprocessedArtifactConsumer consumer : unprocessedConsumers )
- {
- if( consumer.getId().equals( consumerId ) )
- {
- found = true;
- break;
- }
- }
- }
-
- if( !found )
- {
throw new Exception( "Invalid database consumer." );
}
Configuration config = archivaConfiguration.getConfiguration();
DatabaseScanningConfiguration dbScanningConfig = config.getDatabaseScanning();
- if( isCleanupConsumer )
- {
- dbScanningConfig.addCleanupConsumer( consumerId );
- }
- else
- {
- dbScanningConfig.addUnprocessedConsumer( consumerId );
- }
+ dbScanningConfig.addUnprocessedConsumer( consumerId );
config.setDatabaseScanning( dbScanningConfig );
saveConfiguration( config );
@@ -325,14 +303,8 @@ public class AdministrationServiceImpl
{
List<String> consumers = new ArrayList<String>();
- List<DatabaseCleanupConsumer> cleanupConsumers = dbConsumersUtil.getAvailableCleanupConsumers();
List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers = dbConsumersUtil.getAvailableUnprocessedConsumers();
- for( DatabaseCleanupConsumer consumer : cleanupConsumers )
- {
- consumers.add( consumer.getId() );
- }
-
for( DatabaseUnprocessedArtifactConsumer consumer : unprocessedConsumers )
{
consumers.add( consumer.getId() );
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java
index 5089b289b..04946b4ec 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java
@@ -25,6 +25,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.apache.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
import org.apache.commons.io.FileUtils;
@@ -39,7 +40,6 @@ import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.database.ArtifactDAO;
-import org.apache.maven.archiva.database.updater.DatabaseCleanupConsumer;
import org.apache.maven.archiva.database.updater.DatabaseConsumers;
import org.apache.maven.archiva.database.updater.DatabaseUnprocessedArtifactConsumer;
import org.apache.maven.archiva.model.ArchivaArtifact;
@@ -51,7 +51,6 @@ import org.apache.maven.archiva.repository.content.ManagedLegacyRepositoryConten
import org.apache.maven.archiva.repository.content.PathParser;
import org.apache.maven.archiva.repository.events.RepositoryListener;
import org.apache.maven.archiva.repository.layout.LayoutException;
-import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
import org.apache.maven.archiva.scheduled.ArchivaTaskScheduler;
import org.apache.maven.archiva.scheduled.tasks.DatabaseTask;
import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
@@ -122,10 +121,6 @@ public class AdministrationServiceImplTest
private RepositoryListener listener;
- private DatabaseCleanupConsumer cleanupIndexConsumer;
-
- private DatabaseCleanupConsumer cleanupDbConsumer;
-
private MockControl cleanupConsumersControl;
protected void setUp()
@@ -158,10 +153,6 @@ public class AdministrationServiceImplTest
dbConsumersUtilControl = MockClassControl.createControl( DatabaseConsumers.class );
dbConsumersUtil = ( DatabaseConsumers ) dbConsumersUtilControl.getMock();
- cleanupConsumersControl = MockControl.createControl( DatabaseCleanupConsumer.class );
- cleanupIndexConsumer = (DatabaseCleanupConsumer) cleanupConsumersControl.getMock();
- cleanupDbConsumer = (DatabaseCleanupConsumer) cleanupConsumersControl.getMock();
-
unprocessedConsumersControl = MockControl.createControl( DatabaseUnprocessedArtifactConsumer.class );
processArtifactConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
processPomConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
@@ -189,19 +180,15 @@ public class AdministrationServiceImplTest
recordDbConsumers();
dbConsumersUtilControl.replay();
- cleanupConsumersControl.replay();
unprocessedConsumersControl.replay();
List<String> dbConsumers = service.getAllDatabaseConsumers();
dbConsumersUtilControl.verify();
- cleanupConsumersControl.verify();
unprocessedConsumersControl.verify();
assertNotNull( dbConsumers );
- assertEquals( 4, dbConsumers.size() );
- assertTrue( dbConsumers.contains( "cleanup-index" ) );
- assertTrue( dbConsumers.contains( "cleanup-database" ) );
+ assertEquals( 2, dbConsumers.size() );
assertTrue( dbConsumers.contains( "process-artifact" ) );
assertTrue( dbConsumers.contains( "process-pom" ) );
}
@@ -228,7 +215,6 @@ public class AdministrationServiceImplTest
archivaConfigControl.setVoidCallable();
dbConsumersUtilControl.replay();
- cleanupConsumersControl.replay();
unprocessedConsumersControl.replay();
archivaConfigControl.replay();
configControl.replay();
@@ -244,14 +230,12 @@ public class AdministrationServiceImplTest
}
dbConsumersUtilControl.verify();
- cleanupConsumersControl.verify();
unprocessedConsumersControl.verify();
archivaConfigControl.verify();
configControl.verify();
// test disable "process-pom" db consumer
dbConsumersUtilControl.reset();
- cleanupConsumersControl.reset();
unprocessedConsumersControl.reset();
archivaConfigControl.reset();
configControl.reset();
@@ -271,7 +255,6 @@ public class AdministrationServiceImplTest
archivaConfigControl.setVoidCallable();
dbConsumersUtilControl.replay();
- cleanupConsumersControl.replay();
unprocessedConsumersControl.replay();
archivaConfigControl.replay();
configControl.replay();
@@ -287,7 +270,6 @@ public class AdministrationServiceImplTest
}
dbConsumersUtilControl.verify();
- cleanupConsumersControl.verify();
unprocessedConsumersControl.verify();
archivaConfigControl.verify();
configControl.verify();
@@ -299,7 +281,6 @@ public class AdministrationServiceImplTest
recordDbConsumers();
dbConsumersUtilControl.replay();
- cleanupConsumersControl.replay();
unprocessedConsumersControl.replay();
try
@@ -313,7 +294,6 @@ public class AdministrationServiceImplTest
}
dbConsumersUtilControl.verify();
- cleanupConsumersControl.verify();
unprocessedConsumersControl.verify();
}
@@ -873,19 +853,11 @@ public class AdministrationServiceImplTest
private void recordDbConsumers()
{
- List<DatabaseCleanupConsumer> cleanupConsumers = new ArrayList<DatabaseCleanupConsumer>();
- cleanupConsumers.add( cleanupIndexConsumer );
- cleanupConsumers.add( cleanupDbConsumer );
-
List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers =
new ArrayList<DatabaseUnprocessedArtifactConsumer>();
unprocessedConsumers.add( processArtifactConsumer );
unprocessedConsumers.add( processPomConsumer );
- dbConsumersUtilControl.expectAndReturn( dbConsumersUtil.getAvailableCleanupConsumers(), cleanupConsumers );
- cleanupConsumersControl.expectAndReturn( cleanupIndexConsumer.getId(), "cleanup-index" );
- cleanupConsumersControl.expectAndReturn( cleanupDbConsumer.getId(), "cleanup-database" );
-
dbConsumersUtilControl.expectAndReturn( dbConsumersUtil.getAvailableUnprocessedConsumers(), unprocessedConsumers );
unprocessedConsumersControl.expectAndReturn( processArtifactConsumer.getId(), "process-artifact" );
unprocessedConsumersControl.expectAndReturn( processPomConsumer.getId(), "process-pom" );
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/pom.xml
index 6ada36255..923bd525c 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>archiva-xmlrpc</artifactId>
<name>Archiva Web :: XML-RPC</name>