Build trouble

37 views
Skip to first unread message

Manfred Moser

unread,
Jan 5, 2011, 1:13:47 AM1/5/11
to robo...@googlegroups.com
Hi!

When doing my recent animation injection work I decided to also pull in the latest stuff in trunk. It turns out that for some reason the test project is no longer working for me. Since my branch is somewhat different since I already pulled in Guice 3 snapshot as dependency I checked out trunk again and in fact I get the same failure there.

Now in order to be able to run the build at all you have to upgrade the Maven Android Plugin version to 2.8.3 (if you are using a newish SDK setup at least). This is also in my branch but it would all have to be pulled in selectively.. 

Here is what I get when I then run a 

mvn clean install

[INFO] /opt/java/tools/android-sdk-mac_86/platform-tools/adb [shell, am, instrument, -w, roboguice.test/android.test.InstrumentationTestRunner]

roboguice.test.SafeAsyncTest:
Error in testCancel:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Error in testExceptionInDoInBackground:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Error in testExceptionInOnException:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Error in testExceptionInOnPreExecute:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Error in testExceptionInOnSuccess:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Error in testRoboAsyncTask:
java.lang.NoSuchMethodException: RoboGuiceTestApplication(Instrumentation)
        at java.lang.Class.getMatchingConstructor(Class.java:643)
        at java.lang.Class.getConstructor(Class.java:472)
        at roboguice.test.RoboUnitTestCase.runTest(RoboUnitTestCase.java:48)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
        at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

Test results for InstrumentationTestRunner=.E.E.E.E.E.E
Time: 0.991

FAILURES!!!
Tests run: 6,  Failures: 0,  Errors: 6


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

is anybody running the tests project regularly? Should we hook it all up together (I can easily do that..). I tried running the build with ant but also no luck. 

Any ideas? 

manfred

Michael Burton

unread,
Jan 7, 2011, 1:17:21 PM1/7/11
to robo...@googlegroups.com
Embarrassingly, it turns out i haven't run the tests recently. I'm trying to get them working now, but having compilation problems. I updated the tests/pom.xml to require maven-android-plugin 2.8.3, but i'm getting a missing dependency error for beanutils and asm

Ideas?

Mike

Missing:
----------
1) commons-beanutils:commons-beanutils:jar:1.7.0

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=commons-beanutils -DartifactId=commons-beanutils -Dversion=1.7.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=commons-beanutils -DartifactId=commons-beanutils -Dversion=1.7.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.jayway.maven.plugins.android.generation2:maven-android-plugin:maven-plugin:2.8.3
2) org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
3) org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4
4) commons-validator:commons-validator:jar:1.2.0
5) commons-beanutils:commons-beanutils:jar:1.7.0

2) asm:asm:jar:3.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=asm -DartifactId=asm -Dversion=3.2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=asm -DartifactId=asm -Dversion=3.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) com.jayway.maven.plugins.android.generation2:maven-android-plugin:maven-plugin:2.8.3
2) asm:asm:jar:3.2


--
http://about.me/michaelburton

> --
> You received this message because you are subscribed to the Google Groups "roboguice" group.
> To post to this group, send email to robo...@googlegroups.com.
> To unsubscribe from this group, send email to roboguice+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/roboguice?hl=en.

Manfred Moser

unread,
Jan 7, 2011, 2:39:26 PM1/7/11
to robo...@googlegroups.com
Are you running offline or something? These dependencies are available
in Maven central.

Also check your settings.xml for any repositories defined...

manfred

Michael Burton

unread,
Jan 7, 2011, 6:47:34 PM1/7/11
to robo...@googlegroups.com
Okay, try again with the latest, the broken testcases should be fixed now.

I used to have the testcases run daily as part of my continuous integration, but that doesn't seem to be the case. i'll file a bug to remind myself to fix it

--
http://about.me/michaelburton

Manfred Moser

unread,
Jan 7, 2011, 6:51:22 PM1/7/11
to robo...@googlegroups.com
Cool. I will pull this in later and try. Btw. you could add a top
level pom to the project that would build both in one go..

Manfred Moser

unread,
Jan 7, 2011, 6:59:20 PM1/7/11
to robo...@googlegroups.com
Could not resist and tried now. It does not work for me. Can you document on the wiki how you run the build so I can follow your exact steps? 

