OK, I don't want to embed the contents of another jar...... I want to put another jar in my output jar inside a "lib" directory.
Still struggling with this. thanks On Tue, Aug 10, 2010 at 5:41 AM, Steve Appling <[email protected]> wrote: > > On Aug 9, 2010, at 6:01 PM, phil swenson wrote: > >> I figured out part 1 of my question (and also how to specify >> symbolicName) and now my jar task looks like: >> >> jar { >> archiveName="com.mycompany.osgi.server_8.2.0.0000-0001.jar" >> >> manifest { >> version = '1.0' >> name = 'Server' >> symbolicName="com.mycompany.osgi.server" >> instruction 'Bundle-Version', '8.2.0.0000-0001' >> instruction 'Bundle-ManifestVersion', '2' >> instruction 'Require-Bundle', 'com.mycompanyosgi.proxy', >> 'com.mycompany.wep.plugin.runtime', >> 'com.mycompany.eda.orchestrator', >> 'com.mycompany.osgi.is.core', ' org.eclipse.osgi', >> 'javax.jms' >> instruction 'Bundle-Activator', 'com.mycompany.wep.osgi.server.Activator' >> instruction 'Import-Package', ' com.mycompany.server', >> 'com.mycompany.data' >> instruction 'Bundle-ClassPath', '.,lib/enttoolkit.jar', 'lib/mail.jar' >> instruction 'Eclipse-ExtensibleAPI', 'true' >> } >> } >> >> still don't know how to embed a lib/enttoolkit.jar and mail.jar in >> there though.... >> >> ideas? >> > > You can use zipTree to embed the contents of another jar. If you are wanting > to add in all of your compile dependencies, you would use something like this > inside of your jar configuration: > from configurations.compile.collect { it.isDirectory() ? it : > zipTree(it).matching { exclude 'META-INF/MANIFEST.MF' } } > > The ".matching {...}" part is needed in rc1, but will not be needed in the > final release. > -- > Steve Appling > Automated Logic Research Team > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
