2

I am trying to run the official HelloFlashlight sample provided by the android-maven-plugin, but Eclipse displays this error.

Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:consume-aar (execution: default-consume-aar, phase: compile)

Here is what I did.

  1. Create the HelloFlashlight project in Eclipse
  2. "Configure / Convert to Maven Project"

I tried using mvn eclipse:eclipse, but I learned that it was not a good idea.

I added the XML snippet provided in another SO answer, but all I got was a new error (in addition to the previous one).

Execution default-apk of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:apk failed: Unable to load the mojo 'apk' (or one of its required components) from the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2' (com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:apk:default-apk:package)

I am missing something?

My configuration:

  • Eclipse Kepler Service Release 1 (Build id: 20130919-0819)
  • m2e - Maven Integration for Eclipse - 1.4.0.20130601-0317
  • Android Development Tools - 22.3.0.v201310242005-887826
  • Android Configurator for M2E - 0.4.3
Community
  • 1
  • 1
lacton
  • 2,316
  • 2
  • 22
  • 24

1 Answers1

0

Looks like you need to add mojo as a dependency

this might help:

http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-custom-plugin.html#writing-plugins-simple-java-mojo

taken from:

https://github.com/jayway/maven-android-plugin-samples/tree/master/helloflashlight

or this tutorial might help:

http://www.androidhive.info/2013/04/android-developing-flashlight-application/

Lee
  • 273
  • 2
  • 20
  • While this answer may theoretically answer the question, [it is better](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the links for reference. – hichris123 Feb 11 '14 at 23:27
  • The issue is only with Eclipse. Running `mvn install android:deploy android:run` from the command line works fine. – lacton Feb 15 '14 at 11:15