aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli/src
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2014-07-31 15:12:13 +1000
committerBrett Porter <brett@apache.org>2014-07-31 15:12:13 +1000
commit9bf5cb099fdc7e938e728f3964ec53afc163421a (patch)
treeb1b66618119e135c5276cee3c2da5764e0f2a07b /archiva-cli/src
parentfafb8d284f3b80847c0373d1f7485565ef306b19 (diff)
downloadarchiva-9bf5cb099fdc7e938e728f3964ec53afc163421a.tar.gz
archiva-9bf5cb099fdc7e938e728f3964ec53afc163421a.zip
fix location of beans
Diffstat (limited to 'archiva-cli/src')
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
index 4bb426a62..7fc1a2c37 100644
--- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
+++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
@@ -22,8 +22,6 @@ package org.apache.archiva.cli;
import com.sampullara.cli.Args;
import com.sampullara.cli.Argument;
import org.apache.archiva.admin.model.beans.ManagedRepository;
-import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
-import org.apache.archiva.common.plexusbridge.PlexusSisuBridgeException;
import org.apache.archiva.consumers.ConsumerException;
import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
@@ -163,7 +161,7 @@ public class ArchivaCli
}
private void doScan( String path, String[] consumers )
- throws ConsumerException, MalformedURLException, PlexusSisuBridgeException
+ throws ConsumerException, MalformedURLException
{
ManagedRepository repo = new ManagedRepository();
repo.setId( "cliRepo" );
@@ -179,7 +177,7 @@ public class ArchivaCli
List<String> ignoredContent = new ArrayList<>();
ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
- RepositoryScanner scanner = lookup( RepositoryScanner.class );
+ RepositoryScanner scanner = applicationContext.getBean( RepositoryScanner.class );
try
{
@@ -194,15 +192,8 @@ public class ArchivaCli
}
}
- private <T> T lookup( Class<T> clazz )
- throws PlexusSisuBridgeException
- {
- PlexusSisuBridge plexusSisuBridge = applicationContext.getBean( PlexusSisuBridge.class );
- return plexusSisuBridge.lookup( clazz );
- }
-
private List<KnownRepositoryContentConsumer> getConsumerList( String[] consumers )
- throws ConsumerException, PlexusSisuBridgeException
+ throws ConsumerException
{
List<KnownRepositoryContentConsumer> consumerList = new ArrayList<>();
@@ -224,7 +215,6 @@ public class ArchivaCli
}
private void dumpAvailableConsumers()
- throws PlexusSisuBridgeException
{
Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();
@@ -241,7 +231,6 @@ public class ArchivaCli
@SuppressWarnings( "unchecked" )
private Map<String, KnownRepositoryContentConsumer> getConsumers()
- throws PlexusSisuBridgeException
{
Map<String, KnownRepositoryContentConsumer> beans =
applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class );
@@ -259,9 +248,9 @@ public class ArchivaCli
}
private void doConversion( String properties )
- throws IOException, RepositoryConversionException, PlexusSisuBridgeException
+ throws IOException, RepositoryConversionException
{
- LegacyRepositoryConverter legacyRepositoryConverter = lookup( LegacyRepositoryConverter.class );
+ LegacyRepositoryConverter legacyRepositoryConverter = applicationContext.getBean( LegacyRepositoryConverter.class );
Properties p = new Properties();