gradle/gradle-jdocbook — Issue #7: task with that name already exists
Author: erichschroeter
Created: 2012-03-05 18:31:46+00:00
State: open

I have a gradle file I created using your sample files as an example

buildscript {
repositories {
mavenCentral()
mavenLocal()
mavenRepo name: 'jboss', url: 'http://repository.jboss.org/nexus/content/groups/public/'
}
dependencies { classpath group: 'org.jboss.jdocbook', name:'gradle-jdocbook', version: '1.1.3' }
}

apply plugin: 'jdocbook'

jdocbook {
masterSourceDocumentName = 'manual.xml'
translation 'en-US'

format('html_single') {
name = 'html_single'
finalName = 'index.html'
stylesheet = 'classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl'
}
}

but am getting the following error:

$ gradle :documentation:userguide:buildDocs

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\project\documentation\userguide\build.gradle' line: 12

* What went wrong:
A problem occurred evaluating project ':documentation:userguide'.
> Failed to notify action.
> Cannot add task ':documentation:userguide:renderDocBook_en-US_html_single' as a task with that name already exists.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.157 secs

I know I haven't manually created a `renderDocBook_en-US-html_single` task, so I am guessing the plugin generates it. Am I missing something in my gradle file? Any suggestions?