why not just add ?
sourceSets {
main {
java {
srcDir "$wepTrunk/osgi/mycompany.osgi.server/src"
}
resources {
srcDir "$wepTrunk/osgi/mycompany.osgi.server/lib"
}
}
}
this puts the jars from lib in my artifact. Although I couldn't
figure out how to put it in a "lib" directory inside my artifact..
anyone know how to push it to my jar inside a /lib directory?
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