I am trying to build my app using maven. There are 3 projects in my app, 2 library projects and 1 main project. I am using 4.2.2 version of android.since there is no dependency available in maven repository for 4.2.2 version i have manually installed the android.jar file to my local repository. When i tried to build my project i am getting below error on main project. 2 library projects and parent pom files are building properly.
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:478)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C "D:\Android\android-sdk\platf
orm-tools\aapt.exe package -m -J D:\Development\Android\1.Projects\SAFE-0460-01-00\SafewayWorkspace\maven\3.2_rc\Safeway\target\generated-sources\r -M D:
\Development\Android\1.Projects\SAFE-0460-01- 00\SafewayWorkspace\maven\3.2_rc\Safeway\AndroidManifest.xml -S D:\Development\Android\1.Projects\SAFE-0460-
01-00\SafewayWorkspace\maven\3.2_rc\Safeway\res -S D:\Development\Android\1.Projects\SAFE-0460-01-00\SafewayWorkspace\maven\3.2_rc\Safeway\target\unpack\
apklibs/com.safeway.justforu_android-mapviewballoons_apklib_1.0.0-SNAPSHOT/res -S D:\Development\Android\1.Projects\SAFE-0460-01-00\SafewayWorkspace\mave
n\3.2_rc\Safeway\target\unpack\apklibs/com.safeway.justforu_AndroidClient_apklib_1.0.0-SNAPSHOT/res --auto-add-overlay -A D:\Development\Android\1.Projec
ts\SAFE-0460-01-00\SafewayWorkspace\maven\3.2_rc\Safeway\assets -I D:\Android\android-sdk\platforms\android-17\android.jar", Result = 1
at com.jayway.maven.plugins.android.CommandExecutor$Factory$1.executeCommand(CommandExecutor.j va:339)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:474)
... 22 more
This is my main project POM 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>
<parent>
<groupId>com.app.pack</groupId>
<artifactId>libraryprojects-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.app.pack</groupId>
<artifactId>MainProj</artifactId>
<packaging>apk</packaging>
<name>MainProj</name>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android.support-v4</groupId>
<artifactId>android-support-v4</artifactId>
<version>r6-googlemaps</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.amazon.maps</groupId>
<artifactId>maps</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android.maps</groupId>
<artifactId>maps</artifactId>
<version>17_r1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.lib.proj1</groupId>
<artifactId>libproj1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.lib.proj2</groupId>
<artifactId>libproj2</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.android.ensighten</groupId>
<artifactId>Ensighten</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.android.ensighten</groupId>
<artifactId>EnsightenAspect</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-async-http</artifactId>
<version>1.4.3</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
And this is my parent POM file
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.app.pack
libraryprojects-parent
1.0.0-SNAPSHOT
pom
Library Projects Parent
com.google.android
android
4.2.2
com.google.android
android-test
4.1.1.4
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<sdk>
<platform>17</platform>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Related
I am using maven 3.1.1. with Eclipse Kepler installed with Android-Configurator-for-M2E.
My POM.XML looks like:
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.sample</groupId>
<artifactId>SampleApplication</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<name>SampleApplication</name>
<description>A sample application to demo clean android code.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>2.3.1</platform.version>
<android.plugin.version>3.6.0</android.plugin.version>
</properties>
<dependencies>
<!-- android SDK -->
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<!-- support-v4 -->
<dependency>
<groupId>com.android.support</groupId>
<artifactId>support-v4</artifactId>
<version>19.0.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- v7-extra -->
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7</artifactId>
<version>19</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7</artifactId>
<version>19</version>
<type>jar</type>
</dependency>
<!-- v7-appcompat -->
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7-appcompat</artifactId>
<version>19</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7-appcompat</artifactId>
<version>19</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>18</platform>
</sdk>
<action>
<ignore></ignore>
</action>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>18</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>allow-snapshots</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</project>
The command: mvn clean install, builds successfully, but refreshing the project in eclipse gives this error:
dependency=[android.support:compatibility-v7:apklib:19:compile] not found in workspace pom.xml /SampleApplication line 1 me.gladwell.eclipse.m2e.android.markers.dependency.apklib
Fixed this problem by downloading a new copy of eclipse 4.3.1 and re-installed the following:
ADT pluugin
M2E
M2E-Android
Then imported the same project which built fine with: mvn clean install.
Then removed all the Libraries from the build path and did: Android-Tools>Fix Project Properties.
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 want to use nativ libraries with android. When i try to complie my project with
mvn clean install
I get an error
[INFO] If you really intend to build a core library -- which is only
[INFO] appropriate as part of creating a full virtual machine
[INFO] distribution, as opposed to compiling an application -- then use
[INFO] the "--core-library" option to suppress this error message.
How to add --core-library param to pom.xml ?
My pom looks like
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
<parent>
<groupId>com.temp</groupId>
<artifactId>SipAndroidClient</artifactId>
<version>0.1</version>
</parent>
<artifactId>android-di</artifactId>
<packaging>apk</packaging>
<name>android-di - Application</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.pivotallabs</groupId>
<artifactId>robolectric</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
</dependency>
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboguice</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>de.mindpipe.android</groupId>
<artifactId>android-logging-log4j</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>javax.sip</groupId>
<artifactId>jain-sip-api</artifactId>
<version>1.2.1.4</version>
</dependency>
<dependency>
<groupId>javax.sip</groupId>
<artifactId>jain-sip-ri</artifactId>
<version>1.2.167</version>
</dependency>
</dependencies>
<build>
<plugins>
<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>10</platform>
<path>/home/damian/.android-sdk</path>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
I believe this is what you are looking for http://maven-android-plugin-m2site.googlecode.com/svn/dex-mojo.html
Have a look at the dex section, setting CoreLibrary to true will send "--core-library" to dex.
I have been trying to convert my Android project to maven and after some issues I am struggling to deploy. I can clean and install but when it comes to the deploy I get the error:
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:deploy (default-cli) on project mega: Uninstall of org.jointsecurityarea.android.mega failed. InstallException: TimeoutException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:deploy (default-cli) on project mega: Uninstall of org.jointsecurityarea.android.mega failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Uninstall of org.jointsecurityarea.android.mega failed.
at com.jayway.maven.plugins.android.AbstractAndroidMojo$2.doWithDevice(AbstractAndroidMojo.java:806)
at com.jayway.maven.plugins.android.AbstractAndroidMojo.doWithDevices(AbstractAndroidMojo.java:715)
at com.jayway.maven.plugins.android.AbstractAndroidMojo.undeployApk(AbstractAndroidMojo.java:792)
at com.jayway.maven.plugins.android.AbstractAndroidMojo.undeployApk(AbstractAndroidMojo.java:776)
at com.jayway.maven.plugins.android.AbstractAndroidMojo.deployApk(AbstractAndroidMojo.java:600)
at com.jayway.maven.plugins.android.AbstractAndroidMojo.deployBuiltApk(AbstractAndroidMojo.java:670)
at com.jayway.maven.plugins.android.standalonemojos.DeployMojo.execute(DeployMojo.java:57)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: com.android.ddmlib.InstallException
at com.android.ddmlib.Device.uninstallPackage(Device.java:687)
at com.jayway.maven.plugins.android.AbstractAndroidMojo$2.doWithDevice(AbstractAndroidMojo.java:798)
... 27 more
Caused by: com.android.ddmlib.TimeoutException
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:648)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616)
at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:216)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:378)
at com.android.ddmlib.Device.executeShellCommand(Device.java:372)
at com.android.ddmlib.Device.uninstallPackage(Device.java:684)
... 28 more
I am attempting to run this from the command line, not using the m2e plugin. Also, here is my 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>org.jointsecurityarea</groupId>
<artifactId>mega</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<name>Mega</name>
<properties>
<platform.version>4.0.1.2</platform.version>
</properties>
<build>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.0</version>
<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>17</platform>
<path>C:\Android\adt-bundle-windows-x86_64\sdk</path>
</sdk>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
<device>usb</device>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<versionRange>[3.2.0,)</versionRange>
<goals>
<goal>manifest-update</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
</dependencies>
I am brand new to Maven. Thanks for your help in advance.
This is my projects 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.mycomp</groupId>
<artifactId>abc</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>xyx</name>
<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.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.2.0</version>
<type>apklib</type>
</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>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
</project>
Now in my Android project i have added an external project, that is not maven based. now when i execute mvn3 install i get a
Failed to execute goal
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources
(default-generate-sources) MojoExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c etc.
Now i run the above command in my command line and its complaining that the it cannot find attributes belonging to my external project. What can i do ?