manfred

PS: maybe I just screwed up pull down or something.. 

Michael Burton

unread,
Jan 7, 2011, 7:05:57 PM1/7/11
to robo...@googlegroups.com
I just ran "mvn install" in the tests directory. No dice?

> 1 19:04 /Users/mike/Projects/roboguice $ cd tests
>
> 0 19:04 /Users/mike/Projects/roboguice/tests $ mvn install
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building AstroBoy
> [INFO] task-segment: [install]
> [INFO] ------------------------------------------------------------------------
> Downloading: http://repo1.maven.org/maven2/com/google/inject/guice/2.0-no_aop/guice-2.0-no_aop.pom
> [INFO] Unable to find resource 'com.google.inject:guice:pom:2.0-no_aop' in repository central (http://repo1.maven.org/maven2)
> [INFO] [android:generate-sources {execution: default-generate-sources}]
> [INFO] ANDROID-904-002: Found aidl files: Count = 0
> [INFO] ANDROID-904-002: Found aidl files: Count = 0
> [INFO] Copying local resource files to combined resource directory.
> [INFO] /opt/local/android-sdk-mac/platform-tools/aapt [package, -m, -J, /Users/mike/Projects/roboguice/tests/target/generated-sources/r, -M, /Users/mike/Projects/roboguice/tests/AndroidManifest.xml, -S, /Users/mike/Projects/roboguice/tests/target/generated-sources/combined-resources/res, -I, /opt/local/android-sdk-mac/platforms/android-1.5/android.jar]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /Users/mike/Projects/roboguice/tests/src/main/resources
> [INFO] skip non existing resourceDirectory /Users/mike/Projects/roboguice/tests/target/generated-sources/extracted-dependencies/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent!
> [INFO] Compiling 1 source file to /Users/mike/Projects/roboguice/tests/target/classes
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /Users/mike/Projects/roboguice/tests/target/tests-0.1-SNAPSHOT.jar
> [INFO] [android:unpack {execution: default-unpack}]
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /Users/mike/Projects/roboguice/tests/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [android:dex {execution: default-dex}]
> [INFO] /opt/local/android-sdk-mac/platform-tools/dx [--dex, --output=/Users/mike/Projects/roboguice/tests/target/classes.dex, /Users/mike/Projects/roboguice/tests/target/android-classes]
> [INFO] [android:apk {execution: default-apk}]
> [INFO] Copying local resource files to combined resource directory.
> [INFO] /opt/local/android-sdk-mac/platform-tools/aapt [package, -f, -M, /Users/mike/Projects/roboguice/tests/AndroidManifest.xml, -S, /Users/mike/Projects/roboguice/tests/target/generated-sources/combined-resources/res, -I, /opt/local/android-sdk-mac/platforms/android-1.5/android.jar, -F, /Users/mike/Projects/roboguice/tests/target/tests-0.1-SNAPSHOT.ap_]
> [INFO] [android:internal-pre-integration-test {execution: default-internal-pre-integration-test}]
> [INFO] /opt/local/android-sdk-mac/platform-tools/adb [install, -r, /Users/mike/Projects/roboguice/tests/target/tests-0.1-SNAPSHOT.apk]
> [INFO] 491 KB/s (169385 bytes in 0.336s)
> pkg: /data/local/tmp/tests-0.1-SNAPSHOT.apk
> Success
> [INFO] [android:internal-integration-test {execution: default-internal-integration-test}]
> [INFO] /opt/local/android-sdk-mac/platform-tools/adb [shell, am, instrument, -w, roboguice.test/android.test.InstrumentationTestRunner]
>
> roboguice.test.SafeAsyncTest:......
> Test results for InstrumentationTestRunner=......
> Time: 8.435
>
> OK (6 tests)
>
>
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /Users/mike/Projects/roboguice/tests/target/tests-0.1-SNAPSHOT.apk to /Users/mike/.m2/repository/roboguice/tests/0.1-SNAPSHOT/tests-0.1-SNAPSHOT.apk
> [INFO] Installing /Users/mike/Projects/roboguice/tests/target/tests-0.1-SNAPSHOT.jar to /Users/mike/.m2/repository/roboguice/tests/0.1-SNAPSHOT/tests-0.1-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 43 seconds
> [INFO] Finished at: Fri Jan 07 19:05:42 EST 2011
> [INFO] Final Memory: 50M/123M
> [INFO] ------------------------------------------------------------------------
>
> 0 19:05 /Users/mike/Projects/roboguice/tests $


--
http://about.me/michaelburton

Manfred Moser

unread,
Jan 7, 2011, 7:11:42 PM1/7/11
to robo...@googlegroups.com
Nope. I just build it in the roboguice folder with

mvn clean install

and then run the test with

mvn clean install

What sort of emulator are you running?

I will have to look at this later (or next week). Something is screwy..

manfred

Manfred Moser

unread,
Jan 7, 2011, 7:14:20 PM1/7/11
to robo...@googlegroups.com
Okay... I did a fresh checkout and build and now it works. Need to see how I screwed up my branch. Thanks a lot.

manfred

Michael Burton

unread,
Jan 7, 2011, 7:16:20 PM1/7/11
to robo...@googlegroups.com
No problem. Incidentally, any pointers to how I create a top-level pom? I've tried various things but they all seem to be broken in various ways.

I have an intense love/hate relationship with maven. But I did get intellij reading my roboguice poms properly today, so that was a win!

--
http://about.me/michaelburton


On Jan 7, 2011, at 7:14 PM, Manfred Moser wrote:

> Okay... I did a fresh checkout and build and now it works. Need to see how I screwed up my branch. Thanks a lot.
>
> manfred
>

Manfred Moser

unread,
Jan 7, 2011, 7:25:09 PM1/7/11
to robo...@googlegroups.com
I saw you checked in the iml files again ;-)

