Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20806

Exclude of layer in bootable jar excludes all dependencies

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • None
    • Build System
    • None
    • False
    • False
    • Undefined

      Exclude of layer in bootable jar excludes all dependencies. This is a regression of behaviour.

      Steps to reproduce:

      • Create custom-pom.xml file:
        <?xml version="1.0" encoding="utf-8" ?>
        <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>
        
            <artifactId>artifact-with-wf-jar-plugin</artifactId>
            <groupId>test</groupId>
            <version>0.0.0</version>
        
            <build>
                <plugins>
                    <!-- Bootable JAR Maven plugin -->
                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-jar-maven-plugin</artifactId>
                        <version>${version.org.wildfly.jar.plugin}</version>
                        <executions>
                            <execution>
                                <id>bootable-jar-packaging</id>
                                <goals>
                                    <goal>package</goal>
                                </goals>
                                <phase>process-test-resources</phase>
                                <configuration>
                                    <output-file-name>just-a-test-name.jar</output-file-name>
                                    <hollowJar>true</hollowJar>
                                    <record-state>false</record-state>
                                    <feature-packs>
                                        <feature-pack>
                                            <groupId>${testsuite.galleon.pack.groupId}</groupId>
                                            <artifactId>${testsuite.galleon.pack.artifactId}</artifactId>
                                            <version>${testsuite.galleon.pack.version}</version>
                                        </feature-pack>
                                    </feature-packs>
                                    <layers>
                                        <layer>jaxrs-server</layer>
                                    </layers>
                                    <excluded-layers>
                                        <layer>cdi</layer>
                                    </excluded-layers>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </project>
        
      • start it with EAP XP 2.0 bits, no errors:
        mvn clean install -f custom-pom.xml -Dtestsuite.galleon.pack.artifactId=wildfly-galleon-pack -Dtestsuite.galleon.pack.version=2.0.0.GA-redhat-00002 -Dversion.org.wildfly.jar.plugin=2.0.2.Final -Dtestsuite.galleon.pack.groupId=org.jboss.eap
        
      • start it with WF master bits (snapshot), errors are printed:
        mvn clean install -f /home/mkopecky/playground/tests-bootable-jar/user-interface-usability/target/test-classes/pom-configs/pom-exluded-not-provided-layer.xml -Dtestsuite.galleon.pack.artifactId=wildfly-galleon-pack -Dtestsuite.galleon.pack.version=22.0.0.Final-SNAPSHOT -Dversion.org.wildfly.jar.plugin=2.0.2.Final -Dtestsuite.galleon.pack.groupId=org.wildfly
        
        [ERROR] Failed to execute goal org.wildfly.plugins:wildfly-jar-maven-plugin:2.0.2.Final:package (bootable-jar-packaging) on project artifact-with-wf-jar-plugin: Provisioning failed: Required dependency of configuration layer microprofile-config on layer cdi was excluded -> [Help 1]
        

              jdenise@redhat.com Jean Francois Denise
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: