<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Building OSGi Bundles with Scala and Gradle</title>
	<atom:link href="http://blog.jayway.com/2010/02/09/building-osgi-bundles-with-scala-and-gradle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2010/02/09/building-osgi-bundles-with-scala-and-gradle/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Fri, 30 Jul 2010 10:14:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Michael Kober</title>
		<link>http://blog.jayway.com/2010/02/09/building-osgi-bundles-with-scala-and-gradle/comment-page-1/#comment-24497</link>
		<dc:creator>Michael Kober</dc:creator>
		<pubDate>Thu, 11 Feb 2010 09:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=4712#comment-24497</guid>
		<description>#Erik:
I&#039;m new to Gradle myself, and not used to all features yet.

First of all you should consider getting the 3rd party library as OSGi bundle and add it as required or import the packages. Have a look at Springsource Enterprise bundle repository (http://www.springsource.com/repository/app/) or eclipse orbit (http://www.eclipse.org/orbit/).

If you still want to embed the 3rd party library you need to add the Bundle-ClassPath header to your manifest:

instruction &#039;Bundle-ClassPath&#039;, &#039;third-party.jar&#039;

But this will only tell OSGi to consult the bundle classpath when looking for classes. You still have to tell gradle that you want to embed the 3rd party jar. I think it should be possible to to this through configuring the jar task - but I haven&#039;t done that myself. If that won&#039;t work you still could add the 3rd party jar as resource - which feels a bit &#039;hacky&#039;:

sourceSets {
    main {
        scala {
            srcDir &#039;src/main/scala&#039;
        }
        resources {
            srcDir &#039;lib&#039;
        }
    }
}

Assuming your 3rd party lib resides in the &#039;lib&#039; folder.
I hope this was helpful.

/Mike</description>
		<content:encoded><![CDATA[<p>#Erik:<br />
I&#8217;m new to Gradle myself, and not used to all features yet.</p>
<p>First of all you should consider getting the 3rd party library as OSGi bundle and add it as required or import the packages. Have a look at Springsource Enterprise bundle repository (<a href="http://www.springsource.com/repository/app/" rel="nofollow">http://www.springsource.com/repository/app/</a>) or eclipse orbit (<a href="http://www.eclipse.org/orbit/" rel="nofollow">http://www.eclipse.org/orbit/</a>).</p>
<p>If you still want to embed the 3rd party library you need to add the Bundle-ClassPath header to your manifest:</p>
<p>instruction &#8216;Bundle-ClassPath&#8217;, &#8216;third-party.jar&#8217;</p>
<p>But this will only tell OSGi to consult the bundle classpath when looking for classes. You still have to tell gradle that you want to embed the 3rd party jar. I think it should be possible to to this through configuring the jar task &#8211; but I haven&#8217;t done that myself. If that won&#8217;t work you still could add the 3rd party jar as resource &#8211; which feels a bit &#8216;hacky&#8217;:</p>
<p>sourceSets {<br />
    main {<br />
        scala {<br />
            srcDir &#8216;src/main/scala&#8217;<br />
        }<br />
        resources {<br />
            srcDir &#8216;lib&#8217;<br />
        }<br />
    }<br />
}</p>
<p>Assuming your 3rd party lib resides in the &#8216;lib&#8217; folder.<br />
I hope this was helpful.</p>
<p>/Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Peterson</title>
		<link>http://blog.jayway.com/2010/02/09/building-osgi-bundles-with-scala-and-gradle/comment-page-1/#comment-24460</link>
		<dc:creator>Erik Peterson</dc:creator>
		<pubDate>Wed, 10 Feb 2010 23:55:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=4712#comment-24460</guid>
		<description>The plugin doesn&#039;t package 3rd party classes into the bundle.jar...like the maven plugin does. I&#039;m new to gradle, so how do I do this? Tried the following:
    instruction &#039;Import-Package&#039;, &#039;*&#039;
    instruction &#039;Export-Package&#039;, &#039;*&#039;
But I still get unresolved dependencies because the bundle jar file doesn&#039;t have the classes.
Thanks!
Erik</description>
		<content:encoded><![CDATA[<p>The plugin doesn&#8217;t package 3rd party classes into the bundle.jar&#8230;like the maven plugin does. I&#8217;m new to gradle, so how do I do this? Tried the following:<br />
    instruction &#8216;Import-Package&#8217;, &#8216;*&#8217;<br />
    instruction &#8216;Export-Package&#8217;, &#8216;*&#8217;<br />
But I still get unresolved dependencies because the bundle jar file doesn&#8217;t have the classes.<br />
Thanks!<br />
Erik</p>
]]></content:encoded>
	</item>
</channel>
</rss>
