I am developing an Android library ( SiriRestClient ), whose artifacts are managed through Maven, and I use Eclipse for development, I collect artifacts as a JAR file, since I have no assets in the project, only Java classes, and there are problems with packing artifacts like apklibs with Eclipse / Maven / ADT .
I am also developing an application for the Android user interface ( SiriRestClientUI ), which depends on the SiriRestClient library. I manage the SiriRestClient library dependency through Maven.
Both projects build and deploy perfectly independently in Eclipse.
PROBLEM:
Since I started managing the SiriRestClientUI dependency on SiriRestClient library through Maven, if I have a library project and SiriRestClientUI that opens at the same time in Eclipse, I get a NoClassDefFoundError when I try to deploy the SiriRestClientUI application to the device.
For instance:
11-01 16:11:52.288: E/AndroidRuntime(9409): java.lang.NoClassDefFoundError: edu.usf.cutr.siri.android.client.config.SiriJacksonConfig 11-01 16:11:52.288: E/AndroidRuntime(9409): at edu.usf.cutr.siri.android.ui.MainActivity.onCreate(MainActivity.java:100) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.Activity.performCreate(Activity.java:4470) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.ActivityThread.access$600(ActivityThread.java:128) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.os.Handler.dispatchMessage(Handler.java:99) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.os.Looper.loop(Looper.java:137) 11-01 16:11:52.288: E/AndroidRuntime(9409): at android.app.ActivityThread.main(ActivityThread.java:4514) 11-01 16:11:52.288: E/AndroidRuntime(9409): at java.lang.reflect.Method.invokeNative(Native Method) 11-01 16:11:52.288: E/AndroidRuntime(9409): at java.lang.reflect.Method.invoke(Method.java:511) 11-01 16:11:52.288: E/AndroidRuntime(9409): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 11-01 16:11:52.288: E/AndroidRuntime(9409): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 11-01 16:11:52.288: E/AndroidRuntime(9409): at dalvik.system.NativeStart.main(Native Method)`
This is a serious annoyance during the simultaneous development of the library and the application, since the only workaround I found was to edit the library code, build the library project, close the library project and then execute the SiriRestClientUI application.
I think the problem is with how Eclipse / Maven handles Maven dependencies when the library project is open.
Here is an Eclipse screenshot showing the SiriRestClientUI project when the library project (SiriRestClient, above it) is CLOSED:

You can see the sirirestclient-1.0.0-SNAPSHOT.jar file in the "Maven Dependencies" section, which is pulled from my local Maven repository, and this is what I want. In this configuration, everything is working fine.
However, when I OPEN the SiriRestClient library project, my "Maven Dependencies" entries change and the JAR file disappears and the project folder is displayed instead:

If I try to start SiriRestClientUI when both projects are open, I get a NoClassDefFoundError . Thus, it seems that Eclipse redirects the assembly of the project, and the library classes are not included.
QUESTION:
How to configure Eclipse / Maven so that it always relies on a JAR file in the local Maven repository instead of switching the Maven dependency to the local project?
Or is there another way to get rid of NoClassDefFoundError with this configuration?
The pom.xml file for the library project is here .
The pom.xml file for the SiriRestClientUI application project is here .