gradle error文件名,目录名或卷标语法不正确

时间:2017-06-08 08:40:22

标签: gradle gradlew gradle-plugin

当我尝试使用gradle构建战争时,我收到以下错误。

堆栈跟踪在下面。

当我在战争中添加特定依赖项时会发生错误。是否有任何方法可以找出导致此问题的原因?

我尝试添加的依赖项具有许多传递依赖项

11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter]
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed w
ith an exception.
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter]
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter] Failed to capture snaps
hot of output files for task 'war' during up-to-date check.
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter] > Could not normalize p
ath for file 'D:\\distribution\combined\build\
libs\masters:qams-1.0.0.war'.
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter]
11:29:56.507 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.Unchecke
dIOException: Failed to capture snapshot of output files for task 'war' during u
p-to-date check.
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnap
shotPreCheck(AbstractFileSnapshotTaskStateChanges.java:49)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.OutputFilesTaskStateChanges.saveCurrent(OutputF
ilesTaskStateChanges.java:79)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.snapshotAf
terTask(AbstractFileSnapshotTaskStateChanges.java:89)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.OutputFilesTaskStateChanges.snapshotAfterTask(O
utputFilesTaskStateChanges.java:28)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.CachingTaskStateChanges.snapshotAfterTask(Cachi
ngTaskStateChanges.java:84)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.SummaryTaskStateChanges.snapshotAfterTask(Summa
ryTaskStateChanges.java:73)
11:29:56.508 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifa
ctStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:134)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExec
uter.java:68)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter
.java:58)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySou
rceFilesTaskExecuter.java:52)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoA
ctionsExecuter.java:52)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter
.java:53)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOn
ceTaskExecuter.java:43)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ex
ecution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(Default
TaskGraphExecuter.java:203)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ex
ecution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(Default
TaskGraphExecuter.java:185)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ex
ecution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(Abstra
ctTaskPlanExecutor.java:66)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ex
ecution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPl
anExecutor.java:50)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.in
ternal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy
.java:54)
11:29:56.509 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.in
ternal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.a
pi.UncheckedIOException: Could not normalize path for file 'D:\M\combined\build\libs\masters:qams-1.0.0.war'.
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.FileNormaliser.normalise(FileNormaliser.java:90)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:82)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:62)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionCo
nverter.convertInto(DefaultFileCollectionResolveContext.java:162)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(Defaul
tFileCollectionResolveContext.java:123)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCol
lections(DefaultFileCollectionResolveContext.java:81)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionCo
nverter.convertInto(DefaultFileCollectionResolveContext.java:146)
11:29:56.510 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(Defaul
tFileCollectionResolveContext.java:98)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCol
lections(DefaultFileCollectionResolveContext.java:81)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollec
tion.java:162)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:45
)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.state.OutputFilesCollectionSnapshotter.getRoots(Outpu
tFilesCollectionSnapshotter.java:71)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.state.OutputFilesCollectionSnapshotter.preCheck(Outpu
tFilesCollectionSnapshotter.java:66)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnap
shotPreCheck(AbstractFileSnapshotTaskStateChanges.java:47)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        ... 18 more
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.io.IOEx
ception: The filename, directory name, or volume label syntax is incorrect
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.ap
i.internal.file.FileNormaliser.normalise(FileNormaliser.java:54)
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]        ... 31 more
11:29:56.511 [ERROR] [org.gradle.BuildExceptionReporter]
11:29:56.512 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:29:56.512 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
11:29:56.512 [LIFECYCLE] [org.gradle.BuildResultLogger]

1 个答案:

答案 0 :(得分:1)

这似乎与依赖关系无关 您似乎将CREATE TABLE #tmpTbl(Field1 varchar(50), Field2 int, Field3 DateTime) INSERT INTO #tmpTbl (Field1, Field2, Field3) SELECT TOP 1 field1, field2, field3 from OneTable 设置为生成的WAR文件的名称,该文件在Windows上不是有效路径,因为除了驱动器号之外,路径不能包含冒号。 要指出您需要提供构建脚本的具体错误,但也许这些信息对您来说已经足够了,因此我将其作为答案发布,而不是评论。