Using umlGraph in javadoc


(jdenet.anteo) #1

Hi,

I’m trying to generate javadoc with class diagram with umlGraph doclet but I have an IOException during the build (The process cannot access the file because another process has locked a portion of the file).

Here is my build file for javadoc:

javadoc {
 options.docletpath = 'devlib/UmlGraph.jar' as List
 options.doclet = "org.umlgraph.doclet.UmlGraphDoc"
}

Here is the stacktrace when I launch the command gradle clean javadoc:

:clean
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
:processResources
:classes
:javadoc
  FAILURE: Build failed with an exception.
  * What went wrong:
java.io.IOException: Le processus ne peut pas accÚder au fichier car un autre processus en a verrouillÚ une partie
> Le processus ne peut pas accÚder au fichier car un autre processus en a verrouillÚ une partie
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.UncheckedIOException: java.io.IOException: Le processus ne peut pas accéder au fichier car un autre processus en a verrouillé une partie
        at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:57)
        at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:34)
        at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:24)
        at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:51)
        at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:28)
        at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$1.run(DefaultFileCollectionSnapshotter.java:53)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:187)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:193)
        at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:58)
        at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:49)
        at org.gradle.api.internal.changedetection.rules.InputFilesStateChangeRule.create(InputFilesStateChangeRule.java:33)
        at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:46)
        at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactState
Repository.java:126)
        at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStat
eRepository.java:69)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.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(InProcessBuildActionExecuter.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(InProcessBuildActionExecuter.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:46)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:37)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: java.io.IOException: Le processus ne peut pas accéder au fichier car un autre processus en a verrouillé une partie
        at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:47)
        ... 57 more
    BUILD FAILED

If I remove configuration of umlGraph doclet, the build is successful.

I’m using gradle 1.12 and umlGraph 5.6 and Java7

Edit: I have tried to run the build on a linux debian 7 system and I have an error at the same step of the build:

16:59:07.075 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 25.888 secs, idle: 0.107 secs
16:59:07.081 [ERROR] [org.gradle.BuildExceptionReporter]
16:59:07.086 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:59:07.104 [ERROR] [org.gradle.BuildExceptionReporter]
16:59:07.108 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
16:59:07.110 [ERROR] [org.gradle.BuildExceptionReporter] Could not list contents of '/proc/self/task/18040/fd/69'.
16:59:07.118 [ERROR] [org.gradle.BuildExceptionReporter]
16:59:07.129 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
16:59:07.133 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleException: Could not list contents of '/proc/self/task/18040/fd/69'.
16:59:07.136 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:147)
16:59:07.139 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.141 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.143 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.144 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.145 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.146 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:172)
16:59:07.147 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.visitFrom(DirectoryFileTree.java:125)
16:59:07.149 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.DirectoryFileTree.visit(DirectoryFileTree.java:115)
16:59:07.151 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:96)
16:59:07.152 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.AbstractFileTree.getFiles(AbstractFileTree.java:37)
16:59:07.153 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:39)
16:59:07.155 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:48)
16:59:07.156 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.changedetection.rules.InputFilesStateChangeRule.create(InputFilesStateChangeRule.java:33)
16:59:07.157 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:46)
16:59:07.159 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:126)
16:59:07.161 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:69)
16:59:07.167 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
16:59:07.168 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
16:59:07.169 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
16:59:07.170 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
16:59:07.171 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
16:59:07.173 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
16:59:07.174 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
16:59:07.175 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
16:59:07.176 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
16:59:07.177 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
16:59:07.178 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
16:59:07.179 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
16:59:07.182 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
16:59:07.183 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
16:59:07.185 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
16:59:07.185 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
16:59:07.187 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
16:59:07.188 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
16:59:07.189 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
16:59:07.192 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
16:59:07.206 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
16:59:07.208 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
16:59:07.209 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
16:59:07.214 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
16:59:07.215 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
16:59:07.222 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
16:59:07.224 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
16:59:07.226 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
16:59:07.233 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
16:59:07.235 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
16:59:07.236 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
16:59:07.241 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
16:59:07.242 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
16:59:07.243 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
16:59:07.244 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
16:59:07.245 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.Main.doAction(Main.java:46)
16:59:07.250 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
16:59:07.251 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.Main.main(Main.java:37)
16:59:07.255 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
16:59:07.257 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
16:59:07.266 [ERROR] [org.gradle.BuildExceptionReporter]
      at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

Cheers,

Julien


(jdenet.anteo) #2

here is the solution. options.docletpath must be a File. not a path.

options.docletpath = [file('devlib/UmlGraph.jar')]

An explicit error message should be great.