Cannot write to file javadoc.options

Hi,

I am running doclet from gradle and get this error below:

here is gradle script: apply plugin: ‘java’ apply plugin: ‘maven’

group = ‘com.primesystems’ version = ‘1.0-SNAPSHOT’

description = ‘getting-started’

sourceCompatibility = 1.6 targetCompatibility = 1.6

repositories {

mavenCentral() }

dependencies {

testCompile group: ‘junit’, name: ‘junit’, version:‘4.10’

compile group: ‘org.apache.commons’, name: ‘commons-jexl’, version:‘2.1.1’

compile group: ‘org.simpleframework’, name: ‘simple-xml’, version: ‘2.6.6’

compile group: ‘org.slf4j’, name: ‘slf4j-api’, version: ‘1.6.5’

compile group: ‘org.slf4j’, name: ‘slf4j-log4j12’, version: ‘1.6.5’ }

task mydoc(type: Javadoc) {

source = sourceSets.main.allJava

classpath = sourceSets.main.compileClasspath

exclude { it.getName().equals(‘Association.java’); }

options.docletpath = [file(‘D:/download/dsoftware/google/doclava-1.0.6/doclava-1.0.6.jar’)]

options.doclet = ‘com.google.doclava.Doclava’

options.bootClasspath = [‘d:/software/jdk/jdk1.6.0_38/jre/lib’]

}

D:\work\android\converter_app\converter_model>gradle --stacktrace mydoc :mydoc FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:mydoc’. > Could not write to file ‘D:\work\android\converter_app\converter_model\build\tmp\mydoc\javad oc.options’.

  • Try: Run with --info or --debug option to get more log output.

  • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:mydoc’.

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(E xecuteActionsTaskExecuter.java:69)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteA ctionsTaskExecuter.java:46)

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(P ostExecutionAnalysisTaskExecuter.java:35)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDa teTaskExecuter.java:64)

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTa skExecuter.java:58)

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(Sk ipEmptySourceFilesTaskExecuter.java:42)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipT askWithNoActionsExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTa skExecuter.java:53)

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(Execu teAtMostOnceTaskExecuter.java:43)

at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask .java:289)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeT ask(AbstractTaskPlanExecutor.java:79)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processT ask(AbstractTaskPlanExecutor.java:63)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(Abst ractTaskPlanExecutor.java:51)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecu tor.java:23)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExe cuter.java:86)

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionActio n.java:29)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)

at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)

at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction. java:32)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher .java:166)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java: 113)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(In ProcessBuildActionExecuter.java:64)

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)

at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionE xecuter.java:35)

at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.ja va:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDiscon nection.java:42)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecat ionLogger.java:24)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfB uildAndStop.java:33)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput .java:71)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput .java:69)

at org.gradle.util.Swapper.swap(Swapper.java:38)

at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInpu t.java:69)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.ja va:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishB uildEnvironment.java:60)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.ja va:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuild OrRespondWithBusy.java:45)

at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoor dinator.java:186)

at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBui ldOrRespondWithBusy.java:49)

at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.ja va:34)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAct ion.java:39)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAn dForwardDaemonFailure.java:32)

at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommand Execution.java:125)

at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand( DefaultDaemonCommandExecuter.java:51)

at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker .handleCommand(DefaultIncomingConnectionHandler.java:155)

at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker .receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)

at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker .run(DefaultIncomingConnectionHandler.java:116)

at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(D efaultExecutorFactory.java:64) Caused by: org.gradle.api.UncheckedIOException: Could not write to file ‘D:\work\android\conve rter_app\converter_model\build\tmp\mydoc\javadoc.options’.

at org.gradle.internal.IoActions$TextFileWriterIoAction.execute(IoActions.java:115)

at org.gradle.internal.IoActions$TextFileWriterIoAction.execute(IoActions.java:91)

at org.gradle.internal.IoActions.writeTextFile(IoActions.java:38)

at org.gradle.internal.IoActions.writeTextFile(IoActions.java:48)

at org.gradle.external.javadoc.internal.JavadocOptionFileWriter.write(JavadocOptionFil eWriter.java:40)

at org.gradle.external.javadoc.internal.JavadocOptionFile.write(JavadocOptionFile.java :113)

at org.gradle.external.javadoc.CoreJavadocOptions.write(CoreJavadocOptions.java:505)

at org.gradle.external.javadoc.internal.JavadocExecHandleBuilder.getExecHandle(Javadoc ExecHandleBuilder.java:71)

at org.gradle.api.tasks.javadoc.Javadoc.executeExternalJavadoc(Javadoc.java:137)

at org.gradle.api.tasks.javadoc.Javadoc.generate(Javadoc.java:129)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Standar dTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Standar dTaskAction.execute(AnnotationProcessingTaskFactory.java:212)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Standar dTaskAction.execute(AnnotationProcessingTaskFactory.java:201)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:53 3)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:51 6)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(Ex ecuteActionsTaskExecuter.java:80)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(E xecuteActionsTaskExecuter.java:61)

… 66 more Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File

at org.gradle.external.javadoc.internal.JavadocOptionFileWriterContext.writePathOption (JavadocOptionFileWriterContext.java:100)

at org.gradle.external.javadoc.internal.PathJavadocOptionFileOption.writeCollectionVal ue(PathJavadocOptionFileOption.java:35)

at org.gradle.external.javadoc.internal.AbstractListJavadocOptionFileOption.write(Abst ractListJavadocOptionFileOption.java:54)

at org.gradle.external.javadoc.internal.JavadocOptionFileWriter$1.doExecute(JavadocOpt ionFileWriter.java:52)

at org.gradle.external.javadoc.internal.JavadocOptionFileWriter$1.doExecute(JavadocOpt ionFileWriter.java:40)

at org.gradle.internal.ErroringAction.execute(ErroringAction.java:35)

at org.gradle.internal.IoActions$TextFileWriterIoAction.execute(IoActions.java:110)

… 83 more

BUILD FAILED

Total time: 2.632 secs

‘options.bootClasspath’ needs to be set to a list of 'File’s, not a list of 'String’s.