I am beginner in Maven. Please consider this.
I want to use Maven for my Android project. For that I have done steps as per:
http://rgladwell.github.com/m2e-android/
and
http://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/wiki/GettingStarted
I have Eclipse Helios, Android SDK, ADT-plugin rev 20 installed. Also I installed maven to eclipse plugin.
I am using Windows 7 (32 bit).
Here is the parent Pom.xml:
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<sdk>
<platform>15</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
... which installs Android Maven integration plugins.
But with the child pom.xml I am getting errors.
child 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>GROUPID</groupId>
<artifactId>CHILDID</artifactId>
<version>1.0</version>
<packaging>apklib</packaging>
<parent> <!-- getting error here --->
<groupId>GROUPID</groupId>
<artifactId>ARTIID</artifactId>
<version>1.0</version>
<relativePath>..</relativePath>
</parent>
......
......
<plugins>
<plugin>
<artifactId>ID</artifactId>
<version>1.1</version>
<executions>
<execution>
<!-- getting error here --->
</execution>
</plugin>
</plugins>
My pom.xml in a maven android project. It works fine:
<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>empresa</groupId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<artifactId>maestro-empresas</artifactId>
<packaging>apk</packaging>
<name>maestro-empresas</name>
<properties>
<maven-android-plugin-version>3.0.0-alpha-13</maven-android-plugin-version>
<maven-compiler-plugin-version>2.3.2</maven-compiler-plugin-version>
<com.google.android-version>2.2.1</com.google.android-version>
<org.springframework.android-version>1.0.0.BUILD-SNAPSHOT</org.springframework.android-version>
<commons-httpclient-version>3.1</commons-httpclient-version>
<org.codehaus.jackson-version>1.8.8</org.codehaus.jackson-version>
<android-platform>8</android-platform>
</properties>
<pluginRepositories>
<pluginRepository>
<id>oss.sonatype.org-jayway-snapshots</id>
<name>Jayway OpenSource SNAPSHOTs on Sonatype.org</name>
<url>http://oss.sonatype.org/content/repositories/jayway-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${maven-android-plugin-version}</version>
<configuration>
<sdk>
<!-- D:/SW/android-sdks/ -->
<!-- <path>${android.home}</path> -->
<platform>${android-platform}</platform>
</sdk>
<emulator>
<avd>Android2.2</avd>
</emulator>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin-version}</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${com.google.android-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-rest-template</artifactId>
<version>${org.springframework.android-version}</version>
</dependency>
<dependency>
<!-- Para json -->
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${org.codehaus.jackson-version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>android-rome-feed-reader-repository</id>
<name>Android ROME Feed Reader Repository</name>
<url>https://android-rome-feed-reader.googlecode.com/svn/maven2/releases</url>
</repository>
</repositories>
</project>
Related
This is my POM.xml,and i am getting error at
line 1 and
at packaging tag as "unknown packaging : apk"
Tried every possible solution ie. installed m2e plugin,managed maven lifecycle,but of no use in eclipse.
Please help!
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.atmosphere</groupId>
<artifactId>wasync-project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.atmosphere.wasync.samples</groupId>
<artifactId>android-chat</artifactId>
<packaging>apk</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>Android Chat</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>wasync</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.2</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<run>
<debug>true</debug>
</run>
<sdk>
<platform>4.0.3</platform>
<path>D:\Android\sdk</path>
</sdk>
<emulator>
<avd>15</avd>
</emulator>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
</plugin>
</plugins>
</build>
</project>
I got this error when i adding this line to my pom.xml file in maven project
Here is my pom.xml file
<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>GROUPID</groupId>
<artifactId>ARTIFACTID</artifactId>
<version>VERSION</version>
<packaging>apk</packaging> <!-- Getting error in this line -->
<name>NAME</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r6</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
<sdk>
<platform>9</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
I am getting this error when adding pom.xml in apk.
I referred to this question Android with maven? Apk unknown
But mvn clean install doesn't help me...
So please help me to get rid of this error.
Thanks in advance.
Try moving those plugins, particularly the android-maven-plugin outside of <pluginManagement>. When specified inside <pluginManagement> they don't run so the android-maven-plugin extension isn't seen so maven doesn't know what to do with the "apk" packaging.
I am using the android-saripaar library in my project. Now i want to deploy this library to my in house nexus repository. I have added the distribution management tag to the pom.xml file of the above library.This is the complete library pom.xml file
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mobsandgeeks.saripaar</groupId>
<artifactId>android-saripaar</artifactId>
<version>1.0-SNAPSHOT</version>
<name>android-saripaar</name>
<packaging>apklib</packaging>
<properties>
<java.version>1.6</java.version>
</properties>
<distributionManagement>
<repository>
<id>confiz-repo</id>
<url>http://10.10.10.230:8081/nexus/content/repositories/snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
<version>4.1.1.4</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
<extensions>true</extensions>
<configuration>
<nativeLibrariesDirectory>ignored</nativeLibrariesDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Now in my target project that i wish to build with maven i have included the following dependency
com.mobsandgeeks.saripaar
android-saripaar
1.0-SNAPSHOT
My settings.xml file contains the following entries
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>confiz-repo</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<!-- The id of this mirror and the server instance above needs to be the same!-->
<id>confiz-repo</id>
<mirrorOf>*</mirrorOf>
<url> http://10.10.10.230:8081/nexus/content/groups/public/</url>
</mirror>
<mirror>
<!-- The id of this mirror and the server instance above needs to be the same!-->
<id>confiz-repo</id>
<mirrorOf>*</mirrorOf>
<url> http://10.10.10.230:8081/nexus/content/repositories/snapshots/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>confiz-repo</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>confiz-repo</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
I do a mvn deploy on the library project and that gives a build success. I go to the path mentioned in the distriubution management and i can see my project there.
Now in a second project i access the file as follows
<dependency>
<groupId>com.mobsandgeeks.saripaar</groupId>
<artifactId>android-saripaar</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
When i run mvn clean install on the project, it gives me a build error that maven cannot find my artifact mentioned ? What am i doing wrong ?
Kind Regards
I have set up my an in house nexus repository. Now i have changed my settings.xml file to point to my repository, but i also want to include the reference in my project pom.xml file. Now is this pom.xml file valid ? If i change the password of the repo, maven still downloads the file from the repo ? What am i doing wrong ? Is this configuration correct ?
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp</groupId>
<artifactId>TestAndroid</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>Test Android Application</name>
<servers>
<server>
<id>com-repo</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
<repositories>
<repository>
<id>com-repo</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>com-repo</id>
<name>com-repo</name>
<url>http://10.10.10.230:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-rest-template</artifactId>
<version>1.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.8</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>20030203.000129</version>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.2.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>org.google</groupId>
<artifactId>admob</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.mycpmp</groupId>
<artifactId>1234</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.test</groupId>
<artifactId>test</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.taptwo.android</groupId>
<artifactId>widget</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>com.google.api-ads</groupId> -->
<!-- <artifactId>dfp-lib</artifactId> -->
<!-- <version>0.4.0</version> -->
<!-- </dependency> -->
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/main/java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<attachSources>true</attachSources>
<sign>
<debug>false</debug>
</sign>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<archiveDirectory></archiveDirectory>
<includes>
<include>target/*.apk</include>
</includes>
<keystore>avm.keystore</keystore>
<storepass>123</storepass>
<keypass>123</keypass>
<alias>asdfg</alias>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Your pom is not valid.
As stated in here, you should not put the username and password in the pom.xml.
The repositories for download and deployment are defined by the repositories and distributionManagement elements of the POM. However, certain settings such as username and password should not be distributed along with the pom.xml. This type of information should exist on the build server in the settings.xml.
The credentials are only for deploying to the repository. Repositories for deployment are defined in a distributionManagement element; it's distinct from the repositories element stuff. The repositories element defines repos where your dependencies are resolved from.
Moreover, the pom doesn't support putting the credentials in like this. Are you getting errors when you execute it? I would think so.
I´m trying to run the android greenhouse client with the android maven plugin and I got the following execption while trying to execute mvn clean install:
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.4:dex (default-dex) on project greenhouse: MojoExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C ""C:\Dokumente und Einstellungen\lyth\Eigene Dateien\Downloads\android-sdk_r11-windows\android-sdk-windows\platform-tools\dx.bat" --dex "--output=C:\Dokumente und Einstellungen\lyth\Eigene Dateien\Downloads\SpringSource-greenhouse-android-feff5a5\target\classes.dex" "C:\Dokumente und Einstellungen\lyth\Eigene Dateien\Downloads\SpringSource-greenhouse-android-feff5a5\target\android-classes"", Result = 255
My pom.xml looks like this:
<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>com.springsource</groupId>
<artifactId>greenhouse</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<packaging>apk</packaging>
<name>greenhouse-android</name>
<url>http://www.springsource.org</url>
<organization>
<name>SpringSource</name>
<url>http://www.springsource.org</url>
</organization>
<properties>
<env>dev</env>
<android-platform>7</android-platform>
<android-emulator>7</android-emulator>
<maven-resources-plugin-version>2.5</maven-resources-plugin-version>
<maven-android-plugin-version>2.8.4</maven-android-plugin-version>
<maven-compiler-plugin-version>2.3.2</maven-compiler-plugin-version>
<maven-eclipse-plugin-version>2.8</maven-eclipse-plugin-version>
<android-version>2.1_r1</android-version>
<java-version>1.6</java-version>
<spring-android-version>1.0.0.M4</spring-android-version>
<spring-social-version>1.0.0.RC1</spring-social-version>
<spring-security-version>3.1.0.RC2.crypto</spring-security-version>
<jackson-version>1.8.3</jackson-version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${android-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-auth</artifactId>
<version>${spring-android-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>${spring-security-version}</version>
<exclusions>
<!-- exclude in favor of spring-android-core -->
<exclusion>
<artifactId>spring-core</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<version>${spring-social-version}</version>
<exclusions>
<!-- exclude in favor of spring-android-rest-template -->
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson-version}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<filters>
<filter>${project.basedir}/filters/${env}.properties</filter>
</filters>
<resources>
<!-- copy and filter all xml resource files -->
<resource>
<directory>${project.basedir}/res</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/filtered-res</targetPath>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<!-- copy only. do not filter non-xml resource files -->
<resource>
<directory>${project.basedir}/res</directory>
<filtering>false</filtering>
<targetPath>${project.build.directory}/filtered-res</targetPath>
<excludes>
<exclude>**/*.xml</exclude>
</excludes>
</resource>
<!-- copy and filter the Android Manifest file -->
<resource>
<directory>${project.basedir}</directory>
<filtering>true</filtering>
<targetPath>${project.build.directory}/filtered-manifest</targetPath>
<includes>
<include>AndroidManifest.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin-version}</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-plugin</artifactId>
<version>${maven-android-plugin-version}</version>
<configuration>
<androidManifestFile>${project.build.directory}/filtered-manifest/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.build.directory}/filtered-res</resourceDirectory>
<sdk>
<platform>${android-platform}</platform>
</sdk>
<emulator>
<avd>${android-emulator}</avd>
</emulator>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<env>dev</env>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<env>prod</env>
</properties>
</profile>
</profiles>
<repositories>
<!-- For testing against latest Spring snapshots -->
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- For developing against latest Spring milestones -->
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Does anybody know how to fix this problem?
Answered in comments:
okay .. problem solved .. it was because of the whitespaces in the
path .. – Christine Bauers Aug 11 '11