Reputation: 8670
Is there an easy way to import into my local Maven repository all the depending Eclipse plugin jars required by an Eclipse plugin ? (i.e., the plugins listed in the "Required Plug-ins" section in the plug-in configuration file). First I tried manually importing some of them from the main Maven repository, and installing in my local repository the ones that are not there (many ...) However, this is a neverending work, and it just cannot be the correct way to use Maven when building an Eclipse plug-in.
I found a Maven plugin for automatically importing the eclipse jars and creating POM files in my local repository (http://maven.apache.org/plugins/maven-eclipse-plugin/make-artifacts-mojo.html) but I have not succeed making it work. I tried executing this in my eclipse installation directory:
mvn eclipse:to-maven -DeclipseDir=.
But I got a NoSuchElement
exception(?).
Is this plugin the right direction ? even if I manage to make it work I will have to manually add all the dependencies in the POM of my Eclipse plug-in project (but at least the required jars would be in the local repository already).
Thanks for any tip about how to automatically add in my POM the plug-in dependencies on other Eclipse plugins.
Upvotes: 2
Views: 4450
Reputation: 8670
Apparently I should not try to import in my repository Eclipse plugin jars. But instead using the Maven Eclipse Plugin to synchronize the POM of my project with the Eclipse configuration files, and then the plugin must be built with the Eclipse IDE.
From the Maven Eclipse plugin website:
"Note that the scope of the maven-eclipse-plugin is to synchronise the Eclipse .project and .classpath files with the configuration found in the pom file. Once you have finished configuring the Eclipse plugin as below, and once you have run the eclipse:eclipse goal, you will be in a position to build your plugin code with the Eclipse IDE, or the Eclipse headless PDE build".
Upvotes: 3