使用Maven Android的原型,用eclipse [英] Using maven android archetype with eclipse
问题描述
我尝试使用下面的原型。 <一href="https://github.com/akquinet/android-archetypes/wiki/Android-release-archetype">https://github.com/akquinet/android-archetypes/wiki/Android-release-archetype
我可以按照页面上的细的说明(使用终端)
我在想,我怎么做到这一点在Eclipse?有没有一种命令行界面,我可以输入所需的命令呢?
即
MVN原型:生成\
-DarchetypeArtifactId =机器人释放\
-DarchetypeGroupId = de.akquinet.android.archetypes \
-DarchetypeVersion = 1.0.5 \
-DgroupId = com.foo.bar \
-DartifactId =我,机器人项目\
-Dpackage = com.foo.bar.android
感谢
- 在安装 m2eclipse的插件
- 创建新Maven项目
- 在接下来的按钮将原型的选择
- 在选择配置的原型目录,应该没有必要为这个原型(Android的版本),作为最新版本1.0.5在中央Maven回购。
- 下一步,下一步,下一个...
更新:
要得到它的工作我做了以下内容:
- 下载<一个href="http://repo1.maven.org/maven2/archetype-catalog.xml">http://repo1.maven.org/maven2/archetype-catalog.xml其保存为用户家庭/ .m2目录/中央原型-的catalog.xml
- 在Eclipse中创建新Maven项目
- 下一个按钮
- 在配置目录,添加新的本地目录指向文件在步骤1中创建。
- 关闭目录的配置对话框后,请确保下拉目录选择器上的所有目录或在新的本地目录您刚才定义的
- 在过滤式的Android版本
- 选择Android的版本原型,然后单击下一步
- 输入您选定的组ID和工件-ID
我也注意到一个问题,据悉,该项目目录不能被重命名。
该项目已在磁盘上创建的,所以我使用
导入到日食
导入>的Maven>现有Maven项目
I am trying to use the following archetype. https://github.com/akquinet/android-archetypes/wiki/Android-release-archetype
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
Thanks
- 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 ...
Update:
To get it working I did the following:
- 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
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屋!