Android-Maven + Eclipse (ADT)

2 views
Skip to first unread message

Ognen Ivanovski

unread,
Apr 17, 2008, 8:10:31 AM4/17/08
to Android-Maven
Is this possible:

I tried setting up the project using standard maven layout (as shown
in the sample) but I am having trouble maken eclpse (ADT) play along.

I constantly get this message in Eclipse:

ERROR: resource directory '/root/workspace/android/res' does not
exist.

(/root/workspace being my workspace and android is the name of the
project)

Charlie Collins

unread,
Apr 17, 2008, 2:30:19 PM4/17/08
to Android-Maven
Did you run mvn eclipse:eclipse and then import your project (or
update your project after doing that)?

It should work, I use the sample and several other projects from
Eclipse and from command line.

One thing to note, there seems to be a bug either with this plugin, or
with the Eclipse plugin, when using the custom apk packaging and
generating the eclipse files. Set the packaging to "jar" to run
eclipse:eclipse, and then change it back to apk.

http://android-maven.googlecode.com/svn/android-maven-sample/trunk/pom.xml

Charlie Collins

unread,
Apr 17, 2008, 2:42:04 PM4/17/08
to Android-Maven
Actually, I take it back, depending on what you are trying to do.

What I have done is use Maven and the command line for my "Android"
stuff, launching the emulator, compiling R, etc. I do edit files in
Eclipse, but my Eclipse projects are actually not "Android Eclipse"
projects, they are just Java Projects. That is to say when I
"convert" my Eclipse Java projects to Android projects, I do get
errors about missing stuff (missing AndroidManifest.xml is what I
get).

I don't think the Android Eclipse plugin is smart enough at this point
to deal with non standard layouts, even when the Eclipse project does
work fine with a different layout (meaning Eclipse can handle it when
it's just a Java project, but when converted to an Android project it
has problems).

If you want to use the Android Eclipse plugin tools inside Eclipse, as
an Android Eclipse project, then you probably won't be able to use
this plugin (or you might be able to reset the project layout for
Maven, using the POM, to match what Android Eclipse wants - I haven't
tried that yet).

The main reason I wrote this plugin was for command line builds and
usage (a continuous integration server to be able to do my Android
builds), not really for integration with the IDE - though I do admit
that is a worthy goal, if one plugin could do BOTH, work on command
line and as an Eclipse Android project (just haven't even gotten into
that myself).



On Apr 17, 2:30 pm, Charlie Collins <charlie.coll...@gmail.com> wrote:
> Did you run mvn eclipse:eclipse and then import your project (or
> update your project after doing that)?
>
> It should work, I use the sample and several other projects from
> Eclipse and from command line.
>
> One thing to note, there seems to be a bug either with this plugin, or
> with the Eclipse plugin, when using the custom apk packaging and
> generating the eclipse files.  Set the packaging to "jar" to run
> eclipse:eclipse, and then change it back to apk.
>
> http://android-maven.googlecode.com/svn/android-maven-sample/trunk/po...
Reply all
Reply to author
Forward
0 new messages