You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Richard Bounds <ri...@riskgovernance.com> on 2002/12/10 15:18:05 UTC

Cactus Plugin - patch

I've been playing with the Cactus plugin and have had to make a couple of
changes to get things working - ensuring that the old web.xml is removed
before the new one is generated (the dvsl task didn't seem to want to
overwrite it for some reason), and changing the "pathElement" tags to
"pathelement" to fix the classpath. I've attached a patch for both.

As an aside, I've been unable to get the plugin to start Tomcat if it's not
already running - it uses:

<j:thread>
          <attainGoal name="cactus:start-tomcat-4x"/>
</j:thread>

 to spawn off the process which at the moment seems to require either a file
or xmlOutput attribute on the thread tag. If I add a file attribute, it
blows up at the "attainGoal" tag with a NullPointerException (although
running the start-tomcat-4x goal directly from the command line is fine):


cactus:test-tomcat-4x:
    [echo] maven.cactus.tomcat4x.home = D:/jakarta-tomcat-4.0.4
cactus:tomcat-4x-run:
    [waitfor] [ERROR] org.apache.commons.jelly.JellyException:
java.lang.NullPoi
nterException File:
file:/D:/maven-1.0-beta-7/plugins/maven-cactus-plugin-1.2/sc
ripts/tomcat.4x.jelly At tag <attainGoal>: line: 56 column: 54
    [waitfor] [ERROR]   at
org.apache.commons.jelly.impl.TagScript.handleExcepti
on(TagScript.java:443)
    [waitfor] [ERROR]   at
org.apache.commons.jelly.impl.BeanTagScript.run(BeanT
agScript.java:186)
    [waitfor] [ERROR]   at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptB
lock.java:134)
    [waitfor] [ERROR]   at
org.apache.commons.jelly.TagSupport.invokeBody(TagSup
port.java:190)
    [waitfor] [ERROR]   at
org.apache.commons.jelly.tags.core.ThreadTag$1.run(Th
readTag.java:94)
    [waitfor] [ERROR]   at java.lang.Thread.run(Thread.java:484)

 Has anyone got any suggestions that I could try?

Richard

Re: Cactus Plugin - patch

Posted by Kurt Schrader <ks...@karmalab.org>.
The Cactus plug-in was broken for awhile because of issues with Maven
introduced during refactoring.  The bugs should be fixed now and you
should find that the plug-in works fine if used from the current Maven
CVS.

-Kurt

On Tue, 10 Dec 2002, Richard Bounds wrote:

> I've been playing with the Cactus plugin and have had to make a couple of
> changes to get things working - ensuring that the old web.xml is removed
> before the new one is generated (the dvsl task didn't seem to want to
> overwrite it for some reason), and changing the "pathElement" tags to
> "pathelement" to fix the classpath. I've attached a patch for both.
>
> As an aside, I've been unable to get the plugin to start Tomcat if it's not
> already running - it uses:
>
> <j:thread>
>           <attainGoal name="cactus:start-tomcat-4x"/>
> </j:thread>
>
>  to spawn off the process which at the moment seems to require either a file
> or xmlOutput attribute on the thread tag. If I add a file attribute, it
> blows up at the "attainGoal" tag with a NullPointerException (although
> running the start-tomcat-4x goal directly from the command line is fine):
>
>
> cactus:test-tomcat-4x:
>     [echo] maven.cactus.tomcat4x.home = D:/jakarta-tomcat-4.0.4
> cactus:tomcat-4x-run:
>     [waitfor] [ERROR] org.apache.commons.jelly.JellyException:
> java.lang.NullPoi
> nterException File:
> file:/D:/maven-1.0-beta-7/plugins/maven-cactus-plugin-1.2/sc
> ripts/tomcat.4x.jelly At tag <attainGoal>: line: 56 column: 54
>     [waitfor] [ERROR]   at
> org.apache.commons.jelly.impl.TagScript.handleExcepti
> on(TagScript.java:443)
>     [waitfor] [ERROR]   at
> org.apache.commons.jelly.impl.BeanTagScript.run(BeanT
> agScript.java:186)
>     [waitfor] [ERROR]   at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptB
> lock.java:134)
>     [waitfor] [ERROR]   at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSup
> port.java:190)
>     [waitfor] [ERROR]   at
> org.apache.commons.jelly.tags.core.ThreadTag$1.run(Th
> readTag.java:94)
>     [waitfor] [ERROR]   at java.lang.Thread.run(Thread.java:484)
>
>  Has anyone got any suggestions that I could try?
>
> Richard
>