使用maven android原型与eclipse [英] Using maven android archetype with eclipse

查看:96
本文介绍了使用maven android原型与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

谢谢

推荐答案


  1. 安装 m2eclipse 插件

  2. 创建新的maven项目

  3. 下一个按钮带您进行原型选择

  4. 可选择配置原型目录,对于这个原型(android-release)不应该是必需的,因为最新版本1.0.5在中央的maven repo中。

  5. next,next,下一个...

  1. Install m2eclipse plugin
  2. create new maven project
  3. next button takes you to archetype selection
  4. 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.
  5. next, next, next ...

更新:

以下:


  1. 下载 http://repo1.maven.org/maven2/archetype-catalog.xml 将其另存为user-home / .m2 / central -archetype-catalog.xml

  2. 在eclipse中创建新的maven项目

  3. 下一步按钮

  4. 配置目录,将新的本地目录点添加到在步骤1中创建的文件

  5. ,关闭目录配置对话框后,确保下拉列表选择器位于所有目录或新的本地目录上您只需在过滤器类型android-release中定义


  6. 选择android-release原型,然后单击下一步

  7. 输入您选择的group-id和artifact-id

  1. download http://repo1.maven.org/maven2/archetype-catalog.xml save it as user-home/.m2/central-archetype-catalog.xml
  2. in eclipse create new maven project
  3. next button
  4. configure catalogs, add new local catalog point to file created in step 1.
  5. 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
  6. in the filter type 'android-release'
  7. select the android-release archetype and click next
  8. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