Let me make a top level pom that builds all three subprojects in my
branch. Just give me a few days to get around to it.

manfred

Michael Burton

unread,
Jan 7, 2011, 7:40:33 PM1/7/11
to robo...@googlegroups.com
Ah, I hadn't really meant to check those in. I've just removed them from the project and added them to .hgignore. The pom's will now be the only files we use to manage dependencies.

--
http://about.me/michaelburton

Manfred Moser

unread,
Jan 10, 2011, 3:07:07 AM1/10/11
to robo...@googlegroups.com
I have now added an aggregator pom into my clone that builds the library and then the tests (and runs them). The tests need a running emulator to succeed.

I have not done any more tying together of the library and tests project to keep it simple for now. We could also tie astroboy into this but due to my nullable problem it does not compile so I have commented that out for now. I have also added automatic deployment for astroboy in the install phase.

I have upgraded to Guice 3.0 RC 2 that hit Maven Central today and could therefore removed the sonatype forge repo as well.

I have also removed the reporting section since that is not used anymore in Maven 3 and we wont need it in this form anyway since we are going to upload a bundle to maven central. (and that will contain sources and javadoc).

I have also actually tested the bundle creation and it works nicely.

Try it with 
cd roboguice
mvn source:jar javadoc:jar repository:bundle-create

In terms of the javadoc you can create it manually with 

mvn javadoc:javadoc 

if you want.

I hope you will pull some of this stuff up ;-)

manfred


Michael Burton

unread,
Jan 10, 2011, 10:36:00 AM1/10/11
to robo...@googlegroups.com
Thanks Manfred!  It's funny, I tried pretty much exactly what you did, but I mistakenly thought it didn't work because the defaultGoal didn't behave the way I expected.  I thought it would just call the default goals in the modules, but now I see that isn't the case.

We can use org.roboguice for the maven groupId.  I also posted a roadmap sketch on the wiki.  I'm going to try to get 1.1 out here very soon, and will target guice3 and maven3 for 1.2.

Manfred Moser

unread,
Jan 10, 2011, 11:53:44 AM1/10/11
to robo...@googlegroups.com
Great.

So we aim to push out to maven central with 1.1 already or only for 1.2?

Also in terms of groupId .. can you do the refactor to org.roboguice
in your upstream repo since it will move all source files around as
well and would be a pain to pull up.. oh and do you own roboguice.org
yet? Should probably get it..

manfred

Reply all
Reply to author
Forward
0 new messages