Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Creating Runnable-Jars like Eclipse Export does

I would rather see your case as a corner case, so I don’t think that there will be out-of-the-box support for it. However Tycho could still help you. The runnable entities based on OSGi bundles are products, so you could try to build a product with eclipse-repository (based on a .product file with only your main bundle/jar), and repackage it so that everything is in one jar. This could work.

 

Regards

Tobias

 

 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Johannes Lerch
Sent: 28 July 2011 08:51
To: Tycho user list
Subject: Re: [tycho-user] Creating Runnable-Jars like Eclipse Export does

 

Hi,

the bundle is not intended to be used as OSGi bundle. It contains a main class which i want to be able to execute by invoking java -jar xyz.jar. The only reason the project itself is an eclipse plugin is that it makes dependency management very easy, because it depends on other projects which in fact are deployed as OSGi bundles. The OSGi environment resolves all transitive dependencies which is very useful - and that does also work with the export wizard of eclipse as it automatically copies all needed dependencies into the resuling jar. I don't want anything different, having the ability to do the same with maven would be great ;-)

Regards,
Johannes

2011/7/27 Brian de Alwis <briandealwis@xxxxxxxxx>

I'm guessing you're using the export wizard to explode an incorporate your bundle's set of .jar files into a single jar file.  That's a novel use!

Are you intending for your bundle to be used in a non-OSGi situation (i.e., a plain java app or a webapp)?  Because if it's intended solely as an OSGi bundle, you can just include the .jar files — OSGi can extract .jar files providing they're listed on the Bundle-Classpath.

If you're intending the resulting jar file to be a good OSGi citizen, you could use the maven-bundle-plugin instead and use ordinary Maven dependencies.

Otherwise I don't think Tycho supports your usecase.  Consider submitting a patch.

Brian.


On 27-Jul-2011, at 10:37 AM, Johannes Lerch wrote:

> Hi,
>
> i'm trying to build runnable jars like the export wizard in eclipse produces. I found a lot of plugins and tutorials on how to that if you manage dependencies by maven. But i have an eclipse plugin and i'm building it using manifest first configuration. As the rest of the project is built in that way i don't want to change the whole thing for that single one and so i'm looking for a solution to do it the tycho way ;-) Is there one?
>
> Regards,
> Johannes

> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

 


Back to the top