Project

General

Profile

DeprecatedSlideMeBuild » History » Version 32

Aaron Williamson -, 02/10/2010 01:08 AM

1 1 Denis 'GNUtoo' Carikli
== WARNING ==
2
NEWER VERSION OF SLIDEME ARE NOT FREE(AS IN FREEDOM)
3 27 Aaron Williamson -
4 30 Aaron Williamson -
== New HOWTO (in progress) == 
5 1 Denis 'GNUtoo' Carikli
6 31 Aaron Williamson -
* Install Maven
7
8
On Debian/Ubuntu (as root):
9
{{{
10
 apt-get install maven2
11
}}}
12
13 32 Aaron Williamson -
* Download the Android SDK
14 1 Denis 'GNUtoo' Carikli
15 32 Aaron Williamson -
Unfortunately, the most convenient way to get the SDK is distributed by the Android ''Open Source'' Project, but that copy contains proprietary Google code and is wrapped in a restrictive proprietary license agreement.  You can obtain a free SDK by following the [wiki:FreeSDK directions] in our wiki.
16
17
* Install the necessary SDK support
18 31 Aaron Williamson -
19
* Install maven-android-sdk-deployer
20
21
This will allow us to set up a Maven dependency for particular versions of Android.
22
23
 * Get [http://github.com/mosabua/maven-android-sdk-deployer/archives/master the latest stable version] of maven-android-sdk-deployer
24
 * Set your ANDROID_HOME environment variable to point to your copy of the Android SDK:
25
{{{
26
export ANDROID_HOME=/path/to/sdk/
27
}}}
28
 * Install maven-android-sdk-deployer
29
  * cd into the directory where you unpacked the maven-android-sdk-deployer sources.
30
  * Install maven-android-sdk-deployer according to the directions in the README file (either just `mvn install` for all platforms or `mvn install -P [platform]` if you want to install for just one).
31
32
* Get FLOSS Dispenser sources:
33
{{{
34
mkdir fd-readonly
35
cd fd-readonly
36
git clone git://gitorious.org/replicant/floss-dispenser.git
37
}}}
38
39
* Download necessary libraries and build FLOSS Dispenser
40
{{{
41
mvn clean install
42
}}}
43
44 30 Aaron Williamson -
* Install maven-android-plugin
45 27 Aaron Williamson -
{{{
46 30 Aaron Williamson -
git clone git://github.com/jayway/maven-android-plugin.git
47
cd maven-android-plugin
48 27 Aaron Williamson -
mvn install
49
}}}
50 30 Aaron Williamson -
...more to come
51 27 Aaron Williamson -
52 1 Denis 'GNUtoo' Carikli
== Howto ==
53
 * install maven
54 2 Denis 'GNUtoo' Carikli
 * download slideme,and try to build it:
55 1 Denis 'GNUtoo' Carikli
{{{
56 23 Denis 'GNUtoo' Carikli
mkdir apps
57
cd apps
58 1 Denis 'GNUtoo' Carikli
svn checkout http://slideme.googlecode.com/svn/trunk/ slideme-read-only
59 2 Denis 'GNUtoo' Carikli
cd slideme-read-only
60
mvn install
61
}}}
62
after doing that you will have an error:
63
{{{
64
$ mvn install
65
[INFO] Scanning for projects...
66
[INFO] Reactor build order: 
67
[INFO]   slideme-android-parent
68
[INFO]   android-sdk-installer
69
[INFO]   slideme-android-manager
70
[INFO] artifact org.jvending.masa.plugins:maven-dx-plugin: checking for updates from central
71
[INFO] ------------------------------------------------------------------------
72
[ERROR] BUILD ERROR
73
[INFO] ------------------------------------------------------------------------
74
[INFO] The plugin 'org.jvending.masa.plugins:maven-dx-plugin' does not exist or no valid version could be found
75
[INFO] ------------------------------------------------------------------------
76
[INFO] For more information, run Maven with the -e switch
77
[INFO] ------------------------------------------------------------------------
78
[INFO] Total time: 1 second
79
[INFO] Finished at: Mon Oct 26 22:33:17 CET 2009
80
[INFO] Final Memory: 1M/4M
81
[INFO] ------------------------------------------------------------------------
82 1 Denis 'GNUtoo' Carikli
}}}
83 3 Denis 'GNUtoo' Carikli
so go download masa and try to build it:
84
{{{
85
cd ../
86
svn checkout http://masa.googlecode.com/svn/trunk/ masa-read-only
87 5 Denis 'GNUtoo' Carikli
cd masa-read-only
88 4 Denis 'GNUtoo' Carikli
mvn install
89 3 Denis 'GNUtoo' Carikli
}}}
90 6 Denis 'GNUtoo' Carikli
it will fail like that:
91
{{{
92
$ mvn install
93
[INFO] Scanning for projects...
94
Downloading: http://repo1.maven.org/maven2/org/jvending/masa/masa-parent/1/masa-parent-1.pom
95
[INFO] Unable to find resource 'org.jvending.masa:masa-parent:pom:1' in repository central (http://repo1.maven.org/maven2)
96
[INFO] ------------------------------------------------------------------------
97
[ERROR] FATAL ERROR
98
[INFO] ------------------------------------------------------------------------
99
[INFO] Error building POM (may not be this project's POM).
100
101
102
Project ID: org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT
103
104
Reason: Cannot find parent: org.jvending.masa:masa-parent for project: org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT for project org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT
105
106
107
[INFO] ------------------------------------------------------------------------
108
[INFO] Trace
109
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.jvending.masa:masa-parent for project: org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT for project org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT
110
	at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
111
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
112
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
113
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
114
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
115
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
116
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
117
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
118
	at java.lang.reflect.Method.invoke(Method.java:616)
119
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
120
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
121
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
122
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
123
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.jvending.masa:masa-parent for project: org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT for project org.jvending.masa:masa-plugins:pom:1.2-SNAPSHOT
124
	at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
125
	at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
126
	at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
127
	at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
128
	at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
129
	at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
130
	at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
131
	at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
132
	... 12 more
133
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.jvending.masa:masa-parent' not found in repository: Unable to download the artifact from any repository
134
135
  org.jvending.masa:masa-parent:pom:1
136
137
from the specified remote repositories:
138
  central (http://repo1.maven.org/maven2)
139
140
 for project org.jvending.masa:masa-parent
141
	at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
142
	at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
143
	... 19 more
144
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
145
146
  org.jvending.masa:masa-parent:pom:1
147
148
from the specified remote repositories:
149
  central (http://repo1.maven.org/maven2)
150
151
152
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
153
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
154
	at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
155
	... 20 more
156
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
157
	at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
158
	at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
159
	... 22 more
160
[INFO] ------------------------------------------------------------------------
161
[INFO] Total time: < 1 second
162
[INFO] Finished at: Mon Oct 26 22:37:02 CET 2009
163
[INFO] Final Memory: 1M/4M
164
[INFO] ------------------------------------------------------------------------
165
}}}
166
then do the following:
167
{{{
168
cd parent
169
mvn install
170 7 Denis 'GNUtoo' Carikli
cd ../
171
mvn install
172 6 Denis 'GNUtoo' Carikli
}}}
173
and it will fails the following way:
174
{{{
175 8 Denis 'GNUtoo' Carikli
[INFO] ------------------------------------------------------------------------
176
[ERROR] BUILD ERROR
177
[INFO] ------------------------------------------------------------------------
178
[INFO] Failed to resolve artifact.
179
180
Missing:
181
----------
182
1) org.apache.maven.shared:maven-verifier:jar:1.2-SNAPSHOT
183
184
  Try downloading the file manually from the project website.
185
186
  Then, install it using the command: 
187
      mvn install:install-file -DgroupId=org.apache.maven.shared -DartifactId=maven-verifier -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
188
189
  Alternatively, if you host your own repository you can deploy the file there: 
190
      mvn deploy:deploy-file -DgroupId=org.apache.maven.shared -DartifactId=maven-verifier -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
191
192
  Path to dependency: 
193
  	1) org.jvending.masa:masa-integration-testing:jar:1.1-SNAPSHOT
194
  	2) org.apache.maven.shared:maven-verifier:jar:1.2-SNAPSHOT
195
196
2) org.apache.maven.its:maven-it-helper:jar:2.1-SNAPSHOT
197
198
  Try downloading the file manually from the project website.
199
200
  Then, install it using the command: 
201
      mvn install:install-file -DgroupId=org.apache.maven.its -DartifactId=maven-it-helper -Dversion=2.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
202
203
  Alternatively, if you host your own repository you can deploy the file there: 
204
      mvn deploy:deploy-file -DgroupId=org.apache.maven.its -DartifactId=maven-it-helper -Dversion=2.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
205
206
  Path to dependency: 
207
  	1) org.jvending.masa:masa-integration-testing:jar:1.1-SNAPSHOT
208
  	2) org.apache.maven.its:maven-it-helper:jar:2.1-SNAPSHOT
209
210
----------
211
2 required artifacts are missing.
212
213
for artifact: 
214
  org.jvending.masa:masa-integration-testing:jar:1.1-SNAPSHOT
215
216
from the specified remote repositories:
217
  central (http://repo1.maven.org/maven2)
218
219
220
221
[INFO] ------------------------------------------------------------------------
222
[INFO] For more information, run Maven with the -e switch
223
[INFO] ------------------------------------------------------------------------
224
[INFO] Total time: 2 minutes 30 seconds
225
[INFO] Finished at: Mon Oct 26 22:41:29 CET 2009
226
[INFO] Final Memory: 48M/86M
227
[INFO] ------------------------------------------------------------------------
228 9 Denis 'GNUtoo' Carikli
}}}
229
but http://maven.apache.org/shared/index.html has the sources of theses missing artifacts,so do:
230
{{{
231
cd ../
232
svn co http://svn.apache.org/repos/asf/maven/shared/trunk/maven-verifier/
233
cd maven-verifier
234
mvn install
235 11 Denis 'GNUtoo' Carikli
mvn install:install-file -DgroupId=org.apache.maven.shared -DartifactId=maven-verifier -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=./target/maven-verifier-1.3-SNAPSHOT.jar 
236 10 Denis 'GNUtoo' Carikli
cd ../
237 6 Denis 'GNUtoo' Carikli
}}}
238 13 Denis 'GNUtoo' Carikli
http://mojo.codehaus.org/build-helper-maven-plugin/source-repository.html shows the artifacts's source code's repository,so do:
239 12 Denis 'GNUtoo' Carikli
{{{
240
svn co http://svn.codehaus.org/mojo/tags/build-helper-maven-plugin-1.4
241 1 Denis 'GNUtoo' Carikli
cd build-helper-maven-plugin-1.4
242 13 Denis 'GNUtoo' Carikli
mvn install
243
mvn install:install-file -DgroupId=org.apache.maven.its -DartifactId=maven-it-helper -Dversion=2.1-SNAPSHOT -Dpackaging=jar -Dfile=./target/build-helper-maven-plugin-1.4.jar
244
cd ../masa-read-only
245 12 Denis 'GNUtoo' Carikli
mvn install
246
}}}
247 14 Denis 'GNUtoo' Carikli
and it fails here:
248
{{{
249
[INFO] ------------------------------------------------------------------------
250
[INFO] Building JVending Masa: masa-integration-testing
251
[INFO]    task-segment: [install]
252
[INFO] ------------------------------------------------------------------------
253
[INFO] [resources:resources {execution: default-resources}]
254
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
255
[INFO] skip non existing resourceDirectory /home/android/apps/masa-read-only/masa-integration-testing/src/main/resources
256
[INFO] [compiler:compile {execution: default-compile}]
257
[INFO] No sources to compile
258
[INFO] [resources:testResources {execution: default-testResources}]
259
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
260
[INFO] Copying 18 resources
261
[INFO] [compiler:testCompile {execution: default-testCompile}]
262
[INFO] Compiling 4 source files to /home/android/apps/masa-read-only/masa-integration-testing/target/test-classes
263
[INFO] ------------------------------------------------------------------------
264
[ERROR] BUILD FAILURE
265
[INFO] ------------------------------------------------------------------------
266
[INFO] Compilation failure
267
268
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa33StringsMergingTest.java:[5,26] cannot find symbol
269
symbol  : class AbstractMavenIntegrationTestCase
270
location: package org.apache.maven.it
271
272
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa33StringsMergingTest.java:[9,54] cannot find symbol
273
symbol: class AbstractMavenIntegrationTestCase
274
public class MavenITmasa33StringsMergingTest  extends AbstractMavenIntegrationTestCase
275
276
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa30LocalizedResourcesTest.java:[5,26] cannot find symbol
277
symbol  : class AbstractMavenIntegrationTestCase
278
location: package org.apache.maven.it
279
280
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa30LocalizedResourcesTest.java:[10,57] cannot find symbol
281
symbol: class AbstractMavenIntegrationTestCase
282
public class MavenITmasa30LocalizedResourcesTest extends AbstractMavenIntegrationTestCase
283
284
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[6,26] cannot find symbol
285
symbol  : class AbstractMavenIntegrationTestCase
286
location: package org.apache.maven.it
287
288
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[11,12] cannot find symbol
289
symbol: class AbstractMavenIntegrationTestCase
290
    extends AbstractMavenIntegrationTestCase
291
292
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa33StringsMergingTest.java:[14,15] cannot find symbol
293
symbol  : variable ALL_MAVEN_VERSIONS
294
location: class org.jvending.masa.it.MavenITmasa33StringsMergingTest
295
296
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa33StringsMergingTest.java:[25,65] cannot find symbol
297
symbol  : method getClass()
298
location: class org.jvending.masa.it.MavenITmasa33StringsMergingTest
299
300
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa30LocalizedResourcesTest.java:[15,15] cannot find symbol
301
symbol  : variable ALL_MAVEN_VERSIONS
302
location: class org.jvending.masa.it.MavenITmasa30LocalizedResourcesTest
303
304
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa30LocalizedResourcesTest.java:[26,65] cannot find symbol
305
symbol  : method getClass()
306
location: class org.jvending.masa.it.MavenITmasa30LocalizedResourcesTest
307
308
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[16,15] cannot find symbol
309
symbol  : variable ALL_MAVEN_VERSIONS
310
location: class org.jvending.masa.it.MavenITmasa29PoTest
311
312
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[27,65] cannot find symbol
313
symbol  : method getClass()
314
location: class org.jvending.masa.it.MavenITmasa29PoTest
315
316
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[46,65] cannot find symbol
317
symbol  : method getClass()
318
location: class org.jvending.masa.it.MavenITmasa29PoTest
319
320
/home/android/apps/masa-read-only/masa-integration-testing/src/test/java/org/jvending/masa/it/MavenITmasa29PoTest.java:[65,65] cannot find symbol
321
symbol  : method getClass()
322
location: class org.jvending.masa.it.MavenITmasa29PoTest
323
324
325
[INFO] ------------------------------------------------------------------------
326
[INFO] For more information, run Maven with the -e switch
327
[INFO] ------------------------------------------------------------------------
328
[INFO] Total time: 20 seconds
329
[INFO] Finished at: Mon Oct 26 22:53:40 CET 2009
330
[INFO] Final Memory: 25M/44M
331
[INFO] ------------------------------------------------------------------------
332
333
}}}
334 15 Denis 'GNUtoo' Carikli
http://svn.apache.org/repos/asf/ contains all the apache projects repositories,so checkout the core-integration-testing project:
335
{{{
336
cd ../
337 16 Denis 'GNUtoo' Carikli
svn co http://svn.apache.org/repos/asf/maven/core-integration-testing/trunk core-integration-testing
338
cd core-integration-testing
339 17 Denis 'GNUtoo' Carikli
mvn install
340
cd ../masa-read-only
341
mvn install
342 15 Denis 'GNUtoo' Carikli
}}}
343 18 Denis 'GNUtoo' Carikli
then retry to build slideme:
344
{{{
345
cd ../slideme-read-only
346
mvn install
347
}}}
348 19 Denis 'GNUtoo' Carikli
and it fails like this:
349
{{{
350
$ mvn install
351
[INFO] Scanning for projects...
352
[INFO] Reactor build order: 
353
[INFO]   slideme-android-parent
354
[INFO]   android-sdk-installer
355
[INFO]   slideme-android-manager
356
[INFO] ------------------------------------------------------------------------
357
[INFO] Building slideme-android-parent
358
[INFO]    task-segment: [install]
359
[INFO] ------------------------------------------------------------------------
360
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugin/2.0.4/maven-source-plugin-2.0.4.pom
361
      
362
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-source-plugin/2.0.4/maven-source-plugin-2.0.4.jar
363
       
364
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
365
[INFO] [install:install {execution: default-install}]
366
[INFO] Installing /home/android/apps/slideme-read-only/pom.xml to /home/android/.m2/repository/org/slideme/android/slideme-android-parent/1.0-CE/slideme-android-parent-1.0-CE.pom
367
[INFO] ------------------------------------------------------------------------
368
[INFO] Building android-sdk-installer
369
[INFO]    task-segment: [install]
370
[INFO] ------------------------------------------------------------------------
371
[INFO] [resources:resources {execution: default-resources}]
372
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
373
[INFO] skip non existing resourceDirectory /home/android/apps/slideme-read-only/android-sdk-installer/src/main/resources
374
[INFO] [compiler:compile {execution: default-compile}]
375
[INFO] Compiling 1 source file to /home/android/apps/slideme-read-only/android-sdk-installer/target/classes
376
[INFO] [resources:testResources {execution: default-testResources}]
377
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
378
[INFO] skip non existing resourceDirectory /home/android/apps/slideme-read-only/android-sdk-installer/src/test/resources
379
[INFO] [compiler:testCompile {execution: default-testCompile}]
380
[INFO] No sources to compile
381
[INFO] [surefire:test {execution: default-test}]
382
[INFO] No tests to run.
383
[INFO] [jar:jar {execution: default-jar}]
384
[INFO] Building jar: /home/android/apps/slideme-read-only/android-sdk-installer/target/android-sdk-installer-1.0-CE.jar
385
[INFO] [install:install {execution: default-install}]
386
[INFO] Installing /home/android/apps/slideme-read-only/android-sdk-installer/target/android-sdk-installer-1.0-CE.jar to /home/android/.m2/repository/org/slideme/android/sdk/android-sdk-installer/1.0-CE/android-sdk-installer-1.0-CE.jar
387
[INFO] ------------------------------------------------------------------------
388
[INFO] Building slideme-android-manager
389
[INFO]    task-segment: [install]
390
[INFO] ------------------------------------------------------------------------
391
[INFO] ------------------------------------------------------------------------
392
[ERROR] BUILD ERROR
393
[INFO] ------------------------------------------------------------------------
394
[INFO] Cannot find lifecycle mapping for packaging: 'android:apk'.
395
Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingandroid:apk.
396
[INFO] ------------------------------------------------------------------------
397
[INFO] For more information, run Maven with the -e switch
398
[INFO] ------------------------------------------------------------------------
399
[INFO] Total time: 13 seconds
400
[INFO] Finished at: Tue Oct 27 14:10:57 CET 2009
401
[INFO] Final Memory: 17M/34M
402
[INFO] ------------------------------------------------------------------------
403
}}}
404
so do:
405
{{{
406 20 Denis 'GNUtoo' Carikli
cd ../
407
git clone git://github.com/jayway/maven-android-plugin.git
408
cd maven-android-plugin
409
mvn install
410
}}}
411 21 Denis 'GNUtoo' Carikli
it will fail this way:
412
{{{
413
[INFO] Scanning for projects...
414
[INFO] ------------------------------------------------------------------------
415
[INFO] Building Maven Android Plugin - maven-android-plugin
416
[INFO]    task-segment: [install]
417
[INFO] ------------------------------------------------------------------------
418
[INFO] [plugin:descriptor {execution: default-descriptor}]
419
[INFO] Using 2 extractors.
420
[INFO] Applying extractor for language: java
421
[INFO] Extractor for language: java found 11 mojo descriptors.
422
[INFO] Applying extractor for language: bsh
423
[INFO] Extractor for language: bsh found 0 mojo descriptors.
424
[INFO] [resources:resources {execution: default-resources}]
425
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
426
[INFO] Copying 1 resource
427
[INFO] [compiler:compile {execution: default-compile}]
428
[INFO] Nothing to compile - all classes are up to date
429
[INFO] [resources:testResources {execution: default-testResources}]
430
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
431
[INFO] Copying 5 resources
432
[INFO] [compiler:testCompile {execution: default-testCompile}]
433
[INFO] Nothing to compile - all classes are up to date
434
[INFO] [surefire:test {execution: default-test}]
435
[INFO] Surefire report directory: /home/android/apps/maven-android-plugin/target/surefire-reports
436
437
-------------------------------------------------------
438
 T E S T S
439
-------------------------------------------------------
440
Running com.jayway.maven.plugins.android.asm.AndroidTestFinderTest
441
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.119 sec
442
Running com.jayway.maven.plugins.android.AbstractAndroidMojoTest
443
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.313 sec <<< FAILURE!
444
Running com.jayway.maven.plugins.android.asm.withtests.TestClassA
445
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec
446
Running com.jayway.maven.plugins.android.asm.withtests.TestClassB
447
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
448
Running com.jayway.maven.plugins.android.AndroidSdkTest
449
Tests run: 14, Failures: 14, Errors: 0, Skipped: 0, Time elapsed: 0.149 sec <<< FAILURE!
450
451
Results :
452
453
Failed tests: 
454
  givenApidemosApkThenPackageIsFound(com.jayway.maven.plugins.android.AbstractAndroidMojoTest)
455
  givenApidemosPlatformtestsApkThenPackageIsFound(com.jayway.maven.plugins.android.AbstractAndroidMojoTest)
456
  givenLayout1dot1AndToolAdbThenPathIs1dot1Style(com.jayway.maven.plugins.android.AndroidSdkTest)
457
  givenLayout1dot1AndToolAndroidThenPathIs1dot1Style(com.jayway.maven.plugins.android.AndroidSdkTest)
458
  givenLayout1dot1AndToolAaptThenPathIs1dot1Style(com.jayway.maven.plugins.android.AndroidSdkTest)
459
  givenLayout1dot5AndToolAdbThenPathIsCommon(com.jayway.maven.plugins.android.AndroidSdkTest)
460
  givenLayout1dot5AndToolAndroidThenPathIsCommon(com.jayway.maven.plugins.android.AndroidSdkTest)
461
  givenLayout1dot5AndToolAaptAndPlatform1dot1ThenPathIsPlatform1dot1(com.jayway.maven.plugins.android.AndroidSdkTest)
462
  givenLayout1dot5AndToolAaptAndPlatform1dot5ThenPathIsPlatform1dot5(com.jayway.maven.plugins.android.AndroidSdkTest)
463
  givenLayout1dot5AndToolAaptAndPlatform1dot6ThenException(com.jayway.maven.plugins.android.AndroidSdkTest)
464
  givenInvalidSdkPathThenException(com.jayway.maven.plugins.android.AndroidSdkTest)
465
  givenSdk11PathThenLayoutIs11(com.jayway.maven.plugins.android.AndroidSdkTest)
466
  givenSdk15PathThenLayoutIs15(com.jayway.maven.plugins.android.AndroidSdkTest)
467
  givenSdk1dodt1ThenPlatformEqualsPath(com.jayway.maven.plugins.android.AndroidSdkTest)
468
  givenSdk1dodt5AndPlatform1dot5ThenPlatformis1dot5(com.jayway.maven.plugins.android.AndroidSdkTest)
469
  givenSdk1dodt5AndPlatformNullThenPlatformis1dot5(com.jayway.maven.plugins.android.AndroidSdkTest)
470
471
Tests run: 23, Failures: 16, Errors: 0, Skipped: 0
472
473
[INFO] ------------------------------------------------------------------------
474
[ERROR] BUILD FAILURE
475
[INFO] ------------------------------------------------------------------------
476
[INFO] There are test failures.
477
478
Please refer to /home/android/apps/maven-android-plugin/target/surefire-reports for the individual test results.
479
[INFO] ------------------------------------------------------------------------
480
[INFO] For more information, run Maven with the -e switch
481
[INFO] ------------------------------------------------------------------------
482
[INFO] Total time: 9 seconds
483
[INFO] Finished at: Tue Oct 27 14:35:11 CET 2009
484
[INFO] Final Memory: 20M/36M
485
[INFO] ------------------------------------------------------------------------
486
}}}
487 22 Denis 'GNUtoo' Carikli
that is because we lack the sdk(it tells it in the logs that are in /home/android/apps/maven-android-plugin/target/surefire-reports)
488 1 Denis 'GNUtoo' Carikli
so let's build a free sdk:
489 22 Denis 'GNUtoo' Carikli
{{{
490
cd ~/replicant
491
export ANDROID_JAVA_HOME=$JAVA_HOME
492
lunch htc_dream-eng
493
make sdk
494 23 Denis 'GNUtoo' Carikli
}}}
495
then unpack the sdk:
496
{{{
497
cd 
498
unzip /home/android/replicant/out/host/linux-x86/sdk/android-sdk_eng.android_linux-x86.zip
499
cd ~/android-sdk_eng.android_linux-x86
500
export ANDROID_SDK_15=$(pwd)
501 24 Denis 'GNUtoo' Carikli
cd ~/apps #or where you put the apps folder
502 25 Denis 'GNUtoo' Carikli
cd maven-android-plugin
503 26 Denis 'GNUtoo' Carikli
mvn -fn install
504
cd ../
505 25 Denis 'GNUtoo' Carikli
}}}
506
and it'll fail this way:
507
{{{
508 22 Denis 'GNUtoo' Carikli
}}}