If is use something like:
<path id="mypath1" location="${basedir}/one"/>
<path id="mypath2" location="${basedir}/two"/>
<maven:addPath id="mypath1" refid="mypath2"/>
in a preGoal, it works fine. But if I use jelly:define:tag to define a custom tag called let's say 'my:tag", which contains the same lines as above, and in the preGoal at the same location invoke <my:tag>, I get a ClassCastException at
at org.apache.maven.jelly.tags.BaseTagSupport.getMavenContext(BaseTagSupport.java:72)
at org.apache.maven.jelly.tags.maven.AddPathTag.doTag(AddPathTag.java:92)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:278)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:133)
at org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:112)
...
from which all I can conclude is that the context being found is a base JellyContext, not a MavenJellyContext.

Can anybody explain what is going on? I have tried defining the tag itself as a child of <project> in maven.xml, and also to test, as a child of <preGoal>, with no difference in behaviour. I was trying to do this to investigate using custom tags as subroutine/macro mechanisms.

Regards,

Colin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to