views:

54

answers:

1

I am trying to get the run-exploded goal of the jetty-maven-plugin to work correctly. I find the documentation somewhat lacking on what I need to do to set this up.

I believe I have a standard WAR-file setup. (The reason I wrote "believe" is that I find the maven-war-plugin documentation lacking as well.) When I build my webapp using maven package, I get the following in my target folder:

classes
maven-archiver
surefire-reports
test-classes
tmp
mywebapp-version
mywebapp-version.war

where mywebapp-version is the exploded war and mywebapp-version.war is the packaged one. So far so good (I think?).

Now, running mvn jetty:run-exploded, it seems the default deploy folder is target/tmp/webapp/mywebapp-version.war/. This folder exists, but contains no files except for a webapp-cache.xml. This seems wrong to me.

I also tried to actively set the webApp configuration element to ${project.build.directory}/mywebapp-version/, but run-exploded seems to ignore it (despite the documentation stating otherwise).

What am I doing wrong? It looks as if I am missing something simple since no one else appears to be running into the same problem.

+1  A: 

Now, running mvn jetty:run-exploded, it seems the default deploy folder is target/tmp/webapp/mywebapp-version.war/. This folder exists, but contains no files except for a webapp-cache.xml. This seems wrong to me.

According to the documentation of the jetty:run-exploded mojo, the default value for the tmpDirectory is target/jetty-tmp.

I also tried to actively set the webApp configuration element to ${project.build.directory}/mywebapp-version/, but run-exploded seems to ignore it (despite the documentation stating otherwise).

The webApp defaults to ${project.build.directory}/${project.build.finalName} so I'm not sure your "active" configuration changed anything.

What am I doing wrong? It looks as if I am missing something simple since no one else appears to be running into the same problem.

Well, what is the problem actually? :) What are you expecting exactly (I'm suspecting a misunderstanding of what is supposed to happen).

By the way, I find the Maven Jetty Plugin Configuration Guide and the documentation of Jetty's mojos pretty decent.

Pascal Thivent
Thanks for your reply. Part of the confusion is that I'm using the new version of the plugin (http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin) that seems to have slightly changed behavior from previous versions.I am expecting that run-exploded should build the war and then the exploded war should be deployed on Jetty. When I get back to the code I will try to use an older version of the plugin instead and see if that works.
waxwing
@waxwing: Actually, I'm not sure the behavior of `jetty:run-exploded` has changed (I didn't spot any obvious difference between the "old" configuration guide and the "new" one). But don't hesitate to post some feedback later.
Pascal Thivent