Skip to content

Add support for creating layered war files with Maven #22821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hudi1 opened this issue Aug 7, 2020 · 3 comments
Closed

Add support for creating layered war files with Maven #22821

hudi1 opened this issue Aug 7, 2020 · 3 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@hudi1
Copy link

hudi1 commented Aug 7, 2020

Repackaging application with layer=WAR:

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <layout>WAR</layout>
                <layers>
                    <enabled>true</enabled>
                </layers>
            </configuration>
        </plugin>

throws Exception:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.2.RELEASE:repackage (repackage) on project rob-oro: A type incompatibility occurred while executing org.springframework.boot:spring-boot-maven-plugin:2.3.2.RELEASE:repackage: class org.springframework.boot.loader.tools.Layouts$War cannot be cast to class org.springframework.boot.loader.tools.RepackagingLayout (org.springframework.boot.loader.tools.Layouts$War and org.springframework.boot.loader.tools.RepackagingLayout are in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5b1f0f26)

JAR layout is working. I think WAR layout should also implement RepackagingLayout:

public static class Layouts.War extends Object implements Layout

public static class Layouts.Jar extends Object implements RepackagingLayout

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2020
@wilkinsona
Copy link
Member

Thanks for the report. We don't support layered war files at the moment. #22195 is tracking that enhancement.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 7, 2020
@wilkinsona
Copy link
Member

I've updated #22195 to focus on Gradle support for layered war files. Let's use this issue for the Maven side of things.

@wilkinsona wilkinsona reopened this Oct 19, 2020
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: duplicate A duplicate of another issue labels Oct 19, 2020
@wilkinsona wilkinsona added this to the 2.4.x milestone Oct 19, 2020
@wilkinsona wilkinsona changed the title Can not build WAR layout with spring-boot-maven-plugin Add support for creating layered war files with Maven Oct 19, 2020
@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.5.x Oct 24, 2020
@mbhave mbhave self-assigned this Jan 26, 2021
@mbhave mbhave modified the milestones: 2.5.x, 2.5.0-M2 Jan 28, 2021
@mbhave
Copy link
Contributor

mbhave commented Jan 28, 2021

Keeping the issue open to add documentation once the gradle issue is completed.

mbhave added a commit that referenced this issue Jan 28, 2021
@mbhave mbhave closed this as completed in c73e3cc Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants