Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Maven dependency with Tycho

In M2Eclipse we use what are called wrapper bundles which you can see an example of here:

https://github.com/eclipse/m2e-core/tree/master/m2e-maven-runtime/org.eclipse.m2e.maven.runtime

If you use this technique you can debug through the wrapper bundled into any Maven projects that might be in your workspace. This is how we develop M2Eclipse where we are working with Maven in the workspace.

On Mar 23, 2015, at 5:42 AM, Enrico De Fent <enrico.defent@xxxxxxxxxxx> wrote:

> Chris,
> if I understood your problem right, I would suggest to incapsulate the service into a new plug-in, which you can use as a dependency for other plug-ins and include in features/products/repositories as needed.
> 
> AFAIK, these are common strategies for doing this:
> 
> 1) you create a new plug-in from an existing JAR, by including the compiled classes into the plug-in and exporting packages; you can configure Maven for doing this during the build cycle, for example using maven-bundle-plugin[1]
> 
> 2) you include the JAR as-is in the plug-in (nested JAR) and make its contents available by including it in the plug-in's classpath and exporting its packages; this practice, however, is discouraged:
> 
> ┬źNested JARs are strongly discouraged as they hinder performance; since, the runtime will have to extract these JARs at runtime. Therefore, if the plug-in's code is packaged in a JAR, it is recommended to keep the deployed plug-in as a flat directory.┬╗[2]
> 
> Both strategies can be performed also within the Eclipse IDE[3].
> 
> You will also need to pay attention on how to manage the dependencies for the service itself. Some options:
> 
> 1) you can create an uber-JAR for your service (for example using maven-shade-plugin) that includes everything
> 
> 2) you can rely on plug-ins provided by third parties (I'm thinking about Eclipse Orbit[4]) to resolve your dependencies
> 
> 3) you can incapsulate your dependencies in plug-ins, for example using one of the strategies above
> 
> Hope this helps.
> 
> Regards,
> Enrico
> 
> 
> [1] http://wiki.osgi.org/wiki/Maven_Bundle_Plugin
> 
> [2] http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Fexport_wizards%2Fexport_plugins.htm
> 
> [3] http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Fproject_wizards%2Fplugin_from_archives.htm
> 
> [4] https://eclipse.org/orbit/
> 
> 
> 
> 
> 
> On Tue, Mar 17, 2015 at 1:38 PM, Chris McNeill <mcneillchris9@xxxxxxxxx> wrote:
> Hi,
> 
> We are just starting with eclipse plugin development and using tycho to build the plugin, feature and site.
> 
> As part of our plugin we have an external service created (seperate maven project) to provide some non-ui functionality which may be shared amongst other projects.
> 
> With normal maven projects I can define a dependency and it will be available at runtime (and in eclipse if I run "mvn eclipse:eclipse") However I'm struggling to find out how this can be done for an eclipse plugin.
> 
> Can anyone point me in the right direction for this please?
> 
> Thanks,
> Chris
> 
> 
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
> 
> 
> 
> -- 
> Enrico De Fent
> VDS Rail
> www.vdsrail.com
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

You are never dedicated to something you have complete confidence in.
No one is fanatically shouting that the sun is going to rise tomorrow.
They know it is going to rise tomorrow. When people are fanatically
dedicated to political or religious faiths or any other kind of 
dogmas or goals, it's always because these dogmas or
goals are in doubt.

 -- Robert Pirzig, Zen and the Art of Motorcycle Maintenance











Back to the top