Can't build Nuxeo source: Nuxeo WebEngine JAX-RS (jersey-server error)

Hi everyone,

Thanks for your time, as you can see in the title I got an issue in order to build nuxeo sources. I have follow the online documentation on doc.nuxeo.com. I ran into fews problems and the only differences from the doc is me running this:

>python clone.py release-5.5

Instead of:

>python clone.py

cause the second crash with errors.

And when i run:

>mvn -Dmaven.test.skip=true install -Paddons

I get those errors:

[INFO] Building Nuxeo WebEngine JAX-RS
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [buildnumber:create {execution: default}]
[INFO] Storing buildNumber: 20120405-150730 at timestamp: 1333631250875
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:jersey-server:jar:null

Reason: Cannot find parent: com.sun.jersey:jersey-project for project: null:jers
ey-server:jar:null for project null:jersey-server:jar:null

Thanks for reading, I hope someone could help me. If anyone need futher informations, feel free to ask.

Regards, LR

0 votes

2 answers

1150 views

ANSWER

This is the full trace error:

[INFO] ------------------------------------------------------------------------
[INFO] Building Nuxeo WebEngine JAX-RS
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [buildnumber:create {execution: default}]
[INFO] Storing buildNumber: 20120405-151520 at timestamp: 1333631720828
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:jersey-server:jar:null

Reason: Cannot find parent: com.sun.jersey:jersey-project for project: null:jers
ey-server:jar:null for project null:jersey-server:jar:null


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency
 information: Unable to read the metadata file for artifact 'com.sun.jersey:jers
ey-server:jar': Cannot find parent: com.sun.jersey:jersey-project for project: n
ull:jersey-server:jar:null for project null:jersey-server:jar:null
  com.sun.jersey:jersey-server:jar:1.1.5

from the specified remote repositories:
  public (http://maven.nuxeo.org/nexus/content/groups/public),
  central (http://repo1.maven.org/maven2),
  public-snapshot (http://maven.nuxeo.org/nexus/content/groups/public-snapshot)

Path to dependency:
        1) org.nuxeo.ecm.webengine:nuxeo-webengine-jaxrs:jar:5.5


        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:711)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        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:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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.artifact.resolver.ArtifactResolutionException: Unabl
e to get dependency information: Unable to read the metadata file for artifact '
com.sun.jersey:jersey-server:jar': Cannot find parent: com.sun.jersey:jersey-pro
ject for project: null:jersey-server:jar:null for project null:jersey-server:jar
:null
  com.sun.jersey:jersey-server:jar:1.1.5

from the specified remote repositories:
  public (http://maven.nuxeo.org/nexus/content/groups/public),
  central (http://repo1.maven.org/maven2),
  public-snapshot (http://maven.nuxeo.org/nexus/content/groups/public-snapshot)

Path to dependency:
        1) org.nuxeo.ecm.webengine:nuxeo-webengine-jaxrs:jar:5.5


        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:430)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(D
efaultArtifactCollector.java:74)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:316)
        at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:304)
        at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
ncies(DefaultPluginManager.java:1499)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:442)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException
: Unable to read the metadata file for artifact 'com.sun.jersey:jersey-server:ja
r': Cannot find parent: com.sun.jersey:jersey-project for project: null:jersey-s
erver:jar:null for project null:jersey-server:jar:null
        at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edProject(MavenMetadataSource.java:200)
        at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edArtifact(MavenMetadataSource.java:94)
        at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(D
efaultArtifactCollector.java:387)
        ... 23 more
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent
: com.sun.jersey:jersey-project for project: null:jersey-server:jar:null for pro
ject null:jersey-server:jar:null
        at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1396)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:823)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromReposito
ry(DefaultMavenProjectBuilder.java:255)
        at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocat
edProject(MavenMetadataSource.java:163)
        ... 25 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 P
OM. for project com.sun.jersey:jersey-project at C:\Documents and Settings\lregn
ault\.m2\repository\com\sun\jersey\jersey-project\1.1.5\jersey-project-1.1.5.pom

        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1599)
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
MavenProjectBuilder.java:1571)
        at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:562)
        at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1392)
        ... 28 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 minutes 4 seconds
[INFO] Finished at: Thu Apr 05 15:15:20 CEST 2012
[INFO] Final Memory: 477M/494M
[INFO] ------------------------------------------------------------------------
04/05/2012



This is due to the glassfish repository, which is hardcoded in the jerser-server-1.1.5.pom, returning a junk artifact (some HTML with a nginx message instead of a real pom).

You can work around this by adding this to the “mirrors” section of your settings.xml:

<mirror>
    <id>glassfish-mirror</id>
    <name>glassfish mirror</name>
    <url>http://maven.nuxeo.org/nexus/content/repositories/public-releases</url>
    <mirrorOf>glassfish-repository</mirrorOf>
</mirror>

and removing all “com.sun.jersey” artifacts from your local repository (rm -rf ~/.m2/repository/com/sun/jersey)

7 votes



Thanks for your help. I will try this. I get back to you.
04/11/2012

Please use comment for a comment an answer to answer to the question. This is important for the following you tell.
04/11/2012

Hello,

Thanks for your time both of you. I actualy add the mirror and it's working very well. I apologize for my student english, and hope I'am understandable.

Thanks again, Regards, LR

04/13/2012


Hello,

Maybe you got a corrupted file (i.e. during a download issue).
Could you look at C:\Documents and Settings\lregnault\.m2\repository\com\sun\jersey\jersey-project\1.1.5\jersey-project-1.1.5.pom and compare it with its online version?
If it looks weird, simply delete it and rebuild. Note you can restart the build from the failing module:

mvn -Dmaven.test.skip=true install -Paddons -rf nuxeo-webengine/nuxeo-webengine-jaxrs
0 votes