On 02/09/2010, at 11:32 PM, Lars Heuer wrote:

> [...]
>>    manifest = osgiManifest {
>>      from(jar.manifest)
>>      instruction 'Bundle-Activator', 'mypack.Activator'
>>      instruction 'Import-Package', '!mypack.*, *'
>>    }
>>  }
> 
>> Leads to:
> 
>> Could not copy MANIFEST.MF to 'build\tmp\onejarJar\MANIFEST.MF'.
> [...]
> 
> Any advises? Is it a bug?


Pretty much. The OsgiManifest expects you to set the classesDir and classpath 
properties. The osgi plugin does this automatically for the main jar, but does 
not do so for additional jars. It probably should set these for every jar.

So, you need to do something like:

manifest = osgiManifest {
     ....
     classesDir = sourceSets.main.classesDir
     classpath = sourceSets.main.runtimeClasspath
}


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to