简体   繁体   English

找不到 usr:arquillian-support-1.0 的功能定义

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

Liberty 20.0.0.1/AdoptOpenJdk 8自由 20.0.0.1/采用 OpenJdk 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. Liberty Arquillian 1.0.6(liberty-managed) server.xml 配置。

<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.当我将usr:arquillian-support-1.0功能添加到server.xml并启动应用程序服务器并获得这样的错误信息时。

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

The sample project is here .示例项目在这里

It isn't possible right now to use the usr:arquillian-support-1.0 feature with Open Liberty.现在无法在 Open Liberty 中使用 usr:arquillian-support-1.0 功能部件。 There are two parts to this.这有两个部分。

The open liberty distribution you are using doesn't include the arquillian support feature.您使用的开放式自由发行版不包括 arquillian 支持功能。 There is nothing in the pom.xml that would enable it to work. pom.xml 中没有任何内容可以使其工作。 The Liberty maven plugin does have some support for installing extra features, however it doesn't (at this time) work with usr features such as the arquillian-support-1.0 feature. Liberty maven 插件确实支持安装额外的功能,但是(目前)它不支持 usr 功能,例如 arquillian-support-1.0 功能。 I think that is being tracked by this issue in GitHub.我认为 GitHub 中的这个问题正在跟踪这一点。

So for now I'd just remove that line from the server.xml.所以现在我只是从 server.xml 中删除该行。 I'd also suggest looking at the liberty-maven-plugin, I think it can significantly simplify the maven configuration you are doing to get Liberty working, and when support for usr features is added you'll need it to get arquillian-support-1.0 added.我还建议查看liberty-maven-plugin,我认为它可以显着简化您为使Liberty 工作而进行的maven 配置,并且当添加对usr 功能的支持时,您将需要它来获得arquillian-support-添加了 1.0。

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. arquillian 支持功能只需要正确报告测试应用程序无法启动时发生的异常,因此根据您正在测试的内容,您可能根本不需要它。

If you do need it, the feature itself is distributed as a zip file which just needs extracted into your liberty server.如果您确实需要它,该功能本身会以 zip 文件的形式分发,只需将其解压缩到您的自由服务器中即可。 You can configure your pom.xml to extract it as part of your build using maven-dependency-plugin :您可以配置 pom.xml 以使用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示例取自: 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.查看您的示例项目,您似乎已经在使用 maven-dependecy-plugin 来部署 derby jar,因此您可能需要稍微调整此示例以使其工作。

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.你会想要将<configuration>块移动到<configuration> <execution>块中,这样每个执行都有一个单独的配置,然后将两个<execution>块都包含在同一个<plugin>块中,但我不是很糟糕对 maven 充满信心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到Arquillian远程jar - Arquillian was remote jar not found Arquillian是否支持Java EE 7? - Does Arquillian support Java EE 7? Arquillian依赖管理:找不到ExecutorService - Arquillian dependency management : ExecutorService not found Arquillian:无法设置GlassFish嵌入式运行时 - Arquillian:Could not setup GlassFish Embedded Runtime Arquillian:无法设置GlassFish Embedded Bootstrap - Arquillian: Could not setup GlassFish Embedded Bootstrap Arquillian JPA教程:无法创建类的新实例org.jboss.arquillian.test.impl.EventTestRunnerAdaptor - Arquillian JPA tutorial: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor 为什么Arquillian给我:无法读取活动容器配置? - Why the arquillian gives me that : Could not read active container configuration? 试图对耳朵进行Arquillian测试并找不到ArquillianServletRunner - Trying to run an Arquillian Test for an ear and getting ArquillianServletRunner not found 使用Postgres DB用户的Arquillian的Tomee缺少特权或找不到对象 - Tomee with Arquillian using Postgres DB user lacks privilege or object not found Arquillian:添加 beans.xml 会导致“未找到 ArquillianServletRunner” - Arquillian: Adding beans.xml causes "ArquillianServletRunner not found"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM