Question

Currently I am using ANT with two different targets:

1 compile source code, create a exploded WAR file and deploy it to the appplication srv (wildfly8)

2 just copy static files (HTML/JS) into the war file on the application srv

This makes it very comfortable to develop in the frontend since the second target is very fast.

Now I want to migrate the project on maven and I dont really know how to define such targets/goals to achieve the same resuts. So what I want to do in maven is to have to different goals: one which compiles my Java sources and deploys a new WAR file and one which just copies the static content to the exploded WAR file on the application server.

Was it helpful?

Solution

You may achieve same functionality as you did with ANT

1) By default install goal will build war file. If it's not working you may use https://maven.apache.org/plugins/maven-war-plugin/ and it's goal is war:war.

2) To achieve second target You may use Maven Resource Plugin and it's goal resources:resources. You may refer http://maven.apache.org/plugins/maven-resources-plugin/ and for example http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top