You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Manuel Garber <mg...@broad.mit.edu> on 2004/11/16 23:50:39 UTC
Issues using AdminClientTask in a Maven plugin
Hi,
I am new to both axis and Maven, so if there is an easier route to do
what follows, advice is very welcomed.
I ran into some issues while adding a "deploy" goal to the sourceforge
axis maven plugin from sourceforge
(http://maven-plugins.sourceforge.net/)
The main issue is that maven passes unspecified properties as empty
strings (rather than null strings) to the ant task, this causes lots or
trouble:
1) The addArgs method in AdminClientTask checks only for null
strings not empty strings before adding the argument (so all unspecified
properties are added!).
2) When an empty string is added, the
org.apache.axis.utils.Options.isValueSet method fails, as it assumes the
character array is larger than it is.
At the end of the message I provide a sample stack trace of the problem
I am not sure how to get around this, I cannot supply default values
for all properties, some conflict with others.
A minor issue, due probably to poor configuration on my part, prevents
BuildExceptions from being displayed by Maven, every time there an
exception is thrown by the task, Maven reports (I am using catch to get
the exception)
[echo] org.apache.commons.jelly.JellyTagException:
e:\.maven\cache\maven-axi
s-plugin-0.5\plugin.jelly:207:40: <axis-admin> Exception in axis-admin
But neither the exception stack trace nor message are shown.
To get around both issues I made these simple modifications to the
class (see AdminClientTask.patch)
If people are curious, attached is the plugin.jelly file (which is a
modified version of the one in the maven-plugins project mentioned above).
Again, if there are simple ways of doing this, I'd appreciate your help.
Manuel
Sample Stack Trace
[axis-admin] java.lang.String.charAt(String.java:444)
[axis-admin] org.apache.axis.utils.Options.isValueSet(Options.java:161)
[axis-admin] org.apache.axis.utils.Options.getURL(Options.java:236)
[axis-admin] org.apache.axis.utils.Options.<init>(Options.java:65)
[axis-admin]
org.apache.axis.client.AdminClient.process(AdminClient.java:280)
[axis-admin]
org.apache.axis.tools.ant.axis.AdminClientTask.execute(AdminClientTask.java:277)
[axis-admin] org.apache.tools.ant.Task.perform(Task.java:341)
[axis-admin]
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
[axis-admin]
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
[axis-admin]
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
[axis-admin]
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
[axis-admin]
org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:145)
[axis-admin]
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
[axis-admin]
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
[axis-admin]
org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
[axis-admin]
org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
[axis-admin]
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
[axis-admin]
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
[axis-admin]
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
[axis-admin]
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
[axis-admin] com.werken.werkz.Goal.fire(Goal.java:639)
[axis-admin] com.werken.werkz.Goal.attain(Goal.java:575)
[axis-admin]
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
[axis-admin]
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:634)
[axis-admin]
org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
[axis-admin] org.apache.maven.cli.App.doMain(App.java:486)
[axis-admin] org.apache.maven.cli.App.main(App.java:1215)
[axis-admin] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[axis-admin]
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[axis-admin]
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[axis-admin] java.lang.reflect.Method.invoke(Method.java:324)
[axis-admin] com.werken.forehead.Forehead.run(Forehead.java:551)
[axis-admin] com.werken.forehead.Forehead.main(Forehead.java:581)