Questions tagged [maven-war-plugin]

The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive.

The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive.

The Maven War Plugin has a default binding to the package phase for Maven projects having a war packaging.

Check the official usage page for a first look at how to use this plugin.

More Info

226 questions
8
votes
2 answers

packagingExcludes not working in maven war plugin

I've following in my pom.xml ... my.org.name webservices-webapp war Webapp ...
Akshay Hiremath
  • 950
  • 2
  • 12
  • 34
8
votes
2 answers

Maven war plugin copy arbitrary files

I apologize that this is surely basic maven/war plugin stuff, but I'm totally not a maven user. I just have to hack this one thing into a project that is maven based. What I need to do is to copy an (essentially arbitrary) directory and files into…
Toby Eggitt
  • 1,806
  • 19
  • 24
7
votes
1 answer

Eclipse and maven-war-plugin explode

I'm running against a brick with Eclipse. I will try to explain. I'm working on a project that "abused" of maven overlays and have many modules that have Javascript and LESS files inside the webapp. We managed to config maven to explode the…
Zardoz89
  • 590
  • 5
  • 17
7
votes
2 answers

Update to m2e 1.6 resulted in "Conflicting lifecycle mapping" error

After I've run an update in my Eclipse Luna SR2 (4.4.2) I got m2e 1.6.1.20150625-2338 installed. For a project where I use maven-war-plugin now I get the following errors in the problems view: Full text: Conflicting lifecycle mapping (plugin…
Danny Lo
  • 1,553
  • 4
  • 26
  • 48
7
votes
1 answer

Is it possible to merge 2 web.xml with Maven overlay

I have a web application 'A' defined in a war project. I created an other web application 'B' that import the whole content of 'A' with an overlay. The file web.xml of application 'B' is the same of application 'A', except for additionnal…
aurya
  • 367
  • 2
  • 16
7
votes
1 answer

Spring Boot & Maven war overlay

I'm working with a Maven multi module with a war depending on an other war. The Spring Boot webapp depends on a basic webapp that only serves html files. When I run the Spring Boot app, I'm able to access services and html from the main webapp (the…
Cedric Thiebault
  • 1,015
  • 1
  • 15
  • 28
7
votes
4 answers

Files got overwritten in maven project when building a war

I'm building a web application project using maven, and packaging is set to "war". I also use YUI compressor plugin to compress javascript codes in the webapp directory. I've set up the YUI compressor like this:
David Zhao
  • 4,284
  • 11
  • 46
  • 60
6
votes
1 answer

How can I avoid build failing when Maven war plugin can't find webResource directory?

I am working with a module that produces a WAR artifact through Maven. The module has a typical src/main/webapp directory. I'm using Maven's war plugin to supplement the webapp directory with another resource directory that can be programmatically…
Matt
  • 23,363
  • 39
  • 111
  • 152
6
votes
3 answers

Building .war file using maven. Missing files and directories

I try to build .war file by using maven plugin: maven-war-plugin 2.6 WebContent
Mariusz.v7
  • 2,322
  • 2
  • 16
  • 24
6
votes
3 answers

Workaround(s) for maven-war-plugin error: Failed to copy file for artifact

If I have simple maven webapp project in Eclipse that depends on another maven project in my workspace, I get the error... Failed to copy file for artifact [group:artifact:jar:version:compile]…
Sean Dawson
  • 232
  • 3
  • 13
6
votes
1 answer

Conditional configuration in maven pom.xml

I'd like to ONLY exclude certain files using the maven-war-plugin when the property "skipCompress" is set to true. I thought the following specification might work, but it doesn't. BTW, I can't use a profile to achieve this. I want to use…
David Zhao
  • 4,284
  • 11
  • 46
  • 60
5
votes
2 answers

Eclipse with maven workspace dependency - packaged war contain folder instead of jar

I'm using Eclipse Kepler SR2 with m2e. I have a web project that depends on a jar. When I use "Run as -> Maven Build..." with goal package and "Check Workspace artifacts" is checked, then the lib folder in the target contains a folder with the name…
Lior Chaga
  • 1,424
  • 2
  • 21
  • 35
5
votes
2 answers

Why would a maven-war-plugin generate a JAR instead of a WAR?

I am following this Contract first using CXF tutorial and while the resulting pom.xml generates sources and even completes build successfully, it fails to create a WAR file. Instead, it creates a JAR file. My understanding is that the part in the…
Eternal Learner
  • 2,602
  • 5
  • 27
  • 38
4
votes
0 answers

Difference between ${scmBranch} and $\{scmBranch} for maven-jar-plugin/ maven-war-plugin

I do use the maven-jar-plugin in my pom.xml. maven-jar-plugin ${buildNumber}
Splioo
  • 370
  • 3
  • 11
4
votes
2 answers

json-simple.jar is missing from spring boot war

The json-simple jar is missing in packaged WAR because it is marked as optional in spring-boot-starter-parent, BUT I do include a dependency gelfj that declares json-simple as dependency..... example below (used with Maven 3.3.3):
Robocide
  • 6,353
  • 4
  • 37
  • 41
1
2
3
15 16