Once you have this set up, you can deploy DSpace, by selecting the tomcat deployment from the menu bar, and hitting the green play button next to it. Hit the play button on the opened dialog, and IDEA will deploy the applications at the context paths specified in this section.
DSpace 6 (Services) and debugging command line
Because I wanted to debug command-line main
Remove: <scope>provided</scope> from servlet-api in many pom.xml files.
Add some dependencies to:
Navigate to dspace-api/src/main/java/org/dspace/app/launcher/ScriptLauncher.java, and click Run --> Edit Configurations...
And fill in the Configuration of:
Main class: org.dspace.app.launcher.ScriptLauncher
VM options: -Ddspace.dir=/dspace -Ddspace.configuration=/dspace/config/dspace.cfg -Dservice.manager.spring.configs=/dspace/config/spring/api/*.xml
(I was debugging the checksum checker, so I passed the args that would go to /dspace/bin/dspace )
Program arugments: checker
Working directory: /dpsace/config
Environment variables: dspace.dir=/dspace/
From then, you can click Run -> Debug "ScriptLauncher", or click the green bug button, and the debugger should start up.
If you leave the "run" dialog boxes open at the bottom, you have a quick way to re-run the build and deployment tasks. The maven build can be re-run by clicking the green icon that looks like ">>", and likewise for the ant + tomcat deployment, except you'll have to click "stop" first, and wait for tomcat to shut down.