Bonjour,

Je suis en train d'apprendre à me servir de Maven pour les projets Android. Pour ce faire, je lis le guide en Français mais je rencontre un problème au chapitre 14.3.1 (page 261). J'utilise le projet HelloFlashlight qui est fourni aussi par le guide (guide trouvé ici : http://maven-guide-fr.erwan-alliaume.com/).

J'ai suivi toutes les consignes indiquées dans le guide mais lorsque je tape dans un terminal la commande suivante, j'obtiens des erreurs :
mvn clean install android:deploy
Et voici une partie du résultat de la commande :
mvn clean install android:deploy
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2...3.9.0-rc.2.pom
[WARNING] Failed to create parent directories for tracking file /usr/share/maven-repo/com/jayway/maven/plugins/android/generation2/maven-android-plugin/3.9.0-rc.2/maven-android-plugin-3.9.0-rc.2.pom.lastUpdated
[WARNING] The POM for com.jayway.maven.plugins.android.generation2:maven-android-plugin:jar:3.9.0-rc.2 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2...3.9.0-rc.2.jar
Downloading: https://repo.maven.apache.org/maven2...-utils-1.1.jar
[WARNING] Failed to create parent directories for tracking file /usr/share/maven-repo/com/jayway/maven/plugins/android/generation2/maven-android-plugin/3.9.0-rc.2/maven-android-plugin-3.9.0-rc.2.jar.lastUpdated
[WARNING] Failed to create parent directories for tracking file /usr/share/maven-repo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar.lastUpdated
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.simpligility.android:helloflashlight:0.1-SNAPSHOT (/home/kimilie/Informatique/ApplisAndroid/HelloFlashlight/pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin com.jayway.maven.plugins.android.generation2:maven-android-plugin:3.9.0-rc.2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.jayway.maven.plugins.android.generation2:maven-android-plugin:jar:3.9.0-rc.2, org.codehaus.plexus:plexus-utils:jar:1.1: Could not find artifact com.jayway.maven.plugins.android.generation2:maven-android-plugin:jar:3.9.0-rc.2 in central (https://repo.maven.apache.org/maven2) -> [Help 2]
[ERROR] Unknown packaging: apk @ line 9, column 13
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/d...ldingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/d...utionException
En ce qui concerne le PATH du SDK, je l'ai pourtant bien renseigné par la commande suivante (je lui ai donné le chemin du sdk qui se trouve dans l'ADT bundle) :
export ANDROID_HOME=/cheminVersMonSDK
Par contre, en essayant de suivre ce qui est conseillé dans le log, le path vers le JDK n'est pas trouvé non plus :
kimilie@kimilie-MS-7816:~/Informatique/ApplisAndroid/HelloFlashlight$ -Dandroid.sdk.path=/home/kimilie/Informatique/adt-bundle-linux-x86-20140702/sdk/
bash: -Dandroid.sdk.path=/home/kimilie/Informatique/adt-bundle-linux-x86-20140702/sdk/: No such file or directory
Quelqu'un saurait-il m'indiquer comment résoudre ce problème s'il vous plaît ?

voici le pom.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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.simpligility.android</groupId>
	<artifactId>helloflashlight</artifactId>
	<version>0.1-SNAPSHOT</version>
	<packaging>apk</packaging>
	<name>HelloFlashlight</name>
	<dependencies>
		<dependency>
			<groupId>android</groupId>
			<artifactId>android</artifactId>
			<version>3.9.0-rc.2</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<plugins>
			<plugin>
				<groupId>
					com.jayway.maven.plugins.android.generation2
				</groupId>
				<artifactId>maven-android-plugin</artifactId>
			    <version>3.9.0-rc.2</version>
			    <extensions>true</extensions>
				<configuration>
					<sdk>
						<platform>2.1</platform>
					</sdk>
					<deleteConflictingFiles>
						true
					</deleteConflictingFiles>
				<extensions>true</extensions>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
Merci d'avance pour votre aide.