Maven构建没有正确安装功能

时间:2017-07-27 13:46:34

标签: maven websphere-liberty open-liberty

尝试使用passwordUtilities功能配置我的pom.xml文件时,messages.log似乎总是显示在服务器启动期间未安装该功能,即使它位于功能管理器列表中,我可以看到所有必需的功能wlp / lib中的文件。这是我目前在pom.xml中编码的内容:

<configuration>
    <assemblyArtifact>
        <groupId>com.ibm.websphere.appserver.runtime</groupId>
        <artifactId>wlp-javaee7</artifactId>
        <version>16.0.0.4</version>
        <type>zip</type>
    </assemblyArtifact>                 
    <configFile>src/main/liberty/config/server.xml</configFile>
    <include>${packaging.type}</include>
    <bootstrapProperties>
        <appContext>${warContext}</appContext>
        <default.http.port>${testServerHttpPort}</default.http.port>
        <default.https.port>${testServerHttpsPort}</default.https.port>
        <appLocation>${project.artifactId}.war</appLocation>
    </bootstrapProperties>
</configuration>
<executions>
    <execution>
        <id>install-feature</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>install-feature</goal>
        </goals>
        <configuration>
            <features>
                <acceptLicense>true</acceptLicense>
                <feature>passwordUtilities-1.0</feature>                    
            </features>
        </configuration>
    </execution>

2 个答案:

答案 0 :(得分:1)

showSubNav目标需要绑定到install-feature阶段(根据the doc),而不是prepare-package阶段。

另外,我应该指出,如果省略pre-integration-test配置中的功能,则会扫描server.xml,并自动下载缺少的功能。

所以你的新<features>节看起来像这样:

<exection>

答案 1 :(得分:0)

安迪,这是对的。我们在install-feature文档中修复了一个误导性示例:https://github.com/WASdev/ci.maven/blob/master/docs/install-feature.md#install-feature