【发布时间】:2017-06-07 13:09:38
【问题描述】:
在 IBM MobileFirst 8.0 中使用带有 java 适配器的外部库是否有任何限制?
当我添加guava 时,我的代码没有错误(mfpdev 适配器构建成功),但是在部署到我的服务器时它响应错误:
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2016082422:deploy (default-cli) on project X: The output of /mfpadmin/management-apis/2.0/runtimes/mfp/adapters is of type text/html, which is unsupported. Expected an output of type text/xml or application/xml or application/json. -> [Help 1]
但是当我在 pom(mvn 依赖项)中删除番石榴时,我能够部署适配器。我看到的问题也发生在其他一些库上。有没有使用这些库的选项?
mfpdev -v: 8.0.0-2017012016
编辑:我终于通过在 pom 文件中设置番石榴的范围来解决问题:
<scope>provided</scope>
【问题讨论】:
-
你是如何将它添加到 pom.xml 中的?
-
通过 mvn 依赖。
<!-- https://mvnrepository.com/artifact/com.google.guava/guava --> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>21.0</version> </dependency>
标签: ibm-mobilefirst mobilefirst-adapters mobilefirst-cli