简体   繁体   English

无法在Eclipse中的maven项目中添加camel archetype

[英]Unable to add camel archetype in a maven project in Eclipse

I am using Eclipse ( Kepler Service Release 1 ). 我正在使用Eclipse( Kepler Service Release 1 )。 I tried to create a New Maven Project and in Filter tried to locate the camel archetype. 我试图创建一个New Maven Project并在Filter中尝试找到camel原型。 Since it was not there I clicked on Add Archetype and tried to add the camel-archetype-java and used the following values, 由于它不存在,我点击Add Archetype并尝试添加camel-archetype-java并使用以下值,

groupId:org.apache.camel.archetypes
artifactId:camel-archetype-java
version:2.12.1
URL:http://mvnrepository.com/artifact

After using the above values and clicking ok, I am getting the below exception 使用上面的值并单击确定后,我得到以下异常

Can't resolve Archetype org.apache.camel.archetypes:camel-archetype-java:2.12.1
org.eclipse.core.runtime.CoreException: Could not resolve artifact 

Request help. 请求帮助。

Your Maven repository URL is wrong. 您的Maven存储库URL错误。 Use the Remote Maven Default repository at http://repo1.maven.org/maven2/archetype-catalog.xml . 使用http://repo1.maven.org/maven2/archetype-catalog.xml上的Remote Maven Default存储库。 You can add or change repositories in the "Select an Archetype" dialogues. 您可以在“选择原型”对话框中添加或更改存储库。 Choose "Configure..." and edit an existing catalog or add a new one with the URL given above. 选择“配置...”并编辑现有目录或使用上面给出的URL添加新目录。

Best way i found it is to add a new remote catalog. 我发现它的最佳方式是添加一个新的远程目录。 Open Eclipse ->Window -> Preferences -> Maven -> Archetypes. 打开Eclipse - > Window - > Preferences - > Maven - > Archetypes。 Add a new remote catalog using the file : http://repo1.maven.org/maven2/archetype-catalog.xml 使用以下文件添加新的远程目录: http//repo1.maven.org/maven2/archetype-catalog.xml

This will add to you IDE all the updated catalogs including the one you need them for Camel. 这将为IDE添加所有更新的目录,包括Camel所需的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM