exploded in maven but prevent from assembling war again?
We are using the maven jetty plug-in to run exploded wars.
We have a script that copies certain configuration files to the directory which is used by maven to assemble the war (basically spring configuration + web.xml
for stand-alone test environment).
The problem is that it seems the webapp is being built again before jetty:run-exploded is called which replaces our custom config files we copied in. Strangely enough this is only affecting people on Windows and not the Ubuntu users.
Anyone know of a way to run the jetty:run-exploded
task but prevent Maven from building anything before doing it?
Have you tried using executions? http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
I am not sure if they would work, but if it's possible, I think that is how it would be configured.
The run:exploded goal documentation says that it will run package which is what you are seeing.
"We have a script that copies certain configuration files..."
You might want to find out what maven "profile"s are instead. This is the real problem here.
I am using the deploy-war
goal instead of exploded
, as per http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#deploy-war-running-pre-assembled-war:
This is basically the same as jetty:run-war, but without assembling the WAR of the current module - you can nominate the location of any war to run. Unlike run-war, the phase in which this plugin executes is not bound to the "package" phase - you may bind it to any phase to use it.
链接地址: http://www.djcxy.com/p/29606.html上一篇: 用maven部署汇编包
下一篇: 在maven中爆炸但防止再次组装战争?