Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

maven-war-plugin will not generate MANIFEST file

I have an older project that has a manually defined MANIFEST.MF file checked in that I'm trying to delete and autogenerate instead. Maven makes it sound like this should be a simple task, but it hasn'...
LoganBlack's user avatar
0 votes
0 answers
100 views

maven-war-plugin : unable to load the mojo

I am running java version "21.0.4" 2024-07-16 LTS I downloaded the https://github.com/eclipse-ee4j/glassfish-samples. and trying to buld the jakarta9 files. I get Caused by: org.apache.maven....
user14386874's user avatar
0 votes
2 answers
145 views

IntelliJ cannot find maven-war-plugin

It gives me this error in pom The plugin is correctly available in m2 folder other libraries are also recognized well, and the plugin is available in server... I've tried to invalidate & ...
Lore's user avatar
  • 1,848
0 votes
0 answers
112 views

maven-war-plugin copies only subdirectories (including files). Not just files

I am using the maven-war-plugin (version 3.3.2) in order to copy a jar file from target/lib/v1 into the WEB-INF/lib of the WAR file. The jar file is located under: target/lib/v1/myJar.jar The pom.xml ...
Michail Touloupis's user avatar
0 votes
3 answers
411 views

Exclude transitive maven dependencies from generated war file

I am in the process of converting a monolithic legacy enterprise application to use maven instead of ant. I created a list of dependencies that ant was using for the builds and accordingly created a ...
ďąяЌąɲǥeℓ's user avatar
0 votes
0 answers
75 views

How to apply jar patch while creating war file using maven

I have maven project that creates the war file. It includes the all the jars from dependencies. In my case, some jar we received as a product patch. These jar should be overwrite the existing jars ...
Shakil Shaikh's user avatar
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&...
Mahmoud Saleh's user avatar
0 votes
1 answer
282 views

War external dependency overlay - move jars from WEB-INF/lib-new to WEB-INF/lib

