Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Packaging type for EMF standalone (CLI) app?

not sure if I got your scenario right.

If what you have are bundles with nested jars: get rid of the nested jars by inlining them into the bundle jar.
Nested jars are legacy from pre-eclipse 3.0 days and can cause various problems down the line [1].

Regards
Jan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=111238#c11




On 09/02/16 15:54, "tycho-user-bounces@xxxxxxxxxxx on behalf of Stefan Sobernig" <tycho-user-bounces@xxxxxxxxxxx on behalf of ss@xxxxxxxxxxxxxxxx> wrote:

>Dear all,
>
>Is there a way to turn each plugin jar, obtained from my Eclipse product [1], into a separate maven artifact (rather than a fat jar), which can then be referenced as a (group) dependency from another maven project?
>
>The reason is that as a (repackaged) fat jar another maven project cannot properly use the fat-jar maven artifact as a dependency: mvn compile, java:exec, test, etc. will not be aware of the jars-in-jar structure.
>
>Thanks for any hints!
>
>Stefan
>
>[1] 
>https://github.com/mrcalvin/qvto-cli/blob/master/qvt-bundle/qvto.product <https://github.com/mrcalvin/qvto-cli/blob/master/qvt-bundle/qvto.product>
>
>
>Hi Mickael!
>Here is a possible way to do it:
>* Create your application as an "eclipse-product" (so you get all the happiness provided by p2)
>* Create a module that would be build after your eclipse-product and that would collect the content of the plugins/ folder of your eclipse-product and zip it (so you get a fat jar)
>
>
>Thx for your response! 
>
>For the time being, I realized an approach which works for me (but appears most probably arcane to Maven and Tycho pros):
>
>https://github.com/mrcalvin/qvto-cli
>
>I am not very happy with certain decisions baked into my solution (eg. all the mess just to preserve the Jar-in-Jar loader throughout the Maven processing chain). But I needed something to get started.
>
>
>I had no time dig deep into the reasons why the QVTo standalone execution fails unless preserving the jars as they come in P2 etc (which is a different story, as it also fails when creating executable jars from within Eclipse also).
>
>It will certainly improve over time. Any feedback is welcome.
>
>Stefan
>
>
>

Back to the top