Skip to content

Commit

Permalink
Section explaining how to work with Maven under Eclipse has been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea committed Mar 8, 2018
1 parent b728c69 commit c544488
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 4 additions & 15 deletions wicket-user-guide/src/main/asciidoc/maven/maven_2.adoc
Expand Up @@ -90,26 +90,15 @@ Intellj IDEA comes with a Maven importing functionality that can be started unde
image::../img/intellj-maven-import.png[]

*Eclipse*
If our IDE is Eclipse the import procedure is a little more complex. Before opening the new project we must generate the Eclipse project artifacts running the following command from project root:

[source,java]
----
mvn eclipse:eclipse
----

Now to import our project into Eclipse we must create a classpath variable called M2_REPO that must point to your local Maven repository. This can be done selecting “Window/Preferences” and searching for “Classpath Variables”. The folder containing our local Maven repository is usually under our user folder and is called .m2 (for example under Unix system is /home/<myUserName>/.m2/repository):

image::../img/eclipse-classpath-variables.png[]

Once we have created the classpath variable we can go to “File/Import.../Existing Project into Workspace”, select the directory of the project and press “Finish”:
Just like the other IDEs Eclipse supports Maven projects out of the box. Open the “File/Import...” dialog and search for Maven:

image::../img/eclipse-maven-import.png[]

Once the project has been imported into Eclipse, we are free to use our favourite plug-ins to run it or debug it (like for example https://github.com/xzer/run-jetty-run/[run-jetty-run]).
then, select the project folder containing the POM file:

NOTE: Please note the option “Copy projects into workspace” in the previous illustration. If we select it, the original project generated with Maven won't be affected by the changes made inside Eclipse because we will work on a copy of it under the current workspace.
image::../img/eclipse-maven-select.png[]

NOTE: If we modify the pom.xml file (for example adding further dependencies) we must regenerate project's artifacts and refresh the project (F5 key) to reflect changes into Eclipse.
Once the project has been imported into Eclipse, we are free to use our favourite plug-ins to run it or debug it (like for example https://github.com/xzer/run-jetty-run/[run-jetty-run]).

=== Speeding up development with plugins.

Expand Down

0 comments on commit c544488

Please sign in to comment.