diff --git a/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs b/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs index 3c3a2b7..c1592e9 100644 --- a/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs +++ b/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs @@ -54,10 +54,29 @@ public class MavenReferenceItemResolve : Task } }; + static MSBuildLogTraceListener listener; + static MavenReferenceItemResolve() { IKVM.Runtime.Tracer.SetTraceLevel("jni", System.Diagnostics.TraceLevel.Verbose); - Trace.Listeners.Add(new ConsoleTraceListener()); + Trace.Listeners.Add(listener = new MSBuildLogTraceListener()); + } + + class MSBuildLogTraceListener : TraceListener + { + + public Task task; + + public override void Write(string message) + { + task.Log.LogMessage(message); + } + + public override void WriteLine(string message) + { + task.Log.LogMessage(message); + } + } /// @@ -66,7 +85,7 @@ static MavenReferenceItemResolve() public MavenReferenceItemResolve() : base(SR.ResourceManager, "MAVEN:") { - + listener.task = this; } ///