mvn site with Wildfly 8.1.0 BOM producing errors - maven-3

I have a pom.xml that uses a BOM of Wildfly 8.1.0 Final.
If I run a mvn clean install I have no problem at all. But when I try to run site goal I recieve an error as if Maven was trying to retrieve some artifacts. I am looking around but lots of suggestions seems to not solve my situation, like changing the BOM definition.
This is my stacktrace when I run site
[WARNING] Unable to create Maven project for org.wildfly:wildfly-client-all:pom:8.1.0.Final from repository.
org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Failure to find org.wildfly:wildfly-client-all:pom:8.1.0.Final in http://sienadesenv.azulseguros.com.br:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced for project org.wildfly:wildfly-client-all:pom:8.1.0.Final
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:299)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:236)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.report.projectinfo.dependencies.RepositoryUtils.getMavenProjectFromRepository(RepositoryUtils.java:298)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.getDependencyRow(DependencyManagementRenderer.java:260)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderDependenciesForScope(DependencyManagementRenderer.java:208)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderDependenciesForAllScopes(DependencyManagementRenderer.java:157)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderSectionProjectDependencies(DependencyManagementRenderer.java:150)
at org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderBody(DependencyManagementRenderer.java:136)
at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:83)
at org.apache.maven.report.projectinfo.DependencyManagementReport.executeReport(DependencyManagementReport.java:124)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255)
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:219)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:319)
at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.wildfly:wildfly-client-all:pom:8.1.0.Final in http://sienadesenv.azulseguros.com.br:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:239)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:295)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:288)
... 37 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.wildfly:wildfly-client-all:pom:8.1.0.Final in http://sienadesenv.azulseguros.com.br:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:232)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:599)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:518)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436)
And this is the BOM I am using. I am not sure if the problem seems to be with the BOM file or a issue with Maven (Version 3.2.1).
AS far as I can tell, without the site goal running fine I can not run JaCoCo or Cobertura or Findbugs.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-parent</artifactId>
<version>8.1.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Related

Failed to construct instance from factory method DataflowRunner#fromOptions in beamSql, apache beam

I'm specifying dataflow runner in my beamSql program below :
DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);
options.setStagingLocation("gs://gcpbucket/staging");
options.setTempLocation("gs://gcpbucket/tmp");
options.setProject("beta-19xxxx");
options.setRunner(DataflowRunner.class);
Pipeline p = Pipeline.create(options);
But I'm getting below exception :
Exception in thread "main" java.lang.RuntimeException: Failed to construct instance from factory method DataflowRunner#fromOptions(interface org.apache.beam.sdk.options.PipelineOptions)
at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:233)
at org.apache.beam.sdk.util.InstanceBuilder.build(InstanceBuilder.java:162)
at org.apache.beam.sdk.PipelineRunner.fromOptions(PipelineRunner.java:55)
at org.apache.beam.sdk.Pipeline.create(Pipeline.java:150)
at my.proj.StarterPipeline.main(StarterPipeline.java:34)Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:222)
... 4 more Caused by: java.lang.IllegalArgumentException: Unable to use ClassLoader to detect classpath elements. Current ClassLoader is jdk.internal.loader.ClassLoaders$AppClassLoader#782830e, only URLClassLoaders are supported.
at org.apache.beam.runners.dataflow.repackaged.org.apache.beam.runners.core.construction.PipelineResources.detectClassPathResourcesToStage(PipelineResources.java:43)
at org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:262)
can anyone help me out understand what exactly is the issue ?
Downgrading java 9 to java 8 did the trick.
This problem can happen when using Beam SDK with JVM > 8.
Support for JVM 11 (or 9) is only experimental, starting from Beam SDK 2.12 and at least up to Beam SDK 2.16. This answer provides a bit more context: https://stackoverflow.com/a/57710742/1046584
Regarding this specific stack trace, it seems related to this issue: https://issues.apache.org/jira/browse/BEAM-3718
For me the fix was different. In my pom.xml, below dependency was set to 2.20 while apache beam was set to 2.19
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
<version>2.20</version>
</dependency>
After changing it to same as beam version, build was working fine.
Net Net, just make sure all the beam related sdks are set to same version. Use variable for the same, like ${beamVersion} so you don't end up facing strange errors.

SonarQube cannot blame file

