zied-ellouze / openmobster

Automatically exported from code.google.com/p/openmobster
0 stars 0 forks source link

Failed to validate POM error #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. go to direc crud under sampleApps
2. give command mvn install
3.

What is the expected output? What do you see instead?
Build should success. Rather build failed with below error

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: org.crud:crud
POM Location: 
C:\Rupesh\Work\MEAP\openmobster-2.2-M3\openmobster-2.2-M3-android\AppCreator\sam
pleApps\crud\pom.xml
Validation Messages:

    [0]  For managed dependency Dependency {groupId=android, artifactId=android, version=2.0, type=jar}: system-scoped d
ependency must specify an absolute path systemPath.

Reason: Failed to validate POM for project org.crud:crud at 
C:\Rupesh\Work\MEAP\openmobster-2.2-M3\openmobster-2.2-M3-an
droid\AppCreator\sampleApps\crud\pom.xml

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM for 
project org.crud:crud at C:\Rupesh\Work\MEA
P\openmobster-2.2-M3\openmobster-2.2-M3-android\AppCreator\sampleApps\crud\pom.x
ml
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to 
validate POM for project org.crud:crud at C:
\Rupesh\Work\MEAP\openmobster-2.2-M3\openmobster-2.2-M3-android\AppCreator\sampl
eApps\crud\pom.xml
        at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1077)

        at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.ja
va:508)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
        ... 12 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jul 29 15:08:02 IST 2011
[INFO] Final Memory: 2M/120M
[INFO] ------------------------------------------------------------------------

Original issue reported on code.google.com by rupesh.j...@gmail.com on 29 Jul 2011 at 9:39

GoogleCodeExporter commented 9 years ago
this issue can be resolved by setting ANDROID_HOME env variable.
But after all this finally build failed at 

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar {execution: default-jar}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing 
C:\Rupesh\Work\MEAP\openmobster-2.2-M3\openmobster-2.2-M3-android\AppCreator\sam
pleApps\crud\cloud\tar
get\crud-cloud-1.0.jar to 
C:\Users\rupesh_jain\.m2\repository\org\crud\cloud\app\crud-cloud\1.0\crud-cloud
-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building crud
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[WARNING] POM for 
'org.openmobster.core.mobileCloud.android.2_0:device-sdk:pom:2.2-SNAPSHOT:compil
e' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) android:android:jar:2.0

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=android -DartifactId=android -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=android -DartifactId=android -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file -
Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) org.crud.android.app:crud:apk:1.0
        2) android:android:jar:2.0

----------
1 required artifact is missing.

for artifact:

Original comment by rupesh.j...@gmail.com on 29 Jul 2011 at 2:44

GoogleCodeExporter commented 9 years ago
Rupesh:

Here is what you need to do to resolve this. In the top-level pom.xml there is 
a property named 

<version.android.api>5</version.android.api>

This is used to resolve the android dependency this way:

<dependency>
                <groupId>android</groupId>
                <artifactId>android</artifactId>
                <version>2.0</version>
                <scope>system</scope>
                <systemPath>${env.ANDROID_HOME}/platforms/android-${version.android.api}/android.jar
                </systemPath>
            </dependency>
The system path value should resolve to a valid android.jar file location.

Chances are if you have newer version of Android SDK you don't have the 
"android-5" folder.

You can change the <version.android.api>5</version.android.api> value to 
something that exist locally for you. My guess would be
 <version.android.api>8</version.android.api>

Original comment by openmobs...@gmail.com on 1 Aug 2011 at 3:50

GoogleCodeExporter commented 9 years ago
Thanks this worked..
I would suggest to change the documentation as 5

Original comment by rupesh.j...@gmail.com on 2 Aug 2011 at 6:14

GoogleCodeExporter commented 9 years ago
In the next release I have to do a lot of Android build related cleanup like 
upgrading everything to API level 12. I will keep your suggestion in mind

Original comment by openmobs...@gmail.com on 2 Aug 2011 at 3:31

GoogleCodeExporter commented 9 years ago
Hi,

I have made the build of pushmail and now trying to figure out how to deploy
on the server which I already started using "run -c openmobster -b hostip"
command.
How to package , which files are reqd to be part of deploy folder so that
openmobster server recognizes the pushmail or any other application for
deployment.

The listed command " (cd cloud), (mvn
-PrunCloud?<http://code.google.com/p/openmobster/w/edit/PrunCloud>
 integration-test)" starts some server locally but don;t know how to test
that as command "hostip:80/o" not working on that.

Rupesh

Original comment by rupesh.j...@gmail.com on 3 Aug 2011 at 3:11