Skip to content

Instantly share code, notes, and snippets.

@athiththan11
Created December 15, 2018 17:15
Show Gist options
  • Save athiththan11/e8d1174a7fbbe0acb40215aafe60c93d to your computer and use it in GitHub Desktop.
Save athiththan11/e8d1174a7fbbe0acb40215aafe60c93d to your computer and use it in GitHub Desktop.
POM element to package and deploy to a specific folder
<project>
<!-- copy this section to your existing pom.xml -->
<!-- section: deploys the built artifact to the defined path -->
<build>
<!-- replace the name -->
<finalName>{{ jar/war name }}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy</id>
<phase>build</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- replace the path | absolute path to the deployment directory -->
<outputDirectory> {{ path }}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
</plugins>
</build>
<!-- end -->
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment