[ 
https://jira.codehaus.org/browse/MPIR-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360614#comment-360614
 ] 

Michael Osipov edited comment on MPIR-247 at 1/4/15 9:17 AM:
-------------------------------------------------------------

The metadata file is far from being complete. Are you sure that it is already 
sorted? I presumed the file contains versions as they are added. Not 
necessarily sorted. E.g., 6.1.2, 6.2, 6.1.3, 6.2.1. Can this happen? Have a 
look at  
[this|http://repo.maven.apache.org/maven2/net/fckeditor/java-core/maven-metadata.xml]
 example.

If this is negligible, I would throw away my branch and take your fix or turn 
my exception into a {{log.error}}.


was (Author: michael-o):
The metadata file is far from being complete. Are you sure that it is already 
sorted? I presumed the file contains versions as they are added. Not 
necessarily sorted. E.g., 6.1.2, 6.2, 6.1.3, 6.2.1. Can this happen? Have a 
[look|http://repo.maven.apache.org/maven2/net/fckeditor/java-core/maven-metadata.xml]
 at this example.

If this is negligible, I would throw away my branch and take your fix or turn 
my exception into a {{log.error}}.

> "Comparison method violates its general contract!" while generating site
> ------------------------------------------------------------------------
>
>                 Key: MPIR-247
>                 URL: https://jira.codehaus.org/browse/MPIR-247
>             Project: Maven Project Info Reports Plugin
>          Issue Type: Bug
>          Components: dependency-management
>    Affects Versions: 2.4
>         Environment: java version "1.7.0_04"
> Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
> Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
> maven 3.0.4
>            Reporter: Mirek Hankus
>            Assignee: Michael Osipov
>             Fix For: 2.8
>
>         Attachments: MPIR-247.zip
>
>
> While generating site, I'm getting exception as follows.
> {code}
> message : Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on project 
> netpr-aggregator: Execution default-site of goal 
> org.apache.maven.plugins:maven-site-plugin:3.1:site failed: Comparison method 
> violates its general contract!
> cause : Execution default-site of goal 
> org.apache.maven.plugins:maven-site-plugin:3.1:site failed: Comparison method 
> violates its general contract!
> Stack trace : 
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-site-plugin:3.1:site (default-site) on 
> project netpr-aggregator: Execution default-site of goal 
> org.apache.maven.plugins:maven-site-plugin:3.1:site failed: Comparison method 
> violates its general contract!
>       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.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:601)
>       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:326)
>       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:1110)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>       at java.lang.Thread.run(Thread.java:722)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> default-site of goal org.apache.maven.plugins:maven-site-plugin:3.1:site 
> failed: Comparison method violates its general contract!
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>       ... 27 more
> Caused by: java.lang.IllegalArgumentException: Comparison method violates its 
> general contract!
>       at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:835)
>       at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:453)
>       at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
>       at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
>       at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
>       at java.util.Arrays.sort(Arrays.java:472)
>       at java.util.Collections.sort(Collections.java:155)
>       at 
> org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.getDependencyRow(DependencyManagementRenderer.java:228)
>       at 
> org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderDependenciesForScope(DependencyManagementRenderer.java:204)
>       at 
> org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderDependenciesForAllScopes(DependencyManagementRenderer.java:153)
>       at 
> org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderSectionProjectDependencies(DependencyManagementRenderer.java:146)
>       at 
> org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer.renderBody(DependencyManagementRenderer.java:132)
>       at 
> org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:79)
>       at 
> org.apache.maven.report.projectinfo.DependencyManagementReport.executeReport(DependencyManagementReport.java:116)
>       at 
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
>       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:101)
>       ... 28 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to