How do I have Maven install and/or configure eclipse plugins automatically - eclipse

I am new to eclipse and the interaction between eclipse and maven.
Is it possible to have Maven automatically install Eclipse plugins if the eclipse path is known?
Is it possible to configure specific project settings for each installed plugin when the eclipse project is created? Is it easy to update these configuration settings once the eclipse project is created?
How may I go about this using Maven? Or is it not possible/ideal?

To install a plugin, you would have to copy the plugin files to the eclipse/plugins folder as described in the Eclipse wiki
You can use maven to copy the plugin files/folders to the eclipse plugins directory. This question will show how: Best practices for copying files with Maven
However, I would not advise to use maven to configure the IDE and its plugins, you should manage your projects and not your IDEs with maven.

Related

How to add my bnd jars dependencies to my eclipse RCP application?

I have some core plugins created in my workspace that are built with BND tools in eclipse. Now I have to reference those core plugins in my eclipse RCP application which is developed with PDE tool in eclipse. But there is no visibility to the BND generated plugins inside the RCP application. May be I can manually copy those plugins to a folder and add the folder to the target. But I want to get rid of such manual task.
Is there any easy way to add the BND generated plugins as dependencies to my RCP application?
Thanks in advance.
I didn't try with recent version of eclipse and bndtools
But you can try my experiment done 4 year ago
https://github.com/filippor/bndPdeTarget

how to add ojdbc14.jar to maven project in eclipse

How can I add the ojdbc14.jar file to a maven project in eclipse? In other posts, there is a mention of a installing the jar into the local repository. However, I cannot install maven on this machine and eclipse is the only way in.
Thanks.

I need to get maven folder while creating project

I have downloaded maven 3.x successfully but when I am opening eclipse ide File > New > Project and need to select maven project then I am not able to view the maven folder itself .I dont know whether I need m2e plugin or what as I am new to this .Please guide me on this.
Open Help - Eclipse Marketplace in Eclipse and then enter m2e or maven plugin. It depends on your eclipse version, what to install.
But there are also a lot of eclipse bundles, which already include the maven plugin like the Java EE version.

Maven add source directory in Eclipse

I get my code generated from the maven-jaxb2-plugin maven plugin. It puts the code into target/generated-sources. Now I have to manually left click onto the project -> properties-> Java Build Path-> Add Folder.... That's kind of annoying for someone downloading it from SVN.
Is there some way to get that dome automatically through my pom?
This kind of stuff is the responsibility of IDE's Maven plugin and fortunately M2E supports it since recently (finally!) through the concept of M2E connectors, that is M2E extensions that understand a nature and lifecycle binding of certain plugins. And because it's since recently, not much Maven plugins have their connectors for M2E.
However, you're lucky, because Jaxb2 plugins are actually already supported. I assume you're already using M2E. Then go to Preferences -> Maven -> Discovery, then Open Catalog, then find Jaxb2 connector.
maven add-sources should do the trick for netbeans or eclipse
M2E and having maven generated source folders as eclipse source folders

Eclipse (STS) + Maven

I basically have 2 questions:
Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)
Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.
Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)
You could open a shell inside eclipse , cd into the right directory and run the maven console from there. But, when using M2Eclipse (see next point), you're not supposed to run eclipse:eclipse.
Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.
STS bundles M2Eclipse which comes with an embedded version of Maven (so it doesn't "unpack" Maven). But you can Configure M2Eclipse to use an external version. Go to window > Preference > Maven > Installations and Add... your external install:
Try the m2eclipse plugin from sonatype and you can eliminate use of 'mvn eclipse:eclipse' altogether. After installing m2eclipse and restarting eclipse, select File->Import->Maven->Existing Maven project. Browse to your maven project and select it. The m2eclipse plugin reads the pom and creates an eclipse project (this is the step that 'mvn eclipse:eclipse' gives). There are other useful features of the m2eclipse plugin including pom editor.
m2eclipse project is moving out of sonatype into the eclipse foundation project page and will be released on the Indigo train.
See this page for more info on m2eclipse: http://m2eclipse.sonatype.org/