Apigee maven build tool - maven

I am using the apigee maven build tool
https://github.com/apigee/apigee-deploy-maven-plugin
I keep running into the issue where when I run the plugin and run the sample projects it gives me an IO error when reading the config.json file , when I remove the file everything works fine . Has anybody else faced this error.
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:configure (configure-bundle) on project forecas
ploy-maven-plugin-master%20(3)\apigee-deploy-maven-plugin-master\samples\forecastweatherapi-simple\target\apiproxy\targets\default.xml (The syst
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0
api: java.io.FileNotFoundException: C:\apigee-deploy-maven-plugin-master%20(3)\apigee-deploy-maven-plugin-master\samples\forecastweatherapi-simp
t find the path specified)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.io.FileNotFoundException: C:\apigee-deploy-maven-plugin-master%20(3)\apigee-depl
\target\apiproxy\targets\default.xml (The system cannot find the path specified)
at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.configurePackage(ConfigureMojo.java:74)
at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.execute(ConfigureMojo.java:50)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more

My first suggestion is to use a sane path for maven in windows. I would move out of (%20 directory) in "C:\apigee-deploy-maven-plugin-master%20(3)\"
Please do reply back if the issue still persists.

Maven chokes on special characters in paths - generally this includes all of the reserved characters specified in rfc1738. With paths this typically boils down to a space in the path name which gets encoded but chokes subsequent calls to load files on that path.

Related

What to do if sonarqube fails due to negative SQALE density value

We have upgraded to SonarQube 5.1 and analyze our huge multi-module project with it using Maven. While for several runs the analysis was successful, since some days we now get:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project jahia-dev-root: The SQALE density value should be between 0 and 1.7976931348623157E308 and got -0.004 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project jahia-dev-root: The SQALE density value should be between 0 and 1.7976931348623157E308 and got -0.004
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: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)
Caused by: org.apache.maven.plugin.MojoExecutionException: The SQALE density value should be between 0 and 1.7976931348623157E308 and got -0.004
at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
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: The SQALE density value should be between 0 and 1.7976931348623157E308 and got -0.004
From the log the last sub-module analyzed was a webapp without java files, but just groovy, jsp, javascript and xml files. Anyone has an idea, if there is a workaround or how to proceed solving that problem?
We have upgraded plugins to Java 3.3, Groovy 1.1.1, XML 1.3 last week. Could it be related?
UPDATE 14.07.2015: I found that switching to Default XML Profile with 0 rules activated solved the problem. Before I had the following XML rules active:
Newlines should follow each element
Source code should be indented consistently
Tabulation characters should not be used
I still don't know why activating these XML rules runs into that exception.

Maven Exception While installing the WSO2 ESB Project in developer studio

I am using Developer Studio 3.7.0. I have made a simple ESB project, containing one simple proxy service. But When i maven build the project by using the "clean install" command. I get the following error. I have literally no idea what is wrong.
Note:
I have made a new VM on my machine and I am running Ubuntu 14.04 on it. Outside the VM on my root OS(ubuntu 12.04) the developer studio works fine but inside the VM it is not working. I think i am missing some component.
Error:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (install) on project TestVM: Command execution failed. Cannot run program "mvn" (in directory "/home/omerkhalid/workspace/TestVM/target/capp"): error=2, No such file or directory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (install) on project TestVM: Command execution failed.
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: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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:350)
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.io.IOException: Cannot run program "mvn" (in directory "/home/omerkhalid/workspace/TestVM/target/capp"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:246)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:302)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:589)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:335)
... 21 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 28 more
[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/MojoExecutionException

Issues while deploying Giraph

I am trying to deploying Giraph in order to run some examples. I follow the QuickStart guide, skipping the step Deploying Hadoop, because I have already set up hadoop on my machine as a single node. However I get the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.4:process (default) on project giraph-parent: Error finding remote resources manifests: /opt/giraph/target/maven-shared-archive-resources/META-INF/NOTICE (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.4:process (default) on project giraph-parent: Error finding remote resources manifests
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: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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error finding remote resources manifests
at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.processResourceBundles(ProcessRemoteResourcesMojo.java:1168)
at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.execute(ProcessRemoteResourcesMojo.java:470)
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.io.FileNotFoundException: /opt/giraph/target/maven-shared-archive-resources/META-INF/NOTICE (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at java.io.FileWriter.<init>(FileWriter.java:90)
at org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.processResourceBundles(ProcessRemoteResourcesMojo.java:1076)
... 22 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Can anyone explain me what am I doing wrong? FYI. I have hadoop-1.2.1 and giraph-1.0
Are you running the mvn command in the giraph base folder (here you can see folders like giraph-core, giraph-examples, etc)?
If you are using Hadoop 1.2.1 then specify to mvn to build it for Hadoop 1 by mentioning -Phadoop_1 flag.
I'm not sure but I think maven downloads dependencies over the internet so make sure your internet connection is working and maven can connect to the internet.
I have Hadoop 1.2.1 and Giraph 1.1.0, maven version 3, and jdk 7. It worked for me just by following the quick start guide + adding -Phadoop_1 command.

Build failure when generating site with maven-site-plugin

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.

Build failure for maven plugin with inheritance

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.

Resources