Sonar: IllegalStateException - maven-3

I am trying to setup sonar on Ubuntu 12.04 machine. However, when I run mvn (maven 3.0.4), it fails with this exception. The sonar server is running fine, I can access it from browser.
Here is my sonar profile in settings.xml (~/.m2/settings.xml)
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:h2:tcp://localhost:9092/sonar</sonar.jdbc.url>
<sonar.jdbc.driver>org.h2.Driver</sonar.jdbc.driver>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
</properties>
</profile>
</profiles>
Exception:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project configurator: Can not execute Sonar: IllegalStateException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project configurator: Can not execute Sonar
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:320)
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: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
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.IllegalStateException
at org.sonar.home.cache.FileCache.newTempFile(FileCache.java:143)
at org.sonar.home.cache.FileCache.get(FileCache.java:83)
at org.sonar.batch.bootstrap.PluginDownloader.downloadPlugin(PluginDownloader.java:53)
at org.sonar.batch.bootstrap.BatchPluginRepository.doStart(BatchPluginRepository.java:74)
at org.sonar.batch.bootstrap.BatchPluginRepository.start(BatchPluginRepository.java:65)
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.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:72)
at org.sonar.batch.bootstrap.Container.start(Container.java:71)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:88)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:72)
at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:142)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
... 23 more
Let me know if you need any additional information.

The stack trace told us that the current plugin is org.codehaus.mojo:sonar-maven-plugin:2.0 which is quite old, since 05-Nov-2011.
I would like to recommend not to define it in our pom.xml as mentionins at Analyzing with Maven: Recommended Way as the following:-
mvn clean install -DskipTests=true
mvn sonar:sonar
skipTests=true not to run unit tests twice: during the install goal and again during the sonar goal. You can also deactivate the integration tests execution. Please refer to the Maven documentation.
Anyhow If you would like to define it explicitly, please use the latest one which is matched with your Sonar server version. e.g. I'm using the current Sonar server version 3.5. The plugin should be either, org.codehaus.sonar:sonar-maven-plugin:3.5 or org.codehaus.sonar:sonar-maven3-plugin:3.5
Even the Installing and Configuring Maven also told us that the sonar.host.url is an optional (the default is http://localhost:9000), I also would like to encourage to define it explicitly as well.
I hope this may help.

Related

SonarQube with Jenkins Error :Fail to download libraries from server

I have updated Sonar to version 7.9.2 and now while trying to give build through Jenkins getting below error.
BUILD FAILED
org.sonar.runner.impl.RunnerException: Unable to execute SonarQube
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:100)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:87)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:87)
at org.sonar.runner.impl.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:83)
at org.sonar.runner.api.EmbeddedRunner.doStart(EmbeddedRunner.java:249)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:187)
at org.sonar.runner.api.EmbeddedRunner.start(EmbeddedRunner.java:182)
at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:66)
at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:55)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:93)
at org.sonar.runner.impl.Jars.download(Jars.java:70)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:40)
at org.sonar.runner.impl.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:91)
... 25 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonar.runner.impl.Jars.downloadFiles(Jars.java:87)
... 28 more
Not able to understand which libraries are not getting downloaded.
Other Details
Apache Ant version 1.7.1
SonarQube Ant Task version: 2.4
sonarqube-7.9.2
Also want to update that the default java version is 1.7.80 which is used to compile the source code whereas for running sonarqube java 11 is being used.
Please suggest.
Let me know in case any additional details are required.

maven3 - getting error on mvn dependency:tree command

I've a project that uses maven 3. I get the following error when I run mvn dependency:tree command. Could someone advise why would I get this error?
"mvn -version"
Apache Maven 3.0 (r1004208; 2010-10-04 07:50:56-0400)
Java version: 1.6.0_16
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:tree (default-cli) on project : Cannot build project dependency graph: org.apache.maven.project.MavenProject.getProjectBuildingRequest() -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:tree (default-cli) on project wesp-dgw: Cannot build project dependency graph
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
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:314)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
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: Cannot build project dependency graph
at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more
Caused by: org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: org.apache.maven.project.MavenProject.getProjectBuildingRequest()
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:92)
at org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:63)
at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:216)
... 21 more
Caused by: java.lang.NoSuchMethodException: org.apache.maven.project.MavenProject.getProjectBuildingRequest()
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.invoke(Maven3DependencyGraphBuilder.java:99)
at org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:68)
... 23 more
The error goes away with maven 3.0.5. I'm not sure whether that was a bug in maven 3.0 or configuration issue.

