我从这个问题开始已经很久了.我正在通过Adobe项目工作,我无法传递这个命令,而且大部分工作都是由它构建的。
mvn archetype:generate \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=18我已经在VPN和off上尝试过了,使用了所有可能的代理吐露,但是仍然得到了相同的错误
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.adobe.granite.archetypes:aem-project-archetype:18)多次删除和重新安装。不同的网络和代理也透露了Mac。
mvn -v返回
Maven home: /Users/dmills/Applications/apache-maven-3.6.1
Java version: 1.8.0_212, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.5", arch: "x86_64", family: "mac"得到这个错误
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.adobe.granite.archetypes:aem-project-archetype:18)建设失败了,我不知道现在该去哪里
发布于 2019-05-24 21:26:32
错误指示没有配置包含要使用的原型的Maven存储库。默认Maven安装不知道包含原型的Adobe存储库。您必须配置存储库。
通常,您应该为您的AEM项目使用以下存储库:
http://repo.adobe.com/nexus/content/groups/public这个存储库包含您想要使用的原型:
根据文档(请参阅下面的链接),这将是一个最小的Maven settings.xml,允许您使用AEM原型:
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>adobe-public</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
<releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
<releaseRepository-URL>http://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL>
</properties>
<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Basel Public Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<name>Adobe Basel Public Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings> 注意:我将activeByDefault设置为true作为adobe-public配置文件。这样,您就不需要在命令行上传递-Padobe-public来激活配置文件。
现在,如果您运行以下命令,您应该能够使用原型:
mvn archetype:generate \
-DarchetypeGroupId=com.adobe.granite.archetypes \
-DarchetypeArtifactId=aem-project-archetype \
-DarchetypeVersion=18链接
https://helpx.adobe.com/experience-manager/kb/SetUpTheAdobeMavenRepository.html
发布于 2019-05-26 16:05:42
在Adobe中,缺少了“设置”xml标记:
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
.....
</profile>
</profiles>
</settings> 发布于 2019-05-29 06:39:23
只需更新settings.xml文件夹中的m2文件即可。如果您使用archtype 13和6.4,请查看下面的链接
另外,在配置文件标签中,请将更新为'https‘而不是http。
https://stackoverflow.com/questions/56298294
复制相似问题