Hi together
After my project is compiled and packaged I want to deploy it to our
server. For this I have to get an id from a static helper method in the
code of the project and insert it to a textfile. This did not work (see
excerpt from maven.xml and exception at the bottom).
I think the reason is that the classpath of the invokeStatic is wrong. Has
someone an idea how I can set the classpath, or how else I could call a
static method and use the returnvalue in Maven?
Thanks a lot
Martin
I tried to do this in my maven.xml
<goal name="vega:getSession">
<j:invokeStatic var="id" method="getID"
className="ch.netcetera.golo.IDgen"/>
<echo message="ID = ${id}"/>
</goal>
The result was:
Could not load class: ch.netcetera.golo.IDgen. Reason:
java.lang.ClassNotFoundException: ch.netcetera.golo.IDgen
at com.werken.werkz.Goal.fire(Goal.java:646)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:531)
at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:265)
at org.apache.maven.cli.App.doMain(App.java:466)
at org.apache.maven.cli.App.main(App.java:1117)
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:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]