How to start a berth: start to explode in maven, but prevent build again?

We use the maven plugin to power up to launch exploding wars.

We have a script that copies certain configuration files to the directory that maven uses to build the war (mainly spring configuration + web.xmlfor a standalone test environment).

The problem is that it seems that the webapp is being created again before jetty launches run-exploded, which replaces our custom configuration files into which we copied. Oddly enough, this affects people only on Windows, not Ubuntu users.

Does anyone know a way to start a task jetty:run-exploded, but does not allow Maven to create anything before this?

+3
source share
3 answers

Have you tried using executions? http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

I'm not sure that they will work, but if it is possible, I think that it will be configured that way.

0
source

Launch: documentation with solid objects suggests that it will run the package you see.

"We have a script that copies certain configuration files ..."

You might want to know what maven "profile" is. This is a real problem.

0
source

I use the target deploy-warinstead exploded, according to http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#deploy-war-running-pre-assembled-war :

This is basically the same as the jetty: run-war, but without assembling the WAR of the current module - you can assign the location of any war to run. Unlike run-war, the phase in which this plugin is executed is not tied to the "package" phase - you can bind it to any phase to use it.

0
source

Source: https://habr.com/ru/post/1702966/


All Articles