[ 
https://issues.jenkins-ci.org/browse/JENKINS-12821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159285#comment-159285
 ] 

Richard Mortimer commented on JENKINS-12821:
--------------------------------------------

So I decided to investigate this a bit more and took the radical step of 
setting -Dandroid.device=emulator in my Jenkins maven commandline. The good(!) 
news is I get the same error here plus I've got a build environment setup for 
android-maven-plugin so I should be able to dig a little deeper over the next 
couple of days.

For the record I get the following stack trace with plugin a-m-p 3.1.1 (get 
similar with 3.0.0 too).

{code}
[INFO] Waiting for initial device list from the Android Debug Bridge
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter set to emulator

...snip...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:01.522s
[INFO] Finished at: Mon Feb 20 15:20:59 GMT 2012
[INFO] Final Memory: 15M/495M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
message : Failed to execute goal 
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:internal-pre-integration-test
 (default-internal-pre-integration-test) on project mobilemax-it: No device 
found for android.device=emulator
cause : No device found for android.device=emulator
Stack trace : 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:internal-pre-integration-test
 (default-internal-pre-integration-test) on project mobilemax-it: No device 
found for android.device=emulator
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at 
org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
        at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:104)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:287)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.maven.plugin.MojoExecutionException: No device found for 
android.device=emulator
        at 
com.jayway.maven.plugins.android.AbstractAndroidMojo.doWithDevices(AbstractAndroidMojo.java:602)
        at 
com.jayway.maven.plugins.android.AbstractAndroidMojo.undeployApk(AbstractAndroidMojo.java:644)
        at 
com.jayway.maven.plugins.android.AbstractAndroidMojo.undeployApk(AbstractAndroidMojo.java:628)
        at 
com.jayway.maven.plugins.android.AbstractAndroidMojo.deployDependencies(AbstractAndroidMojo.java:538)
        at 
com.jayway.maven.plugins.android.phase11preintegrationtest.InternalPreIntegrationTestMojo.execute(InternalPreIntegrationTestMojo.java:36)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 27 more
{code}

                
> android.device 
> ---------------
>
>                 Key: JENKINS-12821
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12821
>             Project: Jenkins
>          Issue Type: Bug
>          Components: android-emulator
>    Affects Versions: current
>            Reporter: Sebastian Schefczyk
>            Assignee: Christopher Orr
>            Priority: Minor
>
> The following configuration of the android-maven-plugin will not find the 
> running emulator on Jenkins.
> Commenting this line will find the emulator.
> On my local machine this is working fine, but not in Jenkins.
> Both machines use maven 3.0.4 on Linux/Ubuntu.
> <groupId>com.jayway.maven.plugins.android.generation2</groupId>
> <artifactId>android-maven-plugin</artifactId>
> <configuration>
>    ...
>   <device>emulator</device>
>    ...
> </configuration>
> </plugin>
> This configuration is useful on the local machine, if you are developing 
> while charging your phone via USB.
> Best regards, that's a really nice plugin!
>  Sebl29

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to