The maven build error occurred when I had two Android projects: the one is apklib and the second one that is the actual application (the apk file) that uses apklib. The error is saying that apk project contains duplicated R.java and BuildConfig.java files under target directory. The first file comes from apk project, and the second … Continue reading Maven and apklib: Duplicated file error
Tag: pom.xml
Maven & Android: complete pom.xml files contents
The complete pom.xml file I use for Android projects is as follows. 1. Main Android application's pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pl.looksok</groupId> <artifactId>ColCalc</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>apk</packaging> <build> <sourceDirectory>${project.basedir}/src</sourceDirectory> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.3.2</version> <configuration> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> <assetsDirectory>${project.basedir}/assets</assetsDirectory> <resourceDirectory>${project.basedir}/res</resourceDirectory> <genDirectory>${project.basedir}/gen</genDirectory> <deleteConflictingFiles>true</deleteConflictingFiles> <undeployBeforeDeploy>true</undeployBeforeDeploy> <sdk> <platform>7</platform> </sdk> </configuration> <extensions>true</extensions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> … Continue reading Maven & Android: complete pom.xml files contents
Basic Maven (m2eclipse / pom.xml) configuration
Introducing Maven to Eclipse projects from scratch was described in my previous post. Now the basic usage and configuration will be described. 1a. Adding external jars (Maven dependencies) To add some external jar file or reference to another workspace project you will need to: Right Click on project -> Maven -> Add dependency You can … Continue reading Basic Maven (m2eclipse / pom.xml) configuration
Incorporate Maven into Eclipse project
Here is short instruction how to incorporate Maven into existing Eclipse projects from scratch, step by step. The goal of Maven introduction presented here is quite generic, however I installed Maven to manage dependencies (jars). Maven build, installs or clean functions are not used by me. If You need to know more about maven itself … Continue reading Incorporate Maven into Eclipse project