java - OpenLiberty Maven Plugin 无法将looseaplication 设置为 false
问题描述
我正在按照该指南(URL)练习 openliberty.io 多模块。它作为默认值工作正常。
但是我想使用skinnyWars结构,当我运行liberty:run或liberty:dev目标时出现错误并且无法解决它。
工艺步骤;
我将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 完成/ear/pom.xml
我得到了无法启动两个名为 guide-maven-multimodules-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自由: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]
这些情况我该怎么办?我希望你的帮助。
谢谢,
此致,
解决方案
对于 liberty:run,这里打开了一个问题: https ://github.com/OpenLiberty/ci.maven/issues/1054
liberty:dev 目前不支持多模块项目。这将由https://github.com/OpenLiberty/ci.maven/issues/697解决
推荐阅读
- lambda - 转换为柯里化函数
- c# - 旋转车轮时负角无法正常工作
- r - R/箭头:读取镶木地板数据文件时遇到问题
- json - 如何将我的 Mapreduce 结果操作存储在 Json 文件中?
- visual-studio-code - 在 VSCode 资源管理器中打开文件夹时,扩展主机意外终止
- tensorflow - 用于回归任务的贝叶斯 CNN
- python - 如何使用美国农业部 API
- reactjs - 使用反应钩子将异步数据作为道具传递
- reactjs - React Hook useEffect 缺少依赖项:'xxx'、'xxx' 和 'xxx'。包括它们或删除依赖数组
- sql - SQL Server 查询返回的数据结构