maven - 无法将 Google Cloud Datastore 与 AEM 6.5 连接:Bundle 已解决依赖项
问题描述
我需要从 AEM 连接谷歌云数据存储。我在 main pom 和 core pom 中添加了依赖项。
主 POM
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>16.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>de here
核心 POM
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
</dependency>
当我部署时,我的包处于 insatlled 状态并出现以下错误
com.google.auth -- Cannot be resolved
com.google.auth.oauth2 -- Cannot be resolved
com.google.cloud -- Cannot be resolved
com.google.cloud.datastore -- Cannot be resolved
解决方案
尝试将这些库添加到 POM 中的嵌入依赖项中。还要检查您的库是否在生成的 .jar 文件中。
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!-- <Embed-Dependency> artifactId1, artifactId2;inline=true </Embed-Dependency> -->
<Export-Package>we.retail.core.model*</Export-Package>
<Private-Package>we.retail.core*</Private-Package>
<Sling-Model-Packages>
we.retail.core.model
</Sling-Model-Packages>
</instructions>
</configuration>
</plugin>
在嵌入中,您可以尝试以下操作:google-cloud-datastore
希望你能找到答案
推荐阅读
- swift - 使用什么方法代替 Auth.auth().signInAndRetrieveData?
- sql-server - 找到点的最远距离
- rest - 如何使用 jaspersoft rest api 社区版获取级联依赖值?
- wordpress - WooCommerce 中的购物车总数是否为 0 时未显示付款方式
- android - Android ConstraintLayout - 当有足够的空间时将视图定位到中心并在必要时移动到边缘
- php - 如何仅在 WooCommerce REST-API 产品端点中查询产品名称?
- javascript - moment.js 是否允许我从这个字符串“(GMT-10:00) Hawaii”派生时区缩写?
- php - Yii2 - 如何根据名称调用 ActiveRecord 方法
- mysql - MySQL同时复合主键和外键
- java - 如何使用带有可分页的 mongorepository 修复转换错误