I am working on a maven project with a war external dependency (let's call this war dependency WAR-DEP) After the build and during the package phase I am taking the content of WAR-DEP and merging it ...
zerocool's user avatar
0 votes
1 answer
2k views

Getting a logback.xml from a dependency jar and filtering it with the maven-war-plugin

We have a common logback.xml file that we would like to use across different web apps. It includes a RollinFileAppender which should see files named as the project artifactId. The logback.xml ...
ceepan's user avatar
  • 95
0 votes
1 answer
429 views

Problem after implement packagingExcludes in maven

I have app that build with different profiles using spring profiles. i have to implement packagingExcludes to exclude websocket-*.jar because its make conflict with tomcat after deploy. so , i add ...
None for Nothing's user avatar
0 votes
1 answer
316 views

Maven WAR overlay - merge resources into a different path

I'm using maven 4.0.0. I'm using an overlay in the maven-war-plugin to merge app1 into app2. I want to merge some of the directories in app1 into a different location in app2. Essentially move the ...
Matt's user avatar
  • 928
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....
pbuchheit's user avatar
  • 1,607
0 votes
0 answers
437 views

Deploy JAR and WAR to Nexus

I'm working on a JAVA based application. The POM has been so configured that the packaging phase generates an executable JAR (with the maven-shade-plugin) and a WAR (with the war-plugin). The main ...
Julien Berthoud's user avatar
0 votes
0 answers
466 views

Why can't I read MANIFEST.MF file generated by maven when packaging jar?

I have two separate projects: one is spring-boot with jar packaging, and one is a non-spring-boot app with war packaging. In my spring-boot application, I use maven-jar-plugin to generate MANIFEST.MF ...
Alxa's user avatar
  • 79
1 vote
0 answers
475 views

maven-war-plugin basedir <workspace>/target/dist does not exist

We're trying to build a Java-based project with Maven (v3.5.4) and with the JDK 1.8.92 but we getting an error Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on ...
mansing shinde's user avatar
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 ...
Tim Paine's user avatar
0 votes
0 answers
99 views

Can i make maven-war-plugin to *only* copy the classes.jar but not the .war into local repo?

OK, so i'm using the maven-war-plugin to build my war, which works fine. I also have it setup to generate a -classes.jar. When i run the build, both the war and -classes.jar gets copied into my .m2 ...
Mathias's user avatar
  • 3,971
0 votes
1 answer
233 views

Setting a property for only a specific phase

I want to be able to set a property for a specific maven phase. How can I do that? For example, assume that I want to set a property like this: <properties> <spring.profiles.active>...
Shayan's user avatar
  • 2,828
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....
Russ Bateman's user avatar
  • 18.6k
0 votes
1 answer
573 views

How to modify the contents or replace a file which resides in webapp directory of a Maven webapp project

I've a Maven webapp project. It has a default directory structure as below - |-- pom.xml `-- src `-- main |-- java | `-- com | `-- example | ...
Sid's user avatar
  • 393
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 ...
Remo's user avatar
  • 1,392
9 votes
1 answer
15k views

Problem with Maven war plugin 3.0.0 due to an API incompatibility

I'm following this JSF tutorial https://www.tutorialspoint.com/jsf/index.htm. I think I've done everything that was written there (downloading all the required sw, setting the environment with path to ...
Domenico Romano's user avatar
3 votes
1 answer
4k views

minify-maven-plugin (com.samaxes.maven v1.7.6) is not replacing the minified files with the original files

I want to minify JS and CSS files in maven project. I have used minify-maven-plugin (com.samaxes.maven v1.7.6). As per the documentation (https://samaxes.github.io/minify-maven-plugin/minify-mojo....
Shruti Rawal's user avatar
0 votes
1 answer
150 views

maven-war-plugin: jar deployed twice in nexus when attachClasses set to true

I have a very similar problem as exposed in maven jar deployed twice in a war module with attachClasses set to true, except that my setting is different and that what seems to have helped, doesn't ...
Julien Berthoud's user avatar
0 votes
1 answer
936 views

DevOps - Maven: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war

I'm configuring my maven project on DevOps, but I receive an assembling WAR error. I've uploaded my project on the DevOps Repository and created a pipeline. My pipeline is composed by the following ...
DarkCoffee's user avatar
0 votes
1 answer
320 views

Renaming jar of the same Maven project before bundling it into its war file

We've a Maven project that has war packaging. It has a couple of other projects as dependencies. The requirement here is that all projects added as dependencies should have a common naming convention ...
Sid's user avatar
  • 393
0 votes
0 answers
223 views

maven-war plugin war generating time

maven-war pluging used in my project performs below operations as part of build process and creating war. Exploding webApp Assembling webApp {project's webapp module} into the directory (target ...
Sid's user avatar
  • 33
1 vote
1 answer
1k views

Angular /assets/ not found on serving maven webapp in tomcat

My maven webapp has the following structure -webapp -dist -errors -WEB-INF The 'dist' folder has all the angular build files. In pom.xml I am using maven-resources plugin to copy the content of ...
user8597012's user avatar
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 ...
A.R.K.S's user avatar
  • 1,792
0 votes
1 answer
672 views

maven war overlay won't exclude dependancies

I have a project where I am attempting to overlay a pre-built war with a compiled jar from another module and some files in the war project. +pom.xml | +-+depandancy_dir | | | + source.war | +-+ jar |...
Aaron's user avatar
  • 893
1 vote
1 answer
355 views

maven-war-plugin does not change .war default directory

I try to change default .war directory by using maven-war-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId&...
Jelly's user avatar
  • 1,296
0 votes
1 answer
164 views

Filtering out provided dependencies for a war

If I build a war for a specific platform (e.g. Wildfly), I need to filter out dependencies that are already provided by the platform. Up to now, we do this by using a special BOM that lists all the ...
J Fabian Meier's user avatar
0 votes
1 answer
290 views

In Maven, how to compile a class outside the source directory into an arbitrary target directory?

I have a legacy app that I'm porting from Ant to Maven. My Maven build works fine for the main project, which I've moved into the standard Maven directory layout (*.java files in /src/main/java/) and ...
workerjoe's user avatar
  • 2,645
0 votes
1 answer
113 views

CAS overlay: How to reduce the WAR size

I am upgrading CAS from 3.x to 5.x. The CAS Overlay Installation: builds a war file of about 120 MB about 5 times larger than 3.x. How can I skip the unused modules/jars from the war file in order ...
VNN456's user avatar
  • 147
4 votes
0 answers
403 views

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

I do use the maven-jar-plugin in my pom.xml. <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifestEntries> ...
Splioo's user avatar
  • 522
0 votes
2 answers
5k views

How configure maven-war-plugin for tomcat

I can not generate proper WAR file for Tomcat. I am using MAVEN 3.6.1, Java 12.0.1 and IDE Eclipse. My app is working fine when I run it in eclipse (Run as > Spring Boot App) but the problem is when ...
noname's user avatar
  • 565
3 votes
3 answers
2k views

skip the execution of maven-war-plugin

How do I skip the execution of the maven-war-plugin during a mvn command? Based on the documentation, it seems like I should be able to do so by running something like the following, using -Dmaven....
Woodchuck's user avatar
  • 4,386
0 votes
0 answers
1k views

Maven-war-plugin fails during mvn install execution due to web.xml is not found

I am trying to make a simply "mvn clean install" execution in a Maven project but it fails with this error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war->plugin:2.2:war (...
Idles28's user avatar
  • 57
0 votes
1 answer
1k views

WEB-INF/classes empty upon MavenBuild

I am building a multi modules project the hierarchy for it as follow : ParentProject |_ WebModule |_src |_main ...
k.elgohary's user avatar
-1 votes
1 answer
194 views

tomcat deploy plugin with child war projects

i have main project with 3 war modules i need to deploy the main war file using tomcat-maven-plugin Parent - Main War Project child of Parent(Has dependecy of 3 war modules) - war module child ...
chiranjeevigk's user avatar
1 vote
0 answers
328 views

maven-war-plugin version cause OOM

I have a web app built using maven-war-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> ...
Harper's user avatar
  • 1,944
0 votes
0 answers
30 views

Maven War Plugin Exclusions (need to exclude an entire dir)

I've got my project structured as such: Here is the plugin element I'm using for the maven-war-plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>...
Kamron K.'s user avatar
  • 604
0 votes
0 answers
359 views

WAR files behaves differently which are build by INTELLIJ IDEA and MAVEN WAR Plugin

I am trying to migrate Eclipse JAVA EE Web Application to Maven project. My project has Eclipse BIRT dependency and Eclipse BIRT releases are not mavenized. Therefore, i added all BIRT jar files ...
Zeynel Abidin KİREMİTCİ's user avatar
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. ...
Zardoz89's user avatar
  • 621
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 ...
Sterconium's user avatar
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 ...
Storm's user avatar
  • 73
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> <...
Shashi Ranjan's user avatar
0 votes
2 answers
181 views

Springboot: application.properties path motification not taken into account

I'm creating a war file from a simple Spring boot (1.x) project, and I would like to modify the Context path. For that purpose, I have an application.properties file that looks like this: server....
mekoda's user avatar
  • 333
0 votes
0 answers
139 views

maven-war-plugin - changing the location of files in the output war file

I am converting existing projects to maven. My task is to just write a POM which will create an exact deployables as ANT script is producing. I have to match MAVEN output war file with ANT ...
JOHND's user avatar
  • 2,757
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 ...
MegaMatt's user avatar
  • 23.7k

1
2 3 4 5