如何解决这些AWS导入? [英] How can I resolve these AWS imports?
问题描述
在我的pom.xml中,我有这个:
In my pom.xml I have this:
<instructions>
<Embed-Transitive>true</Embed-Transitive>
<Export-Package>
com.amazonaws.HttpMethod,
com.amazonaws.services.s3.*
</Export-Package>
<Embed-Dependency>
gson,
aws-java-sdk,
jackson-core
</Embed-Dependency>
...
作为依赖项,我有这些:
And as dependencies I have these:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.11.115</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<version>1.11.115</version>
</dependency>
当我使用mvn clean install
构建.jar并将其上传到AEM时,会看到以下内容:
When I build my .jar with mvn clean install
and upload it to AEM I see this:
所有这些无法解决的红色额外"包装是什么,我该如何解决?
What are all these "extra" packages in red that it can't resolve, and how can I resolve them?
在构建并将程序包上传到AEM之前,如何防止这种情况发生?
How can I prevent this from happening BEFORE I build and upload a package to AEM?
推荐答案
红色的包是您在使用Java import
的类中导入的包.这些导入源的依赖项需要嵌入到<Embed-Dependency>
中的pom中.另外,您可以安装一个AEM捆绑包,该捆绑包可以导出那些软件包,以便解决捆绑包的导入问题.
The packages in red are packages you've imported in you're classes with java import
. the dependencies from which those imports come from need to be embedded in your pom in that <Embed-Dependency>
. Alternatively, You can install an AEM bundle that exports those packages in order for your bundle imports to be resolved.
这篇关于如何解决这些AWS导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!