JetBrains provide a the IntelliJ IDE, a community edition is available and is documented here.
This IDE is recommended for excellent Maven integration, and very fast build times. It is especially good at working with large multi-module projects such as GeoNetwork.
-
Open project in IntelliJ, it will create an
.idea
folder (which is covered by.gitignore
) -
Use File > Project Structure to confirm Java 8 is used
-
Configuration to make Maven tools window easier to follow:
- Group Modules
- Always Show ArtifactId
-
Use the Maven tools window to:
- Enable the
env-dev
profile - Toggle "Skip Tests" Mode
- Execute Maven Goal:
clean install
- Enable the
-
After doing the maven build once, select menu Build > Build Project.
-
The build progress is shown in the Build tools window.
-
This is an incremental build, so only modified files are compiled in the future.
-
Menu Run > Edit Configurations...
-
Add new Maven configuration:
-
Working Directory:
core-geonetwork/web
-
Command Line:
jetty:run
-
Profiles:
env-dev
-
-
Add maven goal
proccess-resources
before launch. -
Run
-
Testing
- http://localhost:8080/geonetwork
- user: admin
- password: admin
-
Live debugging
- Debug using the run configuration created above
- The
env-dev
allows updates while running - Use Build Project to compile, allowing methods to be rewritten interactively.
- Use Maven tool window to run
mvn process-resources
to copy changes into the running web application.