我使用了maven archetype10,如下所示,并创建了项目结构,一切都很好。
mvn archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=10 -DarchetypeRepository=https://repo.adobe.com/nexus/content/groups/public/现在,我想添加aem jar依赖项,并分别在项目pom.xml和核心模块pom.xml中添加以下依赖标记,并且我的存储库标记与https://repo.adobe.com/相同。
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.2.0</version>
<scope>provided</scope>
</dependency>在我编译时添加了上面的依赖标签之后,它就会给出下面的错误。
未能在项目com.krishh.example:aemexample.core:bundle:0.1:上执行目标:无法解决项目aemexample.core的依赖关系,无法将工件com.adcor.aem:uber-jar:jar:6.2.0从/到adobe releases (http://repo.adobe.com/nexus/content/groups/public):证书中的主机名不匹配:
<repo.adobe.com>!=<devedge.day.com>或<devedge.day.com>->帮助1
是否缺少任何东西来添加额外的依赖项以成功编译和运行此文件。
发布于 2017-03-11 15:36:31
在依赖关系中,您似乎缺少了一个分类器。尝试为AEM添加一个,如文件中的建议。这将帮助Maven在存储库中找到必要的JAR:
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.2.0</version>
<classifier>apis</classifier>
<scope>provided</scope>
</dependency>如果这没有帮助,您也应该查看证书警告。有关这个主题的更多信息,请查看这个问题的答案。
TL;DR -可能的原因可能是:
https://stackoverflow.com/questions/42731492
复制相似问题