Skip to content

Jar entries are duplicated in BOOT-INF/lib with layered jars and Maven #23801

@Ahli

Description

@Ahli

In my project, a generated executable jar contains every jar within the BOOT-INF/lib directory twice with identical file names. This pretty much doubles the size of the final jar.

The issue is not present in 2.4.0-M1 of the Maven-Plugin.
The issue is present since 2.4.0-M2. So, M4 still contains it.

The produced executable jar is functional. Just the file size is doubled.

My library usage:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>2.4.0-M4</version> <!-- M2-M4 add lib jars twice; M1 is fine -->
    <executions>
        <execution>
            <goals>
                <goal>repackage</goal>
            </goals>
            <configuration>
                <!--<finalName>${jarName}</finalName>-->
                <layout>JAR</layout>
                <classifier>spring-boot</classifier>
                <mainClass>${mainClass}</mainClass>
            </configuration>
        </execution>
    </executions>
</plugin>

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions