[GRADLE-677] metaInf fails for subprojects 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   

In the subprojects specification I have a metaInf usage:

subprojects {
  . . .
  metaInf << files ( '../LICENCE.txt' )
  . . .
}

this however leads to an error:

Cause: problem opening /home/users/russel/Repositories/Bazaar/Masters/Gant/Trunk_Development/LICENCE.txt

The full stack trace 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: problem opening /home/users/russel/Repositories/Bazaar/Masters/Gant/Trunk_Development/LICENCE.txt
at org.apache.tools.ant.types.ZipScanner.fillMapsFromArchive(ZipScanner.java:74)
at org.apache.tools.ant.types.ArchiveScanner.scanme(ArchiveScanner.java:319)
at org.apache.tools.ant.types.ArchiveScanner.getIncludedDirectories(ArchiveScanner.java:172)
at org.apache.tools.ant.taskdefs.Zip.grabResources(Zip.java:1277)
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
Caused by: java.io.IOException: Negative seek offset
at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:394)
at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:262)
at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:143)
at org.apache.tools.ant.types.ZipScanner.fillMapsFromArchive(ZipScanner.java:70)
... 34 common frames omitted



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

We have reimplemented the archive layer for 0.9. The 0.8 notation is no longer valid but the use case of this issue should be supported.

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