[GRADLE-1118] Mainfest classpath incomplete and distribution zip empty Created: 15/Aug/10  Updated: 04/Jan/13  Resolved: 16/Aug/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: None

Type: Bug
Reporter: Matthias Bohlen Assignee: Hans Dockter
Resolution: Not A Bug Votes: 0

Attachments: Zip Archive gradletest.zip    

 Description   

I am trying to build a ZIP from two Java projects (projectA and projectB). projectA depends on projectB and on a derby library. projectB depends on log4j. All libraries are already on disk, inside a directory which is part of the build structure - no Ivy or Maven involved.

Expectation:

  • The distribution ZIP must contain projectA.jar, projectB.jar, derbyrun.jar, log4j.jar
  • The manifest classpath of projectA must contain projectB.jar, derbyrun.jar, log4j.jar

Reality:

  • The distribution ZIP is completely empty.
  • The manifest classpath is incomplete: derbyrun.jar projectB.jar (missing log4j.jar).

Attached, you will find the build structure. Simply type "gradle clean build" to reproduce the effect.

On my machine, I see the following messages:

$ gradle -v

------------------------------------------------------------
Gradle 0.9-rc-1
------------------------------------------------------------

Gradle buildtime: Wednesday, 4 August 2010 8:04:33 AM EST
Groovy: 1.7.3
Ant: Apache Ant version 1.8.1 compiled on April 30 2010
Ivy: 2.2.0-rc1
Java: 1.5.0_20
JVM: 1.5.0_19-140
JVM Vendor: Apple Inc.
OS Name: Mac OS X

$ gradle clean build
:projectA:clean
:projectB:clean
:projectB:compileJava
:projectB:processResources
:projectB:classes
:projectB:jar
:projectA:compileJava
:projectA:processResources
:projectA:classes
:projectA:jar
:projectA:clientZip
clientZip = [derbyrun.jar, projectB.jar]
:projectA:assemble
:projectA:compileTestJava
:projectA:processTestResources
:projectA:testClasses
:projectA:test
:projectA:check
:projectA:build
:projectB:assemble
:projectB:compileTestJava
:projectB:processTestResources
:projectB:testClasses
:projectB:test
:projectB:check
:projectB:build

BUILD SUCCESSFUL

Total time: 8.44 secs

$ unzip -l projectA/build/distributions/projectA.zip
Archive: projectA/build/distributions/projectA.zip
warning [projectA/build/distributions/projectA.zip]: zipfile is empty

$ jar xf projectA/build/libs/projectA.jar
$ more META-INF/MANIFEST.MF
Manifest-Version: 1.0
provider: gradle
Main-Class: com.somecompany.SomeApplication
Class-Path: derbyrun.jar projectB.jar



 Comments   
Comment by Hans Dockter [ 16/Aug/10 ]

I have added some comments to the corresponding mailing list thread: http://markmail.org/message/jmvsebu6ymurd7ve

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