一个android项目的maven archetype

时间:2021-10-05 10:42:54

The following options are listed on a maven archetype:generate

maven原型上列出了以下选项:generate

19: remote -> android-quickstart (-)
20: remote -> android-release (-)
21: remote -> android-with-test (-)

There is one more plugin available at http://code.google.com/p/maven-android-plugin/

http://code.google.com/p/maven-android-plugin/还提供了一个插件

What would be the right archetype / plug-in to use for Android 3.1 application development?

什么是用于Android 3.1应用程序开发的正确的原型/插件?

1 个解决方案

#1


15  

The archetype to use depends on the size and purpose of your project. The different archetypes are similar to creating regular Android projects where:

要使用的原型取决于项目的大小和目的。不同的原型类似于创建常规Android项目,其中:

  • quickstart creates something similar to an Android application project but does not create any tests.
  • quickstart创建类似于Android应用程序项目的东西,但不创建任何测试。
  • with-test is similar to creating an Android application project and a corresponding test project
  • with-test类似于创建Android应用程序项目和相应的测试项目
  • project release - expands the with-test archetype and also supplies tools to let maven help out with zipalign, proguard and signing of your application
  • 项目发布 - 扩展with-test原型,并提供工具让maven帮助你使用zipalign,proguard和签名你的应用程序

For anything relatively complex I would recommend going with the release configuration even though it requires some extra settings since it manages all stages of building, testing and releasing. For prototyping or minor projects the quick-start archetype may be sufficient. With-test can be used if you want to maintain more manual control of the release process but still want a maven managed test project.

对于任何相对复杂的东西,我建议使用发布配置,即使它需要一些额外的设置,因为它管理构建,测试和发布的所有阶段。对于原型设计或小型项目,快速启动原型可能就足够了。如果您希望保持对发布过程的更多手动控制但仍需要maven托管测试项目,则可以使用With-test。

If this is the first time you are using the Maven Android plugin I would suggest creating a small experimental project with the quick-start archetype to get the feel for it. Then use a release type project for your application.

如果这是您第一次使用Maven Android插件,我建议您使用快速启动原型创建一个小型实验项目,以获得它的感觉。然后为您的应用程序使用发布类型项目。

#1


15  

The archetype to use depends on the size and purpose of your project. The different archetypes are similar to creating regular Android projects where:

要使用的原型取决于项目的大小和目的。不同的原型类似于创建常规Android项目,其中:

  • quickstart creates something similar to an Android application project but does not create any tests.
  • quickstart创建类似于Android应用程序项目的东西,但不创建任何测试。
  • with-test is similar to creating an Android application project and a corresponding test project
  • with-test类似于创建Android应用程序项目和相应的测试项目
  • project release - expands the with-test archetype and also supplies tools to let maven help out with zipalign, proguard and signing of your application
  • 项目发布 - 扩展with-test原型,并提供工具让maven帮助你使用zipalign,proguard和签名你的应用程序

For anything relatively complex I would recommend going with the release configuration even though it requires some extra settings since it manages all stages of building, testing and releasing. For prototyping or minor projects the quick-start archetype may be sufficient. With-test can be used if you want to maintain more manual control of the release process but still want a maven managed test project.

对于任何相对复杂的东西,我建议使用发布配置,即使它需要一些额外的设置,因为它管理构建,测试和发布的所有阶段。对于原型设计或小型项目,快速启动原型可能就足够了。如果您希望保持对发布过程的更多手动控制但仍需要maven托管测试项目,则可以使用With-test。

If this is the first time you are using the Maven Android plugin I would suggest creating a small experimental project with the quick-start archetype to get the feel for it. Then use a release type project for your application.

如果这是您第一次使用Maven Android插件,我建议您使用快速启动原型创建一个小型实验项目,以获得它的感觉。然后为您的应用程序使用发布类型项目。