fix typo and use lookup rather than empty constructor for components coming from maven-indexer

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1158274 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-08-16 13:51:48 +00:00
parent b39ba2f6c5
commit eceef01319
3 changed files with 25 additions and 6 deletions

View File

@ -52,12 +52,17 @@ public class DigesterUtils
{
// olamy when the TCL is not a URLClassLoader lookupList fail !
// when using tomcat maven plugin so adding a simple hack
log.warn( "using lookList from sisu plexus failed so build plexus Digesters manually" );
log.warn( "using lookupList from sisu plexus failed so build plexus Digesters manually" );
allDigesters = Arrays.asList( new Sha1Digester(), new Md5Digester() );
}
if ( allDigesters == null || allDigesters.isEmpty() )
{
throw new PlexusSisuBridgeException( "no way to initiliaze IndexCreator" );
}
log.debug( "allIndexCreators {}", allDigesters );
}

View File

@ -38,7 +38,7 @@ import java.util.List;
* @author Olivier Lamy
* @since 1.4
*/
@Service("mavenIndexerUtils")
@Service( "mavenIndexerUtils" )
public class MavenIndexerUtils
{
@ -56,15 +56,22 @@ public class MavenIndexerUtils
{
// olamy when the TCL is not a URLClassLoader lookupList fail !
// when using tomcat maven plugin so adding a simple hack
log.warn( "using lookList from sisu plexus failed so build indexCreator manually" );
log.warn( "using lookupList from sisu plexus failed so build indexCreator manually" );
allIndexCreators =
Arrays.asList( new OSGIArtifactIndexCreator(), new MavenArchetypeArtifactInfoIndexCreator(),
new MinimalArtifactInfoIndexCreator(), new JarFileContentsIndexCreator(),
new MavenPluginArtifactInfoIndexCreator() );
Arrays.asList( plexusSisuBridge.lookup( IndexCreator.class, OSGIArtifactIndexCreator.ID ),
plexusSisuBridge.lookup( IndexCreator.class, MavenArchetypeArtifactInfoIndexCreator.ID ),
plexusSisuBridge.lookup( IndexCreator.class, MinimalArtifactInfoIndexCreator.ID ),
plexusSisuBridge.lookup( IndexCreator.class, JarFileContentsIndexCreator.ID ),
plexusSisuBridge.lookup( IndexCreator.class, MavenPluginArtifactInfoIndexCreator.ID ) );
}
if ( allIndexCreators == null || allIndexCreators.isEmpty() )
{
throw new PlexusSisuBridgeException( "no way to initiliaze IndexCreator" );
}
log.debug( "allIndexCreators {}", allIndexCreators );
}

View File

@ -33,6 +33,13 @@
<logger name="org.apache.archiva.indexer.search.NexusRepositorySearch">
<level value="debug"/>
</logger>
<logger name="org.apache.archiva.common.plexusbridge.MavenIndexerUtils">
<level value="debug"/>
</logger>
<logger name="JPOX">
<level value="error"/>
</logger>
<logger name="org.apache.commons.configuration.DefaultConfigurationBuilder">
<level value="error"/>
</logger>