Confusion about maven-war-plugin and jetty-maven-plugin
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 do开发者_运维问答cumentation 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.
Now, running
mvn jetty:run-exploded
, it seems the default deploy folder istarget/tmp/webapp/mywebapp-version.war/
. This folder exists, but contains no files except for awebapp-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.
精彩评论