we're currently working on an automatic process to checkout, build and deploy the SBTSDK to our tomcat.
So i cloned the rep from github and try to build the project with maven from command line.
At the moment im stuck at the following error:
[INFO] Computing target platform for MavenProject: com.ibm.sbt.prereq:com.ibm.sb
t.libs.j2ee:1.0.0 # C:\sbtsdk\prereqs\eclipse\plugins\com.ibm.sbt.libs.j2
ee\pom.xml
[INFO] Adding repository http://dubgsa.ibm.com/gsa/dubgsa/home/m/w/mwdu1054/web/
public/repository/p2
[ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.
ProvisionException: Bad HTTP Request: http://dubgsa.ibm.com/gsa/dubgsa/home/m/w/
mwdu1054/web/public/repository/p2/content.xml: HttpClient connection error respo
nse code 400. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeExcept
ion: org.eclipse.equinox.p2.core.ProvisionException: Bad HTTP Request: http://du
bgsa.ibm.com/gsa/dubgsa/home/m/w/mwdu1054/web/public/repository/p2/content.xml
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
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(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionExce
ption: Bad HTTP Request: http://dubgsa.ibm.com/gsa/dubgsa/home/m/w/mwdu1054/web/
public/repository/p2/content.xml
at org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository
(TargetPlatformBuilderImpl.java:247)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addEntireP2Rep
ositoryToTargetPlatform(P2TargetPlatformResolver.java:314)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.computeTargetP
latform(P2TargetPlatformResolver.java:203)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolv
eProject(DefaultTychoDependencyResolver.java:94)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProj
ectsRead(TychoMavenLifecycleParticipant.java:82)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 11 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: Bad HTTP Request: htt
p://dubgsa.ibm.com/gsa/dubgsa/home/m/w/mwdu1054/web/public/repository/p2/content
.xml
at org.eclipse.equinox.internal.p2.repository.CacheManager.createCache(C
acheManager.java:192)
at org.eclipse.tycho.p2.remote.TychoP2RepositoryCacheManager.createCache
(TychoP2RepositoryCacheManager.java:62)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRep
ositoryFactory.getLocalFile(SimpleMetadataRepositoryFactory.java:66)
at org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRep
ositoryFactory.load(SimpleMetadataRepositoryFactory.java:88)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.loadRepository(AbstractRepositoryManager.java:758)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepository
Manager.loadRepository(AbstractRepositoryManager.java:651)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositor
yManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepos
itory(RemoteMetadataRepositoryManager.java:82)
at org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository
(TargetPlatformBuilderImpl.java:234)
... 17 more
Caused by: org.eclipse.ecf.filetransfer.BrowseFileTransferException: HttpClient
connection error response code 400.
at org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientFileSystem
Browser.runRequest(HttpClientFileSystemBrowser.java:254)
at org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowse
r$DirectoryJob.run(AbstractFileSystemBrowser.java:69)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Since i found the following readme file i wonder if it is even possible to build the project without eclipse.
The build is still under development, we are working on removing the
internal dependancies. Please import the projects into an Eclipse
workspace and use Eclipse to build the SDK projects.
Thanks for your help.
We are working at fixing this problem for non domino users.
The update will be merged the end of this week.
You can check out the working maven build out of my git tree, pure-maven branch:
https://github.com/LorenzoBoccaccia/SocialSDK/tree/pure-maven
This will allow you to test your tomcat integration and should be painless to upgrade to the upstream tree after the merger.
Related
A week ago, all our code analysis jobs stopped working with the error message you see at the end of this post. We have not upgraded anything, it simply stopped working. The only difference I see in the jenkins logs is, that a different version of the sonar-maven-plugin ist used. It was 2.6 before and it is 2.7.1 now. And we don't know, where the information comes from.
Our infrastucture:
Jenkins 1.565.3
Jenkins Sonar Plugin 2.1
Sonarqube 3.1.1
Maven 3.0.3
We have no information about sonar-maven-plugin placed in the pom. Everything is handled by the Jenkins Sonar Plugin.
I noticed a difference between the last build, where the code analysis was working and the first build where it faild:
Working logmessing:
Downloading: https://artifactory.nepatec.de/repo/org/codehaus/mojo/sonar-maven-plugin/2.6/sonar-maven-plugin-2.6.pom
Message the failed build:
Downloading: https://artifactory.nepatec.de/repo/org/codehaus/mojo/sonar-maven-plugin/2.7.1/sonar-maven-plugin-2.7.1.pom
We don't know where the version change comes from, because it is not defined in the jenkins sonar plugin and we also did not find a way to configure it.
Does anyone know, why the version jump comes from and what we can do, to revert it?
The Build always fails with the following Exception:
05.11.2015 09:08:35 org.sonatype.guice.bean.reflect.NamedClass
WARNUNG: Error injecting: org.codehaus.mojo.sonar.SonarMojo
java.lang.TypeNotPresentException: Type org.codehaus.mojo.sonar.SonarMojo not present
at org.sonatype.guice.bean.reflect.URLClassSpace.loadClass(URLClassSpace.java:100)
at org.sonatype.guice.bean.reflect.NamedClass.load(NamedClass.java:45)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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: java.lang.UnsupportedClassVersionError: org/codehaus/mojo/sonar/SonarMojo : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.sonatype.guice.bean.reflect.URLClassSpace.loadClass(URLClassSpace.java:96)
... 33 more
The latest release of the Maven SonarQube Plugin requires Java 7 at least, see MSONAR-126.
So you have to update your Jenkins configuration to eun (at least) the SonaQube analyses using Java 7+.
Recently (this morning) I stumbled across the following problem :
Jenkins build on one of my projects was failing.
I tried to make it work locally on my machine and was quite pleased (yet scared) to see it build seamlessly.
I, then, logged back to the jenkins machine to try to manually launch the mvn clean install and discovered that cute little error all over my build log.
[WARNING] Failed to read resolution tracking file /var/lib/jenkins/.m2/repository/local/org/apache/maven/plugins/maven-clean-plugin/2.4.1/_maven.repositories
java.io.IOException: Aucun verrou disponible
at sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1021)
at org.sonatype.aether.impl.internal.TrackingFileManager.lock(TrackingFileManager.java:203)
at org.sonatype.aether.impl.internal.TrackingFileManager.read(TrackingFileManager.java:58)
at org.sonatype.aether.impl.internal.EnhancedLocalRepositoryManager.readRepos(EnhancedLocalRepositoryManager.java:144)
at org.sonatype.aether.impl.internal.EnhancedLocalRepositoryManager.find(EnhancedLocalRepositoryManager.java:69)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:307)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
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:606)
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)
Unfortunately I don't have the faintest idea of the reason why I get this.
My internet researches so far suggest that would be related to NFS somehow but :
I don't know the first thing on NFS
The person that could answer on the subject of the jenkins machine configuration is not anywhare around (and isn't likely to be anytime soon).
This is related to a bug: http://jira.codehaus.org/browse/MNG-5629
which is unresolved as at 2015-01-06. :(
Encounter this with the versions-maven-plugin also.
Just an FYI... I encountered similar issues when trying to build Maven Eclipse project (even when doing just the basic "Run As Maven Clean"). This seems to related to my U:\drive and the VPN.... I encountered the above problem when working from home using VPN access (ps. I can open up any files on my U: drive no problem). When I am working inside my company, then the problem doesn't come up.
My environment:
Windows 7 64bit
Eclipse Mars 4.5.2
with Maven Integration for Eclipse 1.6.2.20150902
U:\Profile.m2\settings.xml (my Maven settings.xml file is on local drive).
I installed Maven (3.3.9) and ran mvn clean successfully on the command line. This is consistently no matter even when I worked from home with the VPN access.
After having merged a big set of changes from the projects master branch into my own branch, the build performed by the CI server configured with 'mvn package site' now fails ('mvn package' works fine). The site generation also works on my local development machine running win7.
The maven-site-plugin 3.3 is being used (as there where other issues using 3.0)
I can't find any useful hint in the stack trace shown at the end of the maven build:
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project pms-core: Error during page generation
cause : Error during page generation
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project pms-core: Error during page generation
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.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
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.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:104)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
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:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page generation
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error rendering Maven report:
Exit code: 1 - javadoc: error - An error occurred during diagram generation: java.lang.IllegalStateException: Failed to find an insertion point.
java.lang.IllegalStateException: Failed to find an insertion point.
at org.jboss.apiviz.APIviz.instrumentDiagram(APIviz.java:322)
at org.jboss.apiviz.APIviz.generateOverviewSummary(APIviz.java:187)
at org.jboss.apiviz.APIviz.start(APIviz.java:69)
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 com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
Command line was: /opt/java/sdk/Sun/x86_64/jdk1.7.0_25/jre/../bin/javadoc #options #packages
Refer to the generated Javadoc files in '/scratch/jenkins/workspace/taconaut/pms-mlx/core/target/site/testapidocs' dir.
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:233)
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)
... 29 more
Caused by: org.apache.maven.reporting.MavenReportException:
Exit code: 1 - javadoc: error - An error occurred during diagram generation: java.lang.IllegalStateException: Failed to find an insertion point.
java.lang.IllegalStateException: Failed to find an insertion point.
at org.jboss.apiviz.APIviz.instrumentDiagram(APIviz.java:322)
at org.jboss.apiviz.APIviz.generateOverviewSummary(APIviz.java:187)
at org.jboss.apiviz.APIviz.start(APIviz.java:69)
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 com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
Command line was: /opt/java/sdk/Sun/x86_64/jdk1.7.0_25/jre/../bin/javadoc #options #packages
Refer to the generated Javadoc files in '/scratch/jenkins/workspace/taconaut/pms-mlx/core/target/site/testapidocs' dir.
at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeJavadocCommandLine(AbstractJavadocMojo.java:4997)
at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1975)
at org.apache.maven.plugin.javadoc.TestJavadocReport.executeReport(TestJavadocReport.java:160)
at org.apache.maven.plugin.javadoc.JavadocReport.generate(JavadocReport.java:126)
at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:228)
... 33 more
channel stopped
Can someone point me into the right direction? Is this a bug of the maven-site-plugin or something I should adapt in my code?
Git repository: https://github.com/taconaut/pms-mlx
CI: https://buildhive.cloudbees.com/job/taconaut/job/pms-mlx/ (build #39 failed because of this issue, for build #40 I've removed the site generation to have a working CI)
[update] Googling for the message 'An error occurred during diagram generation: java.lang.IllegalStateException: Failed to find an insertion point.', I've found the source of the exception in the apiviz library. This makes me think it's a library bug, right?
The issue was solved by updating the version of apiviz library to the latest version.
So, I have a multi-tiered Maven project. I'm using maven version 3.0.3 and Sonatype Nexus 2.0.3 hosted on Tomcat 6.0.24. The project builds (mvn clean install) cleanly, but mvn deploy fails on a random bundle halfway through. Deploying that bundle by hand also fails. I can use mvn deploy -rf :<next-bundle> and deploy the remainder of my artifacts, but that one bundle fails to upload. It also fails to upload if I do a mvn deploy on just that directory/project.
If I run mvn -X deploy, I get the following stack trace:
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexushost:8080/nexus/content/repositories/my-snapshots/ as nexusadmin
Downloading: http://nexushost:8080/nexus/content/repositories/my-snapshots/my-toplevel/catalog/failing-project-name/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata my-toplevel.catalog:failing-project-name:1.2.0-SNAPSHOT/maven-metadata.xml from/to snapshots (http://nexushost:8080/nexus/content/repositories/my-snapshots/): Access denied to: http://nexushost:8080/nexus/content/repositories/my-snapshots/my-toplevel/catalog/failing-project-name/1.2.0-SNAPSHOT/maven-metadata.xml
org.sonatype.aether.transfer.MetadataTransferException: Could not transfer metadata my-toplevel.catalog:failing-project-name:1.2.0-SNAPSHOT/maven-metadata.xml from/to snapshots (http://nexushost:8080/nexus/content/repositories/my-snapshots/): Access denied to: http://nexushost:8080/nexus/content/repositories/my-snapshots/my-toplevel/catalog/failing-project-name/1.2.0-SNAPSHOT/maven-metadata.xml
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:932)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$3.wrap(WagonRepositoryConnector.java:923)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445)
at org.sonatype.aether.impl.internal.DefaultDeployer.upload(DefaultDeployer.java:379)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:260)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:215)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:480)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:156)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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: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.wagon.authorization.AuthorizationException: Access denied to: http://nexushost:8080/nexus/content/repositories/my-snapshots/my-toplevel/catalog/failing-project-name/1.2.0-SNAPSHOT/maven-metadata.xml
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:119)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)
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)
When this happens, exactly zero output is emitted to either the tomcat log ($tomcat_home/logs/catalina.out) or the Sonatype Nexus logs ($tomcat_home/sonatype-work/nexus/logs/nexus.log), even with Sonatype's log level set to DEBUG. The expected tree on the filesystem is totally empty, and the Tomcat user has full permissions on the entire sonatype-work tree. This behavior is consistent, even if I rename the bundle in question. If I rename a different project (one that uploads successfully via 'mvn deploy') to failing-project-name, it works. There aren't any obvious items in the POM that are different - it's basically identical to all my other POMS; I specify a few dependencies, and have build steps for cxf-codegen and maven-bundle-plugin.
Any thoughts? Any suggestions on how to even debug this?
Found it. I was being bitten by this bug:
https://issues.apache.org/jira/browse/CXF-4687
Certain versions of apache's cxf-codegen-plugin (including 2.6.2, the one I was using) mess with proxy settings. The reason I wasn't seeing any entry in the Nexus logs is because the proxy settings were keeping the request from even getting there.
I have written a Maven plugin abstractor, called maven-base-plugin. This plugin goes over all classes and resources and performs certain tasks. Since it is an abstract plugin, this plugin does not have its packaging set to maven-plugin, but rather "jar".
I have another plugin, tools-reporter, that using the above plugin API, creates reports for my project. Again, the reports and destinations for the reports are interfaces, so that they could be extended in future. Again, this project has a packaging of "jar".
Now, I have a third plugin, depending on the reporter plugin generating certain reports for use on artifacts and resources. This plugin has its packaging set to "maven-plugin". What's kept me stale for a while now, and various inspections have not solved it, is that I cannot build this third plugin successfully.
When I do, I get:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:2.3:descriptor (default-descriptor) on project tools-reporter-sample: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:2.3:descriptor failed: 0 -> [Help 1]
The details say:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:2.3:descriptor (default-descriptor) on project tools-reporter-sample: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:2.3:descriptor failed: 0
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: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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:2.3:descriptor failed: 0
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 25 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.getJavaClass(JavaMojoDescriptorExtractor.java:534)
at org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor.execute(JavaMojoDescriptorExtractor.java:553)
at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:84)
at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:135)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 26 more
Any help or insight would be much appreciated.
By the way, I have tried various combination of setting packaging to different values. The only thing that works is announcing the third plugin, tools-reporter-sample as a simple "jar", which is kind of counterproductive, since it eliminates the whole purpose of this exercise.
This is the gist to the offending code:
https://gist.github.com/3128364
Here is a description of what each of this is for:
AbstractPluginExecutor.java: The original base plugin that is bundled as a jar and is used by the basic reports plugin
mave-base-plugin-pom.xml: The pom.xml file for the base maven plugin
Executor.java: The abstract class that takes care of all the reporting goodness.
tools-reporter-pom.xml: The pom.xml file for the base report plugin.
Reporter.java: The sample plugin that is actually supposed to run.
tools-reporter-sample-pom.xml: The pom.xml file for the sample report plugin.
It turns out that the failure was not due to the plugins hierarchical design at all. But rather strangely, having the plugin include an annotation in its classpath did it. I had a class, #interface Sample {. Once I removed it, everything was solved.
I have not yet figured out why, though.