Details
-
Type:
Task
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.5.4
-
Fix Version/s: 3.6
-
Component/s: Build
-
Labels:None
-
Environment:HideSystem Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Shane's MacBook
User Name: Shane Hayes (shanehayes)
Secure Virtual Memory: EnabledShowSystem Version: Mac OS X 10.6.8 (10K549) Kernel Version: Darwin 10.8.0 Boot Volume: Macintosh HD Boot Mode: Normal Computer Name: Shane's MacBook User Name: Shane Hayes (shanehayes) Secure Virtual Memory: Enabled
-
Number of attachments :0
Description
When I try to run the maven command from the web site: "mvn -s settings.xml clean install -Pexamples" I get the error above. When I search the web, I see comments about maven support of Google gdata, but I don't see a solution to the problem. I would assume that there is a reasonably easy solution, maybe manually installing this troublesome dependencies, but I have not been able to figure that out.
Activity
Currently maven.glassfish.org is down, maybe this is the making the gdata jars unavailable. You could try building individual projects and leave out the google example (this should work if the other examples do not depend on the jbehave-google subproject) or use --fail-at-end to build everything that works and leave out the subprojects that depend on missing files.
Another possibility would be to figure out an alternative repository for the missing dependencies and put that into settings.xml instead of glassfish, e.g. the java.net maven repository (http://maven2-repository.java.net/)
I will try a build with an empty repository to check what actually works, if I can figure out how it works, I'll post another comment
you can change the following in settings.xml
<id>glassfish</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
and add after the last </profile>
<profile>
<id>java.net</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>java.net</id>
<url>https://maven.java.net/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>atlassian</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>atlassian</id>
<url>https://maven.atlassian.com/repository/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>atlassian</id>
<url>https://maven.atlassian.com/repository/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
this will disable glassfish (one request remains however that will just time out and use the repositories for java.net and atlassian to resolve the missing files.
This should only be necessary once, after one successful run of mvn -s settings.xml you do not need the settings anymore.
Thanks for the update Alexander!
I did as you suggested and got the following:
Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.pom
[WARNING] The POM for com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 is missing, no dependency information available
which caused the build to fail: [ERROR] Failed to execute goal on project jbehave-distribution: Could not resolve dependencies for project org.jbehave:jbehave-distribution:pom:3.5.4: Could not find artifact com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 in jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/) -> [Help 1]
I got passed this error with the following: gdata-java-client
mvn install:install-file -DgroupId=gdata -DartifactId=client -Dversion=1.0 -Dfile=gdata-client-1.40.0.jar -Dpackaging=jar -DgeneratePom=true
Now I get the following error:
[ERROR] Failed to execute goal org.codehaus.xsite:xsite-maven-plugin:1.2:run (default) on project jbehave-distribution: Failed to run xsite: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.xsite:xsite-maven-plugin:1.2:run (default) on project jbehave-distribution: Failed to run xsite
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:319)
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: Failed to run xsite
at org.codehaus.xsite.mojo.XSiteRunMojo.execute(XSiteRunMojo.java:84)
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: java.lang.NullPointerException
at java.util.Arrays$ArrayList.<init>(Arrays.java:3357)
at java.util.Arrays.asList(Arrays.java:3343)
at org.codehaus.xsite.Main.<init>(Main.java:111)
at org.codehaus.xsite.Main.main(Main.java:65)
at org.codehaus.xsite.mojo.XSiteRunMojo.execute(XSiteRunMojo.java:82)
The problem seems to stem from the changes following the upgrades to Nexus 2.0.
I've replaced glassfish with atlassian repo and the build now works from an empty repo, without need to install manually any artifact.
If you are trying to build the distribution, you should use
mvn clean install -Preporting,distribution
if you have used a source zip before (e.g. jbehave-distribution-3.5.4-src.zip), you have to clone from github once to get the current version, if you have done this, you can get the updates with git pull.
Hi Mauro.
After downloading this: 3.6-beta-3
When I run this: "mvn clean install -Preporting,distribution"
I see: [INFO] Building JBehave Distribution 3.6-beta-3
In the downloading, I got this warning: Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.pom
[WARNING] The POM for com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 is missing, no dependency information available
I got this error (same as before without the manually loading gdata-java-client):
[ERROR] Failed to execute goal on project jbehave-distribution: Could not resolve dependencies for project org.jbehave:jbehave-distribution:pom:3.6-beta-3: Could not find artifact com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 in central (http://repo1.maven.org/maven2) -> [Help 1]
I'll try to manually install it again and see if I can get farther.
I pulled the code with this: git clone https://github.com/jbehave/jbehave-core.git
When I ran the following "mvn clean install -Preporting,distribution", it went for a long time and then I lost the error. Rerunning it, I got the following:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Distribution 3.6-beta-3
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.pom
[WARNING] The POM for com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 is missing, no dependency information available
Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.638s
[INFO] Finished at: Sun Mar 04 20:32:47 EST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jbehave-distribution: Could not resolve dependencies for project org.jbehave:jbehave-distribution:pom:3.6-beta-3: Could not find artifact com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 in central (http://repo1.maven.org/maven2) -> [Help 1]
[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/display/MAVEN/DependencyResolutionException
I pulled the code with this: git clone https://github.com/jbehave/jbehave-core.git
When I ran the following "mvn clean install -Preporting,distribution", it went for a long time and then I lost the error. Rerunning it, I got the following:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Distribution 3.6-beta-3
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.pom
[WARNING] The POM for com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 is missing, no dependency information available
Downloading: http://repo1.maven.org/maven2/com/google/gdata/gdata-java-client/1.40.0.atlassian-2/gdata-java-client-1.40.0.atlassian-2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.638s
[INFO] Finished at: Sun Mar 04 20:32:47 EST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project jbehave-distribution: Could not resolve dependencies for project org.jbehave:jbehave-distribution:pom:3.6-beta-3: Could not find artifact com.google.gdata:gdata-java-client:jar:1.40.0.atlassian-2 in central (http://repo1.maven.org/maven2) -> [Help 1]
[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/display/MAVEN/DependencyResolutionException
You need to specificy the settings.xml
mvn -s settings.xml -P...
Thanks Mauro! I got a successful build using mvn -s settings.xml clean install -Pexamples
Maven info:
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
Maven home: /usr/share/maven
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.8", arch: "x86_64", family: "mac"