我正在实践openliberty.io多模块,并遵循该指南( URL )。作为缺省值,它工作得很好。
但是我想使用skinnyWars结构,当我运行 run :run或:dev goals时出现了错误,但无法解决。
工艺步骤;
我将skinnyWars参数设置为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 空闲:运行 -f finish/ear/pu.xml
我发现不可能启动两个名为guide多模块-ear的应用程序。错误。应用程序在不同的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 finish:dev -f finish/ear/-f.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]在这种情况下我该怎么办?我希望你能帮我。
谢谢,
诚挚的问候,
发布于 2020-12-07 20:50:12
为了自由:run,在这里打开了一个问题:https://github.com/OpenLiberty/ci.maven/issues/1054
自由:dev目前不支持多模块项目。这将由https://github.com/OpenLiberty/ci.maven/issues/697来解决
https://stackoverflow.com/questions/65157269
复制相似问题