During a code check with SonarQube, I am getting this sort of error
java.lang.IllegalStateException: Error when executing blame for file some/file/in/project/file.hpp
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:85)
at org.sonar.scanner.phases.PublishPhaseExecutor.afterSensors(PublishPhaseExecutor.java:60)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:90)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot delete file 'C:\Path\to\project\.svn\tmp\annotate.3.tmp\annotate.tmp'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteFile(SVNFileUtil.java:1342)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteAll(SVNFileUtil.java:1314)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteAll(SVNFileUtil.java:1305)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:143)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
... 31 more
Some additional information
This project is checked out in a Jenkins job.
No other project checked the same way have this sort of error.
This project is a big project, so code checking takes several hours.
I can blame this file in the error message (some/file/in/project/file.hpp) without problems with TortoiseSVN.
I am using SonarQube 6.7.1 LTS
SonarQube Plugin for SVN has this version 1.6.0.860
svn --version gives me this output, so it seems up to date:
svn, version 1.9.7 (r1800392)
compiled Aug 8 2017, 22:14:48 on x86-microsoft-windows
Copyright (C) 2017 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- using serf 1.3.9 (compiled with 1.3.9)
- handles 'http' scheme
- handles 'https' scheme
The following authentication credential caches are available:
* Wincrypt cache in C:\Users\User\AppData\Roaming\Subversion
What I did
On the SonarQube Server, under Administration -> SCM, I added credentials.
Before doing a SonarQube check, I am now doing a svn upgrade. The same error came up when I was not doing a svn upgrade.
Does anyone have an idea, what I can do to solve this problem?
In jenkins, "Execute SonarQube scanner " plugin, can you give scm disabled parameter ?
-Dsonar.scm.disabled=True
if that does not work, in sonarqube you must disable the scm parameter.
From Project -> General Settings -> SCM -> Disable the SCM Sensor. You must disable soarqube to look for source code.

Sonar: IllegalStateException

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.

Hitting org.apache.maven.lifecycle.LifecycleExecutionException with Maven 3 on Jenkins v1.461

I am trying to switch from Maven 2 to Maven 3 (v3.0.4). The basic command being used is mvn clean verify on jenkins.
When I run a build on jenkins I get the following stack trace on it's console:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
<snip />
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:verify (default) on project myProject: There are test failures.
Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
cause : There are test failures.
Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:verify (default) on project myProject: There are test failures.
Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
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.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
Please refer to /home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:121)
at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:208)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Maven failed with error.
Sending e-mails to: person#org.com
channel stopped
2012-07-11 21:01:31.564:INFO::Shutdown hook executing
2012-07-11 21:01:31.564:INFO::Shutdown hook complete
Archiving artifacts
Sending e-mails to: person#org.com
Finished: SUCCESS
I've tried quite hard searching on the net, trying various pom changes and running maven with -e, -X, -fae etc but nothing seems to allow me shake off this stack trace :( .. been struggling w/ it for a few days now.
Anybody able to help out with some suggestions and/or pin-pointing the issue w/ a solution would be greatly appreciated.
Please note that the project is organized as:
Parent pom
|
----------> module 1
----------> module 2
----------> ...
----------> module 6
where module 6 corresponds to myProject above and it has dependencies on some libraries (i.e. module1, module2 etc).
The parent pom has:
<reporting>
<plugins>
{ several plugins including maven-dependency-plugin, maven-project-info-reports-plugin, cobertura-maven-plugin, maven-surefire-report-plugin (v2.12)
and maven-surefire-report-plugin (v2.12) specifically w/
<reportSets>
<reportSet>
<id>integration-tests</id>
<reports>
<report>failsafe-report-only</report>
</reports>
</reportSet>
</reportSets>
}
</plugins>
<reporting>
and
<build>
<pluginManagement>
<plugins>
{several plugins including maven-surefire-plugin, maven-surefire-report-plugin (v2.12), maven-assembly-plugin, maven-release-plugin (v2.3.2)
</plugins>
</pluginManagement>
<plugins>
{several plugins including maven-site-plugin (v3.1), maven-compiler-plugin (v2.5.1), maven-release-plugin (v2.3.2)
</plugins>
</build>
Please also note that I am seeing the problem exactly when there are test failures i.e. I would like to get a clean (no stack traces et all) console output when there is a test failure. In fact during my above mentioned troubleshooting I actually setup an (intentionally) failing test. Also when I look at '/home/tc/.jenkins/jobs/myProject-selenium-adhoc/workspace/target/failsafe-reports' the failsafe reports/test failure details output looks good i.e. I see my expected test failure screen capture (custom logic in our framework) AND various summary/reports like emailable-report.html with correct contents.
Thank you !

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