-
Notifications
You must be signed in to change notification settings - Fork 0
Building Project Maven Eclipse
- Please read the Configuration page first
- Looking for a working example? See this project.
Follow the Getting Started page of the m2eclipse-android-integration plugin to create / import your project as a Maven + Android project.
The Maven configuration enables AndroidAnnotations usage from the command line (e.g using mvn package). However, since Eclipse uses its own compiler, you also need to configure it.
Here are the manual steps needed to enable annotation processing with AndroidAnnotations without having to install extra plugins:
- Right-click your project, choose Properties
- Go to Java Compiler > Annotation Processing and choose Enable annotation processing
- Go to Java Compiler > Annotation Processing > Factory Path
- Click on Add Variable, select M2_REPO and click on Extend...; then, select the following JAR :
com/googlecode/androidannotations/androidannotations-api/2.7/androidannotations-api-2.7.jar - Click on Add Variable, select M2_REPO and click on Extend...; then, select the following JAR :
com/sun/codemodel/codemodel/2.4.1/codemodel-2.4.1.jar - Click on Add Variable, select M2_REPO and click on Extend...; then, select the following JAR :
com/googlecode/androidannotations/androidannotations/2.7/androidannotations-2.7.jar - Confirm the workspace rebuild
- Done!
A simpler process would be to download the zip bundle and add only the
androidannotations-2.7.jarfound in that bundle. This jar already containsandroidannotations-api-2.7.jarandcodemodel-2.4.1.jar
The previous manual configuration can also be created by adding the following files at the root of your project:
- .factorypath
<factorypath>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/androidannotations/androidannotations/2.7/androidannotations-2.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/androidannotations/androidannotations-api/2.7/androidannotations-api-2.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/codemodel/codemodel/2.4.1/codemodel-2.4.1.jar" enabled="true" runInBatchMode="false"/>
</factorypath>- .settings/org.eclipse.jdt.apt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true
AndroidAnnotations was created by Pierre-Yves Ricau and is sponsored by eBusinessInformations.
04/11/2012 The 2.7 release is out
- Get started!
- Download
- Cookbook, full of recipes
- List of all available annotations
- Release Notes
- Examples
- Read the FAQ
- Join the Mailing list
- Create an issue
- Tag on Stack Overflow