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;
}
private void doScan( String path, String[] consumers )
- throws ConsumerException, MalformedURLException, PlexusSisuBridgeException
+ throws ConsumerException, MalformedURLException
{
ManagedRepository repo = new ManagedRepository();
repo.setId( "cliRepo" );
List<String> ignoredContent = new ArrayList<>();
ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
- RepositoryScanner scanner = lookup( RepositoryScanner.class );
+ RepositoryScanner scanner = applicationContext.getBean( RepositoryScanner.class );
try
{
}
}
- 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<>();
}
private void dumpAvailableConsumers()
- throws PlexusSisuBridgeException
{
Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();
@SuppressWarnings( "unchecked" )
private Map<String, KnownRepositoryContentConsumer> getConsumers()
- throws PlexusSisuBridgeException
{
Map<String, KnownRepositoryContentConsumer> beans =
applicationContext.getBeansOfType( KnownRepositoryContentConsumer.class );
}
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();