Maven: antrun-plugin vs war-plugin

I have a doubt about these 2 plugins, specifically with <outputDirectory/> (maven-war-plugin) and <copy file="origin" todir="destination"/> (maven-antrun-plugin)

I want to generate the war for the project and then copy that file to a hot deploy directory. Strictly in this sequence, So the question is:

  • outputDirectory, indicates where the generation happens? or the war is generated in project.build.directory and then copied to the indicated directory.

Basically I want to determine which of the 2, suits best my requirements.

Answers


I would suggest using the 'deploy' phase to invoke this copying.

As to what actually does the copying, there are plugins that cater to this use case, such as the cargo maven plugin which can deploy artifacts to running containers. This abstracts out the physical directory structure.

The war plugin is more intended to create the war in the first place, and you might not guarantee what state it is in when it is picked up by a container.


Need Your Help

Add Leading Zeros to Strings in Pandas Dataframe

python string pandas

I have a pandas data frame where the first 3 columns are strings:

How can I reset deployment credentials in Windows Azure?

git azure deployment

I'm attempting to deploy to Windows Azure via git.