我有一个从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>当我部署时,我的捆绑包处于不饱和状态,并具有以下错误
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发布于 2021-03-01 07:45:48
尝试将这些库添加到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
还要注意您正在使用的导入类型。

希望你能找到答案
发布于 2021-03-03 04:07:37
如果不需要它们,请将它们从<Import-Packages>中排除
<Import-Package>
!com.google.auth.*,
*
</Import-Package>https://stackoverflow.com/questions/66310185
复制相似问题