Error running mvn clean install

using Eclipse to try and build a maven project with Eclipse. Anyway when I try to run mvn clean install I get the following error
Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1
Its calling a MojoExecutionException.
Anyway I am getting the code from a subversion repository which works for others so its not the pom file. I done some googling and it mentions it could be the JBoss version I have running which could be causing the issue. I am using JBoss6.1.0. Also using Maven 3.0.4
Anyone have any ideas? If you need more info just let me know. Thanks.
EDIT: Full stack trace
[ERROR] Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume: Process terminated with code 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.ws.plugins:maven-jaxws-tools-plugin:1.0.1.GA:wsconsume (default) on project sso: Error while running wsconsume
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:320)
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: Error while running wsconsume
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:157)
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.Exception: Process terminated with code 1
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumerOutOfProcess(WSContractDelegate.java:133)
at org.jboss.ws.plugins.tools.WSContractDelegate.runConsumer(WSContractDelegate.java:99)
at org.jboss.ws.plugins.tools.AbstractWsConsumeMojo.execute(AbstractWsConsumeMojo.java:149)
... 21 more
Well figured it out anyway. Turns out it was a windows limitation with file names. The file path was too long. As such once I moved it to a folder just below root, eg. C:/folder_here then it worked. Also switched to JDK 1.7 because another problem with windows means that if you use 1.6 you need to download another couple of jars. Anyway hope this helps someone else out.

org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact - when using mvn 3.0.4 (works with mvn 3.0.3!)

With some multi-module maven project we'r having the following exception when using maven 3.0.4:
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:resources (default) on project genericapi: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:resources failed: Plugin org.codehaus.mojo:gwt-maven-plugin:1.3.2.google or one of its dependencies could not be resolved: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:resources (default) on project genericapi: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:resources failed: Plugin org.codehaus.mojo:gwt-maven-plugin:1.3.2.google or one of its dependencies could not be resolved: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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:320)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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.PluginExecutionException: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:resources failed: Plugin org.codehaus.mojo:gwt-maven-plugin:1.3.2.google or one of its dependencies could not be resolved: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:82)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.codehaus.mojo:gwt-maven-plugin:1.3.2.google or one of its dependencies could not be resolved: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:215)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:353)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:321)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:175)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:78)
... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:207)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact dom4j:dom4j:jar:1.6.1 in gwt-plugin-repo (http://google-web-toolkit.googlecode.com/svn/2.1.0.M3/gwt/maven)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
[ERROR]
[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/PluginResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :genericapi
Note: I compared the logs of mvn3.0.3/mvn3.0.4, they look equal, the only different is the exception that only occurs with 3.0.4,
More to say, I checked out maven trunk and changed Aether from ver 1.13.1 to 1.12 and everything works just fine! that means it's probably a bug introduced in Aether 1.13 and above.
Any help would be highly appreciated !

Gail Maven - OSGI Bundle as a Dependency - Resolution Issue

I am trying to use hector-core as a dependency in a grails maven build.
<dependency>
<groupId>me.prettyprint</groupId>
<artifactId>hector-core</artifactId>
<version>1.0-3</version>
<type>bundle</type>
</dependency>
I am getting an error
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution. Encountered problems resolving dependencies of the executable in preparation for its execution. Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced
Failed to execute goal on project igiveplatform: Could not resolve dependencies
for project com.igivefirst:igiveplatform:war:0.1-SNAPSHOT: Failure to find
me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core
was cached in the local repository, resolution will not be reattempted until the
update interval of grails has elapsed or updates are forced
The build is trying to download .bundle file instead of .jar which is in the maven repository. Grails builds this project normally.
Thanks in advance!
As recommended below I removed the type tag ... another error now
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-compile (default) on project igiveplatform: Failed to create classpath for Grails execution.
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:320)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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 create classpath for Grails execution.
at org.grails.maven.plugin.AbstractGrailsMojo.generateGrailsExecutionClasspath(AbstractGrailsMojo.java:427)
at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:225)
at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:206)
at org.grails.maven.plugin.MvnCompileMojo.execute(MvnCompileMojo.java:41)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Failure to find me.prettyprint:hector-core:bundle:1.0-3 in http://repo.grails.org/grails/core was cached in the local repository, resolution will not be reattempted until the update interval of grails has elapsed or updates are forced
The dependency type should be jar, not bundle.
(Have a look at a similar question, Why can't maven find an osgi bundle dependency?)

Resources