What eclipse plugin the project is required? - eclipse

I have found this project sample. It says it is an eclipse project type but I am wondering what eclipse plugin does it require to be compiled successfully? I'd like to build the sample with my eclipse but I am not sure how should I prepare my eclipse to compile such kind of project? What additional libs etc... So I need your advice
Here is its structure screen shot
project source...
Any useful comment is appreciated

That looks more like a maven project structure - check if it has a pom.xml.

In the root directory of the project , I found it has a pom.xml , so it is a Maven based project.
Looking into .project file (an eclipse project-specific file) , it has the following :
<nature>org.maven.ide.eclipse.maven2Nature</nature>
org.maven.ide.eclipse.maven2Nature means that the project has the m2eclipse (a maven pluign for eclipse) nature .Note that after the version 0.12.1 , m2eclipse project is moved to Eclipse Foundation and become the part of Eclipse 3.7 (Indigo) release . The name of this nature becomes org.eclipse.m2e.core.maven2Nature
Besides ,I also found that there are some WTP-specified setting files (eg org.eclipse.wst.common.project.facet.core.xml) in the .setting folder . WTP is included inside the 'Java EE Developers version' of eclipse by default.
So , this project is created by eclipse installed with the WTP and the m2eclipse with the version at or before 0.12.1.
how should I prepare my eclipse to compile such kind of project? What
additional libs etc.
As it is a maven project , you don't have to include the additional libs explicitly . All the libs required are configured inside the pom.xml and maven will download these libs for you.
For me , I would use an eclipse installed with WTP , m2eclipse ,m2eclipse-wtp and GWT eclipse plugin . Then create a new maven war application , and only copy the pom.xml and the src folder to the project .After that use the m2eclipse function to update the download libs and those project-specified setting files.

Related

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.

How to add Maven dependencies in Eclipse libaries

Can any one explain how to add Maven dependency JAR i.e. build path libraries? To be very specific how to include JAR file mentioned in pom.xml to Java build path? Maven dependencies - unable to see jars over here.
Don't have a option to update Maven dependencies. Also executed the script mvn eclipse:eclipse, seen on StackOverflow.
Generally, you should not have any need to deal with such a task manually. Here is the correct procedure for importing of maven project to your Eclipse IDE:
Make sure you have m2eclipse plugin installed (Maven support for Eclipse). As far I remember it is included to Eclipse IDE for JEE developers by default.
Checkout your maven project to any directory
From this directory (root pom.xml is located in), run: mvn eclipse:eclipse
Go to Eclipse, File -> Import, select "Existing maven project"
Select directory where your root pom.xml is located, Eclipse should find all maven modules.
Optional: if eclipse will tell you that it can't recognize some maven plugins - ignore this, just continue.
If you follow this instruction, IDE will create all maven modules as eclipse projects and you will have an option to update maven dependencies and also willsee all of them rigth in IDE.

maven plugin in eclipse

Will all the jars used by the project added automatically to build path of project in eclipse by adding the maven plugin to eclipse(m2eclipse)? If not added automatically what should be done to get the jars into build path?
Will all the jars used by the project added automatically to build
path of project in eclipse by adding the maven plugin to
eclipse(m2eclipse)?
All the JARs that you define as dependencies in pom.xml will be added automatically to the Eclipse build path.
If your project is set up as a Maven project in Eclipse, then yes. Also this assumes that your settings.xml file and pom.xml are correct.
If it is an exsisting non-maven project, you will need to use the context menus to convert it into a maven project before the dependencies are added.

Eclipse -> Maven -> Update Project Configuration and Maven Standard Directory Layout

I am utilizing the standard maven directory layout in my eclipse maven project:
src/main/java
src/main/assembly
src/main/config
src/main/scripts
src/main/resources
src/test/java
src/test/resources
as per the: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Whenever I then use 'Maven -> Update Project Configuration' in the m2e plugin the 'assembly', 'config' and 'scripts' directories are being removed by m2e from source folders. I would appreciate if anyone could suggest how to configure m2e to respect the standard maven layout. I used the basic java archetype offered by m2e to create the project.
With the maven-build-helper plugin you can add additional source folders to your build. To make eclipse extract that information from the plugin you need the m2e connectors buildhelper and m2e-apt. They can be found on the marketplace.

Create an eclipse plugin with dependency on a maven project

I have a maven project that contains a certain api I need to use in an eclipse plugin. This eclipse plugin is not currently a maven project but a normal eclipse plugin project with a manifest. I converted this plugin project to a maven project (using m2e menu command to change project to maven) I added the dependency to the maven project from this project. My maven build for this project is running fine from command line. Now when I launch the eclipse application I am getting a ClassNotFoundException for the api I am referring to from the plugin project. Please help.
This can be done by adding tyco configuration to the maven project. That enables you to have a maven project with a Manifest thus enabling other plugins to depend on it. More info: http://www.eclipse.org/tycho/