Maven combat plugin cannot exclude parsed military format libraries

I use the maven war plugin to exclude some common jar and put it in the classpath. I can correctly generate a war file that excludes the specified libraries and adds them to the class path, but the parsed military directory still contains the excluded libararies. How can I create an exploded war file that uses the maven war plugin configuration.

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ekaplus.ctrm.mdm</groupId>
    <artifactId>core-presentation</artifactId>
    <version>1.0</version>
    <packaging>war</packaging>
    <name>presentation layer core</name>

    <dependencies>
        <dependency>
            <groupId>com.ekaplus.ctrm.mdm</groupId>
            <artifactId>eka-core-mdm-presentation</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>exploded</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <defaultGoal>package</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.1</version>
                        <configuration>
                            <packagingExcludes>
                                WEB-INF/lib/dto-common-1.0.jar,
                                WEB-INF/lib/eka-action-1.0.jar
                            </packagingExcludes>
                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                </manifest>
                            </archive>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
+3
source share
1 answer

(...) How can I create an exploded war file that uses the maven war plugin configuration.

war:exploded () maven war, packagingExcludes war:war. .

packagingExcludes? , , . ?

, (provided ?) ( ) .

+3

Source: https://habr.com/ru/post/1772312/


All Articles