Eclipse M2 Quickstart¶
This guide is designed to get developers up and running as quick as possible. For a more comprehensive guide see the Eclipse Guide.
M2Eclipse provides tight integration for Apache Maven into the Eclipse IDE.
{% include-markdown "./checkout.txt" %}
Eclipse Maven builder¶
The maven build supplied with eclipse works with the pom.xml files, however it does recognize some of our custom build steps:
- Go to Preferences and navigate to Maven --> Errors/Warning
- Change the Plugin execution not covered by lifecycle configuration to
Warning.

java-cc-maven-plugin¶
The Eclipse M2 builder does recognize this plugin, build once on the command line first:
-
Navigate to
**`src/wcs1_1**`. -
Compile, to force the code to be generated:
mvn compile [INFO] --- javacc-maven-plugin:2.3:jjtree (jjtree) @ gs-wcs1_1 --- Java Compiler Compiler Version 4.0 (Tree Builder) (type "jjtree" with no arguments for help) "src/wcs1_1/target/jjtree/org/geoserver/wcs/kvp/rangesubset/ASTFieldId.java" does not exist. Will create one. ... Annotated grammar generated successfully in src/wcs1_1/target/jjtree/org/geoserver/wcs/kvp/rangesubset/rangeset.jj [INFO] [INFO] --- javacc-maven-plugin:2.3:javacc (javacc) @ gs-wcs1_1 --- Java Compiler Compiler Version 4.0 (Parser Generator) (type "javacc" with no arguments for help) Reading from file src/wcs1_1/target/jjtree/org/geoserver/wcs/kvp/rangesubset/rangeset.jj . . . File "TokenMgrError.java" does not exist. Will create one. File "ParseException.java" does not exist. Will create one. ... Parser generated successfully. [INFO] [INFO] --- fmt-maven-plugin:2.4.0:format (default) @ gs-wcs1_1 --- [debug] Using AOSP style [INFO] Processed 47 files (0 reformatted). [INFO]
Import modules into Eclipse¶
-
Use File --> Import to open the Import wizard. Select Maven --> Existing Maven Projects import wizard, and Next.
-
Define the Root Directory by browsing to the GeoServer
srcfolder. -
Open Advanced options:
- Profiles:
release - Name template: [[groupId].[artifactId]]{.title-ref}

- Profiles:
. Press Finish to start import.¶
During import use
Resolve Later, exclude lifecycle mapping.
Run GeoServer from Eclipse¶
-
From the
Package Explorerselect theweb-appmodule -
Navigate to the
org.geoserver.webpackage -
Right-click the
Startclass and navigate toRun as,Java Application
-
After running the first time you can return to the
Run Configurationsdialog to fine tune your launch environment (including setting a GEOSERVER_DATA_DIR).
Note
If you already have a server running on localhost:8080 see the Eclipse Guide for instructions on changing to a different port.
Access GeoServer front page¶
- After a few seconds, GeoServer should be accessible at: http://localhost:8080/geoserver
- The default
adminpassword isgeoserver.
