All Questions
Tagged with maven-war-plugin maven-3
32 questions
4
votes
1
answer
862
views
How to have version in WAR filename, but not require it in the URL when deployed in Tomcat
I want to version my WAR to make DevOps lives easier, i.e.: foo-3.2.0.war. In pom.xml, I have:
<build>
<finalName>foo</finalName>
but also
<plugin>
<groupId>org....
0
votes
1
answer
931
views
Maven: remove "-version-SNAPSHOT" suffix from downloaded dependencies
I'm using <finalName> in build section of maven to rename my-artifact-<project.version>-SNAPSHOT.jar to my-artifact.jar, I see that the resulting artifact is renamed as expected in my ...
0
votes
1
answer
651
views
Build war including WebContent of another project in main service project
I have a project having current file structure as(This works fine):
project-services
- src/main/java
- WebContent
- pom.xml
project-services pom.xml
...
<build>
<...
6
votes
1
answer
3k
views
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 ...
1
vote
2
answers
9k
views
Invalid packaging for parent POM must be "pom" but is "war"
Could anybody suggest me an solution with the following exception. I am going to create a multi-module project. (War, Ear)
pom.xml (war)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:...
1
vote
1
answer
5k
views
How to include/exclude resources in maven war package
Within my MAVEN project I'm trying to build a war package with certain resources based on a profile (defined in my settings.xml).
pom.xml:
<plugin>
<artifactId>maven-war-plugin</...
0
votes
2
answers
823
views
Maven war packaging skipped prior to tests being run
I have a maven project which has some Selenium based integration tests to run in a package called sit. I have configured the failsafe plugin to include test files in the package eg. <include>sit/...
1
vote
1
answer
238
views
How do I figure out what file the Maven war plugin's "XML document structures must start and end within the same entity" is complaining about?
I’m using Maven 3.3.3 on Amazon Linux and using the Maven WAR plugin I have setup the in-place goal like so in my parent pom
<plugin>
<groupId>org.apache.maven.plugins</groupId>...
2
votes
1
answer
13k
views
maven-replacer-plugin to replace tokens in build and not source
I am trying to use the maven-replacer-plugin to replace tokens in my web.xml when it is built in the WAR file but not in the source, which would remove the tokens for subsequent builds and show the ...
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 ...
1
vote
1
answer
2k
views
How do I configure my Maven-war-plugin's useCache feature so that consecutive builds are faster?
I’m using Maven 3.3.0 on Mac Yosemite. I wanted to make use of the maven-war-plugin’s useCache feature, but it isn’t doing anything in my multi-module project. When I run
mvn clean install -...
3
votes
3
answers
7k
views
Maven: Why am I getting servlet-api-2.5
I'm creating a web application with Maven, and I'm having a problem - for some reason I get servlet-api-2.5.jar included, which gives weird exceptions. Removing this file from the WAR archive solves ...
2
votes
1
answer
4k
views
Run ant task in maven build phase before war is packaged?
When deploying a webapp I need to concat some files, currently this is achieved via an ant task. I'm trying to run this task in the maven build process using something like the following:
<plugin&...
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 ...
3
votes
2
answers
1k
views
Prevent war file from being copied to .m2/repository when running mvn clean install
We have a multi-module Maven project and we typically run mvn clean install to build everything. Preferably, we'd like to keep it this way.
What we would like to do is prevent projects with ...
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
0
answers
981
views
Compile error when packaging maven project
I'm using datanucleus/mongodb. I recently converted my dynamic web project to maven in Eclipse because I wanted to use the maven buildnumber plugin. However I am just trying to get it to work now in ...
1
vote
2
answers
2k
views
Maven war plugin is failing with error "No such field org.apache.maven.model.Dependency.managementKey"
We’re using Maven 3.2.3 with Jenkins (Java 6). We are building a multi-module project. However, some of the projects fail upon running the maven-war-plugin goal. Here is the configuration …
<...
2
votes
2
answers
7k
views
Precedence packagingExcludes and packagingIncludes maven war plugin
Recently I configured my application to use "skinny wars" that was described on codehaus (title: Solving the skinny war problem). Basically I exclude all jars from the war and add it as a war and pom ...
0
votes
1
answer
250
views
Include jar but not dependencies in war
I am building my project using maven and every thing was working fine.
Now I have added one new dependency in my pom and maven is including all the dependencies of new jar on war, I just want to ...
5
votes
2
answers
15k
views
How to resolve a Maven "The packaging for this project did not assign a file to the build artifact" error?
I’m using Maven 3.2.3. I used to be able to run “mvn clean install” on my WAR project and the WAR would get installed to my local repository. However, I recently added a configuration so that my WAR ...
0
votes
2
answers
8k
views
How do I configure the Maven WAR plugin to execute the "inplace" goal by default?
I’m using Maven 3.2.3 and the Maven War 2.6 plugin. I would like the “inlace” goal of the Maven WAR plugin to execute by default (without my having to explicitly specify “war:inlace” on the command ...
3
votes
2
answers
7k
views
Renaming static files when building WAR file using Maven
I want to rename static files when building my WAR file using maven-war-plugin, with version number. For intance, in my project I have a file:
src/main/webapp/css/my.css
I want it to appear in the ...
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....
0
votes
2
answers
1k
views
Maven: How to get nested resource with partial directory structure to WEB-INF/classes in maven
I am migrating a non-maven project to maven project. I cant change the current directory structure of the project or the structure of the created war file.
Now I want to configure the location of the ...
0
votes
3
answers
706
views
How do I change the Maven-WAR plugin's cache file location?
I’m using Maven 3.1.1 and using the Maven-war plugin v 2.4. I would like to create the cache in a directory other than the ${basedir}/target/war/work directory, but I can’t seem to figure out how to ...
6
votes
2
answers
14k
views
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 ...
0
votes
1
answer
139
views
Why does maven create two copies of my filtered persistence.xml?
Below is the relevant section of the maven project I'm working on. I would like Maven to filter the persistence-context.xml file inside of the WEB-INF directory, and then place it into the WEB-INF ...
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/...
0
votes
1
answer
2k
views
maven-war-plugin overlay and m2e eclipse plugin
I'm trying to leverage the useful overlay feature of the maven-war-plugin.
In other words, I have a template (packaged as WAR file, template-0.0.1.war) containing tag files, css, js and images.
When ...
3
votes
1
answer
2k
views
How can I generate Flash HTML wrappers in a WAR using Flexmojos and Maven 3?
I have two Maven projects: one to build a SWF and another one to build a WAR that contains it. The WAR needs to contain a Flash wrapper for the SWF. Flexmojos is apparently capable of doing this via ...
6
votes
1
answer
10k
views
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 ...