Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Using m2eclipse for Eclipse plugin projects
Using m2eclipse for Eclipse plugin projects [message #13562] Thu, 24 July 2008 14:18 Go to next message
Eclipse User
Originally posted by: chris.audley.beaconcs.com

I'd like to use m2eclipse for a plugin project. I'm running Eclipse 3.4
with m2eclipse 0.9.5.20080717-1821.

I've added maven support to the plugin project, and I can see the
correct maven dependencies listed in the 'Maven Dependencies' group.
However, when I try and export some of the java packages from the maven
dependencies using the plugin manifest, I get an error that the packages
don't exist in the plugin project.

When I just list the required jars as 'Referenced Libraries' this works
fine. Is there some setting that I'm missing to enable this? I
couldn't find anything.

Thanks
Chris
Re: Using m2eclipse for Eclipse plugin projects [message #13584 is a reply to message #13562] Thu, 24 July 2008 17:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: igor.ifedorenko.com

m2e (as in Eclipse IDE plugin) does not directly support eclipse plug-in
development at the moment, but we plan to add this support some time in
the future.

There is, however, Tycho m2e subproject with the goal to provide first
class support for building Eclipse/OSGi plugins with Maven. Using Tycho
you can "wrap" existing maven artifacts into OSGi bundles which then can
be referenced from your plugins. We use Tycho to build m2e and you can
see how we use this feature to wrap maven archetype for example

http://svn.sonatype.org/m2eclipse/trunk/org.maven.ide.compon ents.archetype-common

We don't have any documentation yet, but I will be happy to answer you
questions if you're interested in this approach.


Chris Audley wrote:
> I'd like to use m2eclipse for a plugin project. I'm running Eclipse 3.4
> with m2eclipse 0.9.5.20080717-1821.
>
> I've added maven support to the plugin project, and I can see the
> correct maven dependencies listed in the 'Maven Dependencies' group.
> However, when I try and export some of the java packages from the maven
> dependencies using the plugin manifest, I get an error that the packages
> don't exist in the plugin project.
>
> When I just list the required jars as 'Referenced Libraries' this works
> fine. Is there some setting that I'm missing to enable this? I
> couldn't find anything.
>
> Thanks
> Chris
Re: Using m2eclipse for Eclipse plugin projects [message #13790 is a reply to message #13584] Fri, 08 August 2008 15:49 Go to previous messageGo to next message
Andre Dietisheim is currently offline Andre Dietisheim
Messages: 130
Registered: July 2009
Senior Member
related to this but not identical in topic:

Do you have any publicy available maven repository with the latest
eclipse stable builds? I am currently getting into working with EMF/CDO
and just started with the existing development setup, that is ant based.
It downloads bundles, copies, unzip etc. Things I'm used get free when
working with maven. But where to get these bundles from. I guess I'm not
the only Eclipse enthusiast, and I'd appreciate any hints...

Thanks!
André
Re: Using m2eclipse for Eclipse plugin projects [message #13810 is a reply to message #13790] Sun, 10 August 2008 17:29 Go to previous messageGo to next message
Andre Dietisheim is currently offline Andre Dietisheim
Messages: 130
Registered: July 2009
Senior Member
Just found the solution myself, and I'm posting it here for anyone that
might be interested:

It seems like the current eclipse plugins are not available - in a
complete manner - in public maven repositories. To solve this situation
there's a nice maven plugin that converts the plugins in you local eclipse
instance into maven artifacts and deploys them. The deployment's done to
your local repo or to any remote repo you want them to be uploaded to:

http://maven.apache.org/plugins/maven-eclipse-plugin/to-mave n-mojo.html

I did some quick testdrive with my fully loaded eclipse and I had some
issues with 3rd party plugins. I assume taking a blank eclipse should work
without any flaws (not tested yet).

Cheers
André
Re: Using m2eclipse for Eclipse plugin projects [message #19712 is a reply to message #13810] Mon, 08 December 2008 02:41 Go to previous messageGo to next message
maarten meijer is currently offline maarten meijer
Messages: 145
Registered: July 2009
Senior Member
I tried that and came up with the follwoing command:

mvn eclipse:to-maven -DeclipseDir=<path tho eclipse>/eclipse
-DstripQualifier=true

But I keep getting an error:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not
be retrieved from repository: central due to an error: Error
transferring file
[INFO] Repository 'central' will be blacklisted
[INFO]
------------------------------------------------------------ ------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------ ------------
[INFO] The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does
not exist or no valid version could be found
[INFO]
------------------------------------------------------------ ------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------ ------------

Does this have anything to do with the fact that I have also installed
nexus as per Maven The Definitive Reference?
Some instructions on getting an Eclipse install into the local (nexus)
repository would be very helpful.


André Dietisheim wrote:
> Just found the solution myself, and I'm posting it here for anyone that
> might be interested:
>
> It seems like the current eclipse plugins are not available - in a
> complete manner - in public maven repositories. To solve this situation
> there's a nice maven plugin that converts the plugins in you local
> eclipse instance into maven artifacts and deploys them. The deployment's
> done to your local repo or to any remote repo you want them to be
> uploaded to:
>
> http://maven.apache.org/plugins/maven-eclipse-plugin/to-mave n-mojo.html
>
> I did some quick testdrive with my fully loaded eclipse and I had some
> issues with 3rd party plugins. I assume taking a blank eclipse should
> work without any flaws (not tested yet).
Re: Using m2eclipse for Eclipse plugin projects [message #19748 is a reply to message #19712] Mon, 08 December 2008 17:36 Go to previous message
maarten meijer is currently offline maarten meijer
Messages: 145
Registered: July 2009
Senior Member
Well if you don't make nexus listen on the right port it doesn't work :-(

Install nexus

Create repository for eclipse in nexus

Run this (with nexus security turned off)
mvn eclipse:to-maven \
-DstripQualifier=true \
-DeclipseDir=<path to eclipse>/eclipse \
-DdeployTo= eclipse.org::default::http://localhost:8081/nexus/content/re positories/eclipse.org

and you will have a repository full of eclipse maven artifacts!

Maarten Meijer wrote:
> But I keep getting an error:

> [WARNING] repository metadata for: 'org.apache.maven.plugins' could not
> be retrieved from repository: central due to an error: Error
> transferring file
Previous Topic:supported Maven plugin configuration parameters
Next Topic:The newest maven repo for eclipse artifacts and osgi bundles
Goto Forum:
  


Current Time: Thu Jul 24 02:26:14 EDT 2014

Powered by FUDForum. Page generated in 0.04767 seconds