使用maven android原型与eclipse [英] Using maven android archetype with eclipse
问题描述
我正在尝试使用以下原型。
https://github.com/akquinet/android-archetypes / wiki / Android-release-archetype
I am trying to use the following archetype. https://github.com/akquinet/android-archetypes/wiki/Android-release-archetype
我可以按照网页上的说明(使用终端)
我是想知道,我该如何在Eclipse中这样做?有没有一种命令行界面我可以输入所需的命令?
ie
I can follow the instructions on the page fine (using the terminal)
I was wondering, how do I do this in Eclipse? Is there a sort of command line interface I can input the required commands?
i.e
mvn archetype:generate \
-DarchetypeArtifactId=android-release \
-DarchetypeGroupId=de.akquinet.android.archetypes \
-DarchetypeVersion=1.0.5 \
-DgroupId=com.foo.bar \
-DartifactId=my-android-project \
-Dpackage=com.foo.bar.android
谢谢
推荐答案
- 安装 m2eclipse 插件
- 创建新的maven项目
- 下一个按钮带您进行原型选择
- 可选择配置原型目录,对于这个原型(android-release)不应该是必需的,因为最新版本1.0.5在中央的maven repo中。
- next,next,下一个...
- Install m2eclipse plugin
- create new maven project
- next button takes you to archetype selection
- optionally configure archetype catalogues, shouldn't be necessary for this archetype (android-release), as the latest version 1.0.5 is in the central maven repo.
- next, next, next ...
更新:
以下:
- 下载 http://repo1.maven.org/maven2/archetype-catalog.xml 将其另存为user-home / .m2 / central -archetype-catalog.xml
- 在eclipse中创建新的maven项目
- 下一步按钮
- 配置目录,将新的本地目录点添加到在步骤1中创建的文件
- ,关闭目录配置对话框后,确保下拉列表选择器位于所有目录或新的本地目录上您只需在过滤器类型android-release中定义
- 选择android-release原型,然后单击下一步
- 输入您选择的group-id和artifact-id
- download http://repo1.maven.org/maven2/archetype-catalog.xml save it as user-home/.m2/central-archetype-catalog.xml
- in eclipse create new maven project
- next button
- configure catalogs, add new local catalog point to file created in step 1.
- after closing the catalog configuration dialog, make sure that the drop-down catalog selector is on all catalogs or on the new local catalog that you just defined
- in the filter type 'android-release'
- select the android-release archetype and click next
- enter your selected group-id and artifact-id
我注意到一个问题报告说,项目目录不能重命名。
该项目已在磁盘上创建,因此我使用
导入到eclipse导入> Maven>现有的maven项目
I did notice a problem reported that the project directory could not be renamed.
The project had been created on disk, so I imported it into eclipse using
Import > Maven > Existing maven projects
这篇关于使用maven android原型与eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!