[GRADLE-676] metaInf errors give messges that don't describe the real problem Created: 04/Oct/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.8
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Russel Winder Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

Trying to populate the META-INF directory of a jar, I added:

metaInf << files ( 'LICENCE.txt' )

this is however an error since the file is actually in '..' not '.'. The error message is:

Cause: the archive doesn't exist

which is not correct and very misleading. The full stack trace for this is:

org.gradle.api.GradleScriptException: Empty build file
Execution failed for task ':gant:jar'.
at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:232)
at org.gradle.execution.DefaultTaskExecuter.executeTask(DefaultTaskExecuter.java:165)
at org.gradle.execution.DefaultTaskExecuter.doExecute(DefaultTaskExecuter.java:156)
at org.gradle.execution.DefaultTaskExecuter.execute(DefaultTaskExecuter.java:74)
at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:174)
at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
at org.gradle.GradleLauncher.doBuildStages(GradleLauncher.java:165)
at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:124)
at org.gradle.GradleLauncher.run(GradleLauncher.java:95)
at org.gradle.Main.execute(Main.java:100)
at org.gradle.Main.main(Main.java:43)
at org.gradle.BootstrapMain.main(BootstrapMain.java:50)
Caused by: org.apache.tools.ant.BuildException: the archive doesn't exist
at org.apache.tools.ant.types.ArchiveFileSet.getDirectoryScanner(ArchiveFileSet.java:246)
at org.apache.tools.ant.taskdefs.Zip.grabResources(Zip.java:1270)
at org.apache.tools.ant.taskdefs.Zip.getResourcesToAdd(Zip.java:1026)
at org.apache.tools.ant.taskdefs.Zip.getResourcesToAdd(Zip.java:973)
at org.apache.tools.ant.taskdefs.Jar.getResourcesToAdd(Jar.java:724)
at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:490)
at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:410)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:74)
at org.gradle.api.internal.project.DefaultAntBuilder.super$3$invokeMethod(DefaultAntBuilder.groovy)
at org.gradle.api.internal.project.DefaultAntBuilder.invokeMethod(DefaultAntBuilder.groovy:37)
at org.gradle.api.tasks.bundling.AntJar.execute(AntJar.groovy:28)
at org.gradle.api.tasks.bundling.AntJar$execute.call(Unknown Source)
at org.gradle.api.tasks.bundling.Jar$_createAntArchiveTask_closure1.doCall(Jar.groovy:44)
at org.gradle.api.tasks.bundling.AbstractArchiveTask.generateArchive(AbstractArchiveTask.groovy:108)
at org.gradle.api.tasks.bundling.AbstractArchiveTask.invokeMethod(AbstractArchiveTask.groovy)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
at org.gradle.api.internal.project.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:125)
at org.gradle.api.internal.project.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:123)
at org.gradle.api.internal.AbstractTask.doExecute(AbstractTask.java:257)
at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:222)
... 11 common frames omitted



 Comments   
Comment by Hans Dockter [ 19/Apr/10 ]

We have completely reimplemented our archive layer. The 0.8 notation is no longer valid and the problem should have disappeared.

Generated at Wed Jun 30 11:36:00 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.