Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Creating a shaded/"uber-jar?"

Hi all,

Greg: We built our metamodel with EMF and also use OCL and Acceleo plugins. In the end we have a standalone/non-Eclipse application. We built our other components (such as our GUI) as Eclipse plugin projects as well because maintaining the dependencies between our own projects and the Eclipse plugins is easier that way. At least in the development environment. So far we have used an Ant build script to package the JAR and do some other things (like concatenating all the plugin.properties files).

I managed to set up the aggregator and parent POM to successfully resolve all dependencies and compile with Maven and Tycho. But building the standalone application is a challenge.

We are also currently building a web application using spring-boot where we use the backend from our application. However, it seems that it is not possible to specify the dependency to spring-boot in Maven while at the same time use Tycho to resolve the Eclipse-specific dependencies.
Is that right, or is there a way to achieve that?

Jörg: Thanks for the info about JARs in JARs. Unfortunately, there are still many missing (OCL, UML, Acceleo) in Maven Central, at least for our case.

Cheers,
Matthias

On 11.07.2019 10:10, Jörg Schaible wrote:
Hi Dominique,

Am Donnerstag, 11. Juli 2019, 15:09:58 CEST schrieb Dominique Marcadet:


Hello,
I also need to build an uber-jar for a standalone version of a tool using EMF plugins. For the
moment, I use the eclipse:to-maven goal from the Apache Maven Eclipse Plugin which is
"retired" but still available.

Why? Maven Central is now constantly fed with the current versions for the basic Eclipse
stuff (with proper dependencies), look for groupIds org.eclipse.platform, org.eclipse.emf,
org.eclipse.xtext, ... i.e. you can build non-Eclipse/OSGi applications with those jars without
any problems.

Personally I would abstain from jars in jars, because they tend to have bad startup times. We
had once an application taking 45 minutes (!), because we embedded a 80 MB Weblogic
client jar.

We build now ZIP files containing Bash or Windows shell scripts that add all jars in a relative
directory (e.g. lib) to the classpath and start then the application. Works like charm and you
can easily exchange or add jars for testing purposes or extensions. We use a home-grown
functionality, but you may take a look at the appassembler-maven-plugin of MojoHaus that
has the same purpose.

Cheers,
Jörg

[snip]


Back to the top