我正在练习openliberty.io多模块,并遵循该指南(url)。作为默认值,它可以正常工作。
但是我想使用SkinyWars结构,我在运行时出错了liberty:run or liberty:dev goals 无法解决。
工艺步骤;
我将skinywars参数设置为true;
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<modules>
<!-- tag::jarModule[] -->
<jarModule>
<groupId>io.openliberty.guides</groupId>
<artifactId>guide-maven-multimodules-jar</artifactId>
<uri>/guide-maven-multimodules-jar-1.0-SNAPSHOT.jar</uri>
</jarModule>
<!-- end::jarModule[] -->
<!-- tag::webModule[] -->
<webModule>
<groupId>io.openliberty.guides</groupId>
<artifactId>guide-maven-multimodules-war</artifactId>
<uri>/guide-maven-multimodules-war-1.0-SNAPSHOT.war</uri>
<!-- Set custom context root -->
<!-- tag::contextRoot[] -->
<contextRoot>/converter</contextRoot>
<!-- end::contextRoot[] -->
</webModule>
<!-- end::webModule[] -->
</modules>
<skinnyWars>true</skinnyWars>
</configuration>
我犯了那个错误
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.2:dev (default-cli) on project guide-maven-multimodules-ear: Unable to create loose configuration for the EAR application with skinnyWars package from io.openliberty.guides:guide-maven-multimodules-war:1.0-SNAPSHOT. Please set the looseApplication configuration parameter to false and try again. -> [Help 1]
然后,正如它告诉我的,我将looseapplication参数设置为false;
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.2</version>
<configuration>
<looseApplication>false</looseApplication>
</configuration>
</plugin>
mvn公司liberty:run -f 完成/ear/pom.xml
我得到它是不可能启动两个应用程序称为指南maven多模块耳。错误。应用程序从不同的contextroot启动。
[AUDIT ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /home/user/git/guide-maven-multimodules/finish/ear/target/liberty/wlp/usr/servers/defaultServer/configDropins/defaults/install_apps_configuration_1491924271.xml
[AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /home/user/git/guide-maven-multimodules/finish/ear/target/liberty/wlp/usr/servers/defaultServer/configDropins/overrides/liberty-plugin-variable-config.xml
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[ERROR ] CWWKZ0013E: It is not possible to start two applications called guide-maven-multimodules-ear.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://192.168.1.33:9080/guide-maven-multimodules-ear/
[AUDIT ] CWWKZ0001I: Application guide-maven-multimodules-ear started in 0.299 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [el-3.0, jsp-2.3, localConnector-1.0, servlet-3.1].
[AUDIT ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 1.500 seconds.
mvn公司liberty:dev -f 完成/ear/pom.xml
似乎无法将“looseapplication”设置为“false”
[WARNING] Overriding liberty plugin pararmeter, "looseApplication" to "true" and deploying application in looseApplication format
.
.
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.2:dev (default-cli) on project guide-maven-multimodules-ear: Unable to create loose configuration for the EAR application with skinnyWars package from io.openliberty.guides:guide-maven-multimodules-war:1.0-SNAPSHOT. Please set the looseApplication configuration parameter to false and try again. -> [Help 1]
在这种情况下我该怎么办?我希望你能帮忙。
谢谢,
致以最诚挚的问候,
1条答案
按热度按时间piok6c0g1#
为了liberty:run,此处已打开一个问题:https://github.com/openliberty/ci.maven/issues/1054
liberty:dev currently 不支持多模块项目。这将由https://github.com/openliberty/ci.maven/issues/697