All Questions
Tagged with maven-war-plugin war
31 questions
0
votes
1
answer
501
views
Exclude JARs from final WAR doesn't work with spring-boot-maven-plugin
I have a Spring Boot application that is packaged as WAR file and I run it on embedded Apache Tomcat. Using this dependency
<dependency>
<groupId>org.springframework.boot</groupId&...
0
votes
1
answer
743
views
How to include specific files in war using maven
I'm having some trouble trying to figure out a good way to control which resources to include in a war using maven. In my src/main/resources directory I have two files, logback.xml and logback-test....
3
votes
0
answers
556
views
How to exclude a specific class from Jar file but include in war file using maven-war-plugin?
I have a sprint-boot project "A" which has a main class which extends SpringBootServletInitializer so that war can be deployed for the same.
This library/module is also a dependent library ...
0
votes
0
answers
57
views
Excluding folder from resources in Maven War Plugin
I've the following structure in my src/main/resources:
resources
|-config
|-log4j
|-app
When building a war, Maven should exclude the app-Folder. I both tried ...
7
votes
1
answer
1k
views
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.
...
3
votes
2
answers
2k
views
maven war plugin does not forget about old files and dependencies and creates a war that contains removed files and dependencies
Hello I'm having a weird problem about war creation.
I use maven-war-plugin (tried with 3.1.0, 3.2.0, and 2.6). When I run war:war (or mvn clean package, or similars) the war is created but I noticed ...
0
votes
1
answer
432
views
Set JAR name packaged inside a WAR
I created a WAR project and a JAR project, setted like dependency of the WAR the JAR project, I used the tag <finalName> in the JAR project pom file to set the file's name when the WAR is ...
0
votes
1
answer
504
views
Maven WAR plugin - change front-end resources location
After minification I have content of webapp like this:
WEB-INF
assets
favicon
i18n
scripts
dist
index.html
//other things
Where inside dist I have compressed styles, scripts etc... But Maven WAR ...
1
vote
1
answer
670
views
Maven war plugin archiveClasses but exclude a package
My maven project contains two src packages and several dependencies.
I packaged it as a war and included al dependencies like libs in WEB-INF/libs.
Now I need to include inside a jar all compiled ...
3
votes
0
answers
1k
views
How do I build an exploded WAR in a multi-module Maven project and also include sibling JAR files in its WEB-INF/lib directory?
I’m using Maven 3.3.3 with the Maven WAR 2.6 plugin. I have a multi module project with both JAR and WAR projects within it. My WAR projects depend on my JAR projects, however, I do not want to ...
9
votes
2
answers
10k
views
packagingExcludes not working in maven war plugin
I've following in my pom.xml
...
<groupId>my.org.name</groupId>
<artifactId>webservices-webapp</artifactId>
<packaging>war</packaging>
<name>...
0
votes
1
answer
1k
views
Why Tomcat base url is not my app url while targeting my app?
I've made a lot of search about my issue, but let's face it, I've found no workaround.
I'm deploying a war file on a Tomcat7 application server. Everything is ok. But when I target my application, ...
0
votes
1
answer
711
views
maven-war-plugin overlay removes /META-INF/context.xml
There are 3 maven projects:
my-overlay (its a blueprint-war for an overlay only containing the context.xml)
my-base (its a pom to use in the scope of real war)
my-webapp (the final project to use in ...
1
vote
1
answer
47
views
Advanced resources exclusion rules from a WAR usng Maven
My server side technology is defining pages using two files located in the same directory, with the same name but different extensions: one with the .html extension, the other with .xsp. Out of these ...
4
votes
2
answers
2k
views
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 ...
0
votes
1
answer
2k
views
Add additional dependency in maven-war-plugin
In our web project there are a couple of executions of maven-war-plugin that generates war files for each environment. I need to add a new dependency to one of them. So far we have been doing this ...
2
votes
1
answer
3k
views
maven war plugin put my resources in war root directory
I don't understand why when I put the webResources entry in the maven-war-plugin, the resources are placed in the war root directory. I think it should put only in WEB-INF/classes.
This is my maven-...
1
vote
1
answer
1k
views
Build WAR only once during mvn clean package
I have a maven project that should build war file. When I run mvn clean package I see in log that at first it makes default-war:
--- maven-war-plugin:2.3:war (default-war) @ my-artifact---
...
7
votes
3
answers
7k
views
Building .war file using maven. Missing files and directories
I try to build .war file by using maven plugin:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<...
0
votes
2
answers
1k
views
How do I speed up packaging of my WAR project in Maven 3.3.3?
I’m using Maven 3.3.3. I have a WAR project with a large number of static assets. Frequently when building my WAR project (using “mvn clean install”), the project will take upwards of 15 minutes to ...
0
votes
1
answer
1k
views
maven-war-plugin ignores <archiveClasses>
The <archiveClasses> option has no effect.
Running mvn clean compile war:exploded produces a war directory with .class files in the classes directory, and they are not archived into a jar in ...
0
votes
1
answer
1k
views
exclude folders in maven generated war
I've a Java web project, in which I'm using a lot of scss files. All these files are inside /WebContent/scss and compiled to WebContent/css.
I am creating the war using maven-war plugin, and I'd like ...
-1
votes
1
answer
363
views
Maven: creating a war with a ROOT dir
I have always (for the purposes of vhost configuration in apache and tomcat) deployed my web app into tomcat as follows by extracting a tar.gz file which is built by ant;
tomcat/webapps/myApp/ROOT/&...
1
vote
1
answer
6k
views
Maven - maven-war-plugin to generate jar and install it to maven local repository
I am using maven-war-plugin in my pom.xml to generate a jar file in parallel with my war file in an java web project build. My maven build is creating war and jar files in the target directory. And ...
10
votes
3
answers
32k
views
Why is maven-war-plugin failing for web.xml missing if I configured it not to fail on missing web.xml?
Here's a challenge: why is this build failing?
I have configured Maven's maven-war-plugin not to fail on an abscent web.xml file, it seems:
<plugin>
<groupId>org.apache.maven....
4
votes
1
answer
9k
views
maven-war-plugin : exclude many dependencies from lib folder
I'm using maven-war-plugin to generate a WAR file.
In the dependency hierarchy, I can see many transitive dependencies, which are extract in the lib folder.
After many research, I saw that the ...
1
vote
1
answer
3k
views
How to package an assembly in Maven by moving resources out of the war?
Our project is set up to package a WAR and this works great for local development:
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
&...
2
votes
0
answers
560
views
Configuring jetty:run to use the "final" lib folder
I have a Maven project using a war overlay. As outlined in this answer, one problem with WAR overlays is that they seem to effectively sidestep Maven's dependency resolution. This results in build and/...
79
votes
7
answers
80k
views
In Maven, how output the classpath being used?
For my current purposes I have a Maven project which creates a war file, and I want to see what actual classpath it is using when creating the war. Is there a way to do that in a single command -- ...
3
votes
2
answers
5k
views
Maven: creating 2 war files each with different web.xml?
I need to create two WAR files with two different web.xml files using Maven. The WAR files are the same otherwise.
The WAR files are created as expected, however, the second file has the same web.xml ...
1
vote
2
answers
3k
views
Maven WAR plugin and how to manage dependencies
Okay, this may well be a familiar question, however I still remain confused and I'm struggling to find an answer that really clarifies the details.
The scenario
I have several Maven projects, the ...