diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/DigesterUtils.java b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/DigesterUtils.java
index a8a72d417..dcb22ef71 100644
--- a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/DigesterUtils.java
+++ b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/DigesterUtils.java
@@ -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 );
}
diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/MavenIndexerUtils.java b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/MavenIndexerUtils.java
index 4992dcf02..2deae9d1f 100644
--- a/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/MavenIndexerUtils.java
+++ b/archiva-modules/archiva-base/archiva-plexus-bridge/src/main/java/org/apache/archiva/common/plexusbridge/MavenIndexerUtils.java
@@ -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 );
}
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml
index 664d39de0..cbba76e6c 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml
@@ -33,6 +33,13 @@
+
+
+
+
+
+
+