You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kallin Nagelberg <ka...@gmail.com> on 2008/03/01 23:58:44 UTC

details missing in stack trace

I'm using the maven ant task in groovy to try and create a dependency
fileset.

Something like:

mvn.dependencies(filesetId: 'myfileset') {
     myArtifacts.each {
          dependency(groupId: it.groupId, artifactId: it.artifactId,
version: it.version)
     }
}

It works when all the artifacts are valid, but dies with a pretty unhelpful
stacktrace when it doesn't. I see something like :

[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] java.lang.ClassCastException:
org.apache.maven.usability.MojoFailureExceptionDiagnoser
[INFO]
------------------------------------------------------------------------
[INFO] Trace
: java.lang.ClassCastException:
org.apache.maven.usability.MojoFailureExceptionDiagnoser
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(
DispatchUtils.java:115)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:178)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:153)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(
InvokerHelper.java:777)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(
InvokerHelper.java:753)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(
ScriptBytecodeAdapter.java:167)
    at com.novator.mojo.ArtifactResourcesProcessor.unpackArtifacts(
ArtifactResourcesProcessor.groovy:84)
    at com.novator.mojo.ArtifactResourcesProcessor.this$2$unpackArtifacts(
ArtifactResourcesProcessor.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java
:95)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(
MetaClassHelper.java:599)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
    at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(
ScriptBytecodeAdapter.java:77

but there is no indication of what exactly is wrong. Does anyone know of a
way to get more useful information from these tasks when an error occurs?