You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2016/05/07 13:24:50 UTC
[25/36] maven-aether git commit: Made ManualRepositorySystemFactory
dump stack traces of service creation failures to help troubleshooting
Made ManualRepositorySystemFactory dump stack traces of service creation failures to help troubleshooting
Project: http://git-wip-us.apache.org/repos/asf/maven-aether/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-aether/commit/8ae40364
Tree: http://git-wip-us.apache.org/repos/asf/maven-aether/tree/8ae40364
Diff: http://git-wip-us.apache.org/repos/asf/maven-aether/diff/8ae40364
Branch: refs/heads/demo
Commit: 8ae4036407264c0cafa986df3065b72624009f84
Parents: e426060
Author: Benjamin Bentmann <be...@sonatype.com>
Authored: Sat Sep 14 14:58:05 2013 +0200
Committer: Benjamin Bentmann <be...@sonatype.com>
Committed: Sat Sep 14 14:58:05 2013 +0200
----------------------------------------------------------------------
.../examples/manual/ManualRepositorySystemFactory.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-aether/blob/8ae40364/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/manual/ManualRepositorySystemFactory.java
----------------------------------------------------------------------
diff --git a/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/manual/ManualRepositorySystemFactory.java b/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/manual/ManualRepositorySystemFactory.java
index 8b605d7..643ee3c 100644
--- a/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/manual/ManualRepositorySystemFactory.java
+++ b/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/manual/ManualRepositorySystemFactory.java
@@ -38,6 +38,15 @@ public class ManualRepositorySystemFactory
locator.addService( TransporterFactory.class, FileTransporterFactory.class );
locator.addService( TransporterFactory.class, HttpTransporterFactory.class );
+ locator.setErrorHandler( new DefaultServiceLocator.ErrorHandler()
+ {
+ @Override
+ public void serviceCreationFailed( Class<?> type, Class<?> impl, Throwable exception )
+ {
+ exception.printStackTrace();
+ }
+ } );
+
return locator.getService( RepositorySystem.class );
}