使用Maven Android的原型,用eclipse [英] Using maven android archetype with eclipse

查看:87
本文介绍了使用Maven Android的原型,用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
 

感谢

解决方案
  1. 在安装 m2eclipse的插件
  2. 创建新Maven项目
  3. 在接下来的按钮将原型的选择
  4. 在选择配置的原型目录,应该没有必要为这个原型(Android的版本),作为最新版本1.0.5在中央Maven回购。
  5. 下一步,下一步,下一个...

更新:

要得到它的工作我做了以下内容:

  1. 下载<一个href="http://repo1.maven.org/maven2/archetype-catalog.xml">http://repo1.maven.org/maven2/archetype-catalog.xml其保存为用户家庭/ .m2目录/中央原型-的catalog.xml
  2. 在Eclipse中创建新Maven项目
  3. 下一个按钮
  4. 在配置目录,添加新的本地目录指向文件在步骤1中创建。
  5. 关闭目录的配置对话框后,请确保下拉目录选择器上的所有目录或在新的本地目录您刚才定义的
  6. 在过滤式的Andr​​oid版本
  7. 选择Android的版本原型,然后单击下一步
  8. 输入您选定的组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

解决方案

  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 ...

Update:

To get it working I did the following:

  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

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天全站免登陆