You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sebastien Dubois (Jira)" <ji...@apache.org> on 2021/06/16 16:57:00 UTC
[jira] [Comment Edited] (MWAR-442) WAR overlay not including the
dependent WAR contents
[ https://issues.apache.org/jira/browse/MWAR-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364378#comment-17364378 ]
Sebastien Dubois edited comment on MWAR-442 at 6/16/21, 4:56 PM:
-----------------------------------------------------------------
I've created a dummy repository to make it easier to reproduce the issue; hopefully it should help: [https://github.com/dsebastien/mwar-442-repro]
Simply run mvn clean install, then:
* Observe the size and contents of the dummy-data-extractions-controller-1.0.0-SNAPSHOT.war file under controller/target
* Observe the size and contents of the dummy-data-extractions-controller-carelios-1.0.0-SNAPSHOT.war file under controller-carelios/target
was (Author: dsebastien):
I've created a dummy repository to make it easier to reproduce the issue; hopefully it should help: https://github.com/dsebastien/mwar-442-repro
> WAR overlay not including the dependent WAR contents
> ----------------------------------------------------
>
> Key: MWAR-442
> URL: https://issues.apache.org/jira/browse/MWAR-442
> Project: Maven WAR Plugin
> Issue Type: Bug
> Components: overlay
> Affects Versions: 3.3.1
> Reporter: Sebastien Dubois
> Priority: Major
> Attachments: controller-carelios-build.txt
>
>
> I am currently trying to create a WAR overlay in my project, without success so far.
> The project is a multi-module project, in which two different modules for which WAR files need to be created:
> * "controller" module: uses the maven-war-plugin to create the "main" WAR file. This works fine, and the generated WAR file is ~60MB
> * "controller-carelios" module: uses the maven-war-plugin's overlay feature to create a new WAR file, which should contain the contents of the controller module's WAR, and add a few files on top
> As noted above, the "main" war file created for the "controller" module seems fine. It gets build, and added to the local maven repository.
> The problem appears when the war of the second module, "controller-carelios" is built with the overlay. The problem is that the generated war file ONLY contains the contents of the "controller-carelios" module.
> While investigating this issue, I noticed that no files are extracted from the controller module main war file. Although, the maven-war-plugin does seem to extract the file (and I see no errors in the debug log, it just states "expand complete")
> Here's the configuration of the "controller" module:
>
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>${maven-war-plugin.version}</version>
> <configuration>
> <failOnMissingWebXml>false</failOnMissingWebXml>
> <warSourceDirectory>target/www/</warSourceDirectory>
> <webResources>
> <resource>
> <directory>src/main/webapp</directory>
> <includes>
> <include>WEB-INF/**</include>
> </includes>
> </resource>
> </webResources>
> </configuration>
> {code}
> And here is the configuration for the "controller-carelios" module. I've tried different approaches to no avail..
>
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <failOnMissingWebXml>false</failOnMissingWebXml>
> <overlays>
> <!-- Add the files of Carelios first -->
> <overlay></overlay>
> <!-- Then add the rest -->
> <overlay>
> <groupId>com.agilos.dataextraction</groupId>
> <artifactId>agilos-data-extractions-controller</artifactId>
> <type>war</type>
> </overlay>
> </overlays>
> </configuration>
> </plugin>
> {code}
> Does this issue ring any bell? Any idea what I could be doing wrong?
> The behavior seems to be the same in our CI environment.
> That project uses:
> * Java 8 (1.8.0_292)
> * Maven 3.8.1
> * maven-war-plugin 3.3.1
--
This message was sent by Atlassian Jira
(v8.3.4#803005)