Android Source Directory Configuration

725 views
Skip to first unread message

Chander Pechetty

unread,
Jul 29, 2009, 12:19:32 PM7/29/09
to Maven Android Developers
Changing the default android directory source to what maven expects is
an additional step for the developer when you can configure Maven to
use a different source directory. I know -"Do not bend the default
Maven conventions" theory.

Will the soon to be build plugin with tighter eclipse integration have
this feature or a way to convert/mavenize existing projects to the way
Maven expects.

Thanks
Chander

Hugo Josefson

unread,
Jul 29, 2009, 2:40:34 PM7/29/09
to Maven Android Developers
Hi Chander,

Thanks for your questions!

I suppose you refer to the GettingStarted wiki page. Yes, renaming and
moving the source directory is an additional step. The alternative is
to add <sourceDirectory>src</sourceDirectory> to the <build> tag of
your pom.xml.

My aim with maven-android-plugin is to make it as easy to work with,
and as predictable, as possible. For predictability, it must behave
like a good Maven citizen. In this case it means that the
(unconfigured) default use of the plugin should expect the source
folder to be where Maven expects it. Actually, the maven-android-
plugin is never involved in compiling java source code, the maven-
compiler-plugin is, and that happens automatically. We just pick up
the class files afterwards from the default location and convert them
further. That's why the source folder is not configured within the
<configuration> of maven-android-plugin, but instead in the <build>
tag of the pom.

That said, your point of having it work easier with a default Eclipse
setup is very valid indeed.

When we have figured out the best ways for maven-android-plugin to
work with Eclipse, I will create a tool for mavenize an existing
standard Android / Eclipse project. Issue 22 is filed for tracking
progress of that tool:
http://code.google.com/p/maven-android-plugin/issues/detail?id=22

EclipseIntegration is tracked here:
http://code.google.com/p/maven-android-plugin/wiki/EclipseIntegration

By the way, please go ahead and update for example step number 3 in
the GettingStarted page, to say they can choose between adding the
<sourceDirectory> tag to the pom or moving the folder. Whatever you
feel makes it easier to "GettingStarted" :) I have added you as
committer, so you should be able to edit the wiki pages now.

Thanks,
/Hugo
Reply all
Reply to author
Forward
0 new messages