Skip to content

[MEAR-301] wrong repackaging when defaultLibBundleDir start with dot #178

@jira-importer

Description

@jira-importer

Slawomir Jaranowski opened MEAR-301 and commented

example pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>test</groupId>
    <artifactId>test-ear</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>ear</packaging>

    <properties>
        <project.build.outputTimestamp>2021-04-27T10:11:22Z</project.build.outputTimestamp>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>7.0.1.Final</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <defaultLibBundleDir>.</defaultLibBundleDir>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

first run mvn package

[INFO] --- maven-ear-plugin:3.2.0:ear (default-ear) @ test-ear ---
[INFO] Copying artifact [jar:org.slf4j:slf4j-api:1.7.30] to [./org.slf4j-slf4j-api-1.7.30.jar]
[INFO] Copying artifact [jar:org.hibernate.validator:hibernate-validator:7.0.1.Final] to [./org.hibernate.validator-hibernate-validator-7.0.1.Final.jar]
[INFO] Copying artifact [jar:jakarta.validation:jakarta.validation-api:3.0.0] to [./jakarta.validation-jakarta.validation-api-3.0.0.jar]
[INFO] Copying artifact [jar:org.jboss.logging:jboss-logging:3.4.1.Final] to [./org.jboss.logging-jboss-logging-3.4.1.Final.jar]
[INFO] Copying artifact [jar:com.fasterxml:classmate:1.5.1] to [./com.fasterxml-classmate-1.5.1.jar]
[INFO] Building ear: .../ear-test/target/test-ear-1.0.0-SNAPSHOT.ear

second run mvn package - the files was deleted

[INFO] --- maven-ear-plugin:3.2.0:ear (default-ear) @ test-ear ---
[INFO] deleting outdated resource jakarta.validation-jakarta.validation-api-3.0.0.jar
[INFO] deleting outdated resource org.jboss.logging-jboss-logging-3.4.1.Final.jar
[INFO] deleting outdated resource org.hibernate.validator-hibernate-validator-7.0.1.Final.jar
[INFO] deleting outdated resource org.slf4j-slf4j-api-1.7.30.jar
[INFO] deleting outdated resource com.fasterxml-classmate-1.5.1.jar
[INFO] Building ear: .../ear-test/target/test-ear-1.0.0-SNAPSHOT.ear

Next run add the files again and so on ...

The same effect if defaultLibBundleDir set to ./lib


Affects: 3.2.0

Remote Links:

Metadata

Metadata

Labels

bugSomething isn't workingpriority:majorMajor loss of function

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions