Last Updated: February 25, 2016
·
1.84K
· elliotmonster

Using Maven and Eclipse for Android

When using the Maven Plugin for Android, you loose some Eclipse Features for Android.

By simply modifying the ".project" file of Eclipse, you regain all ADT Features while still using Maven for Builds and Dependency Management.

<projectDescription>
<name>thoughtsonmobile-testapp</name>
<projects/>
<buildSpec>
<!-- added two adt build commands -->
<!-- for full eclipse support -->
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments></arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
</buildCommand>
</buildSpec>
<natures>
<!-- added project nature for eclipse -->
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

the full blog article (in German) can be found here:
http://www.thoughtsonmobile.com/2012/06/android-apps-mit-maven-bauen.html