Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6775

GroovyDoc reports Exception: groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: comparator for class: java.util.TreeMap

    XMLWordPrintableJSON

Details

    Description

      When starting and creating our help with groovydoc within a gradle build we got the following exception:

      groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: comparator for class: java.util.TreeMap
      

      As a result no index-all.html file is generated, so we have no index and overview at all.

      => Stacktrace is attached

      Gradle code:

      def javaDocForHelp = task javadocForHelp(type: JavaExec, group:"documentation") {
      	description = "This creates the documentation of the facade classes from the XYZ engine"
      	// beware, the Groovydoc tool behaves strangely in some cases; e.g. if you change the order
      	// of arguments or make a mistake, it might silently fail or ignore some parameters
      	// for an explanation of the parameters, enter "groovydoc -help" on the command line
      	def scriptingEngineSourceDirs = project(":XYZ-engine").sourceSets.main.groovy.srcDirs
      	scriptingEngineSourceDirs.each { inputs.dir(it) }
      	ext.javadocDir = new File(docDir, "javadoc")
      	outputs.dir(javadocDir)
      	classpath configurations.compile.files
      	main = "org.codehaus.groovy.tools.groovydoc.Main"
      	args "-sourcepath", scriptingEngineSourceDirs.join(File.pathSeparator)
      	args "-d", javadocDir.path
      	// packages
      	args "XYZ.scripting.facade"
      	args "XYZ.scripting.facade.security"
      	args "XYZ.scripting.facade.structure"
      	args "XYZ.utils"
      	doFirst {
      		javadocDir.mkdirs()
      	}
      }
      

      Attachments

        1. StacktraceGroovyDoc.txt
          5 kB
          Michael Inden

        Activity

          People

            paulk Paul King
            michaeli Michael Inden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: