jboss-arquillianopen-liberty

A feature definition could not be found for usr:arquillian-support-1.0


Liberty 20.0.0.1/AdoptOpenJdk 8

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

Liberty Arquillian 1.0.6(liberty-managed) server.xml config.

<server description="new server">

    <!-- Enable features -->
    <featureManager>
        <feature>javaee-8.0</feature>
        <feature>usr:arquillian-support-1.0</feature>
        <feature>localConnector-1.0</feature>
    </featureManager>

When I have add usr:arquillian-support-1.0 feature to server.xml and start the application server and got the error info like this.

[ERROR   ] CWWKF0001E: A feature definition could not be found for usr:arquillian-support-1.0

The sample project is here.


Solution

  • The arquillian support feature is only needed to correctly report the exception that occurred when a test app failed to start, so depending on what you're testing, you may not need it at all.

    If you do need it, the feature itself is distributed as a zip file which just needs extracted into your liberty server. You can configure your pom.xml to extract it as part of your build using maven-dependency-plugin:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <version>3.1.1</version>
      <executions>
        <execution>
          <id>extract-support-feature</id>
          <phase>pre-integration-test</phase>
          <goals>
            <goal>unpack</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <artifactItems>
          <artifactItem>
            <groupId>io.openliberty.arquillian</groupId>
            <artifactId>arquillian-liberty-support</artifactId>
            <version>1.0.6</version>
            <type>zip</type>
            <classifier>feature</classifier>
            <overWrite>false</overWrite>
            <outputDirectory>${project.build.directory}/liberty/wlp/usr</outputDirectory>
          </artifactItem>
        </artifactItems>
      </configuration>
    </plugin>
    

    Example taken from: https://github.com/OpenLiberty/liberty-arquillian/tree/master/liberty-support-feature

    Looking at your sample project, it looks like you're already using the maven-dependecy-plugin to deploy the derby jar, so you may need to adapt this example a bit to make it work.

    I think you will want to move the <configuration> blocks inside the <execution> blocks, so that each execution has a separate configuration, and then include both <execution> blocks inside the same <plugin> block, but I'm not terribly confident with maven.