There are different ways to set up dotCMS to run in debug mode, which allows you to hot swap class and code changes (for the most part). You can run dotCMS standalone, from release, and connect to it via remote debugging as described in other documents, or you can run from Eclipse/IntelliJ in debug mode. Either way is effective.
From the Command Line
1. Clone the dotCMS core repository using the following command (make sure the “–recursive” option is being passed down):
git clone --recursive email@example.com:dotCMS/core.git
2. In case you have access to enterprise and license repositories, execute:
git submodule update --remote
This command will connect the submodules inside “core” with the correct repositories.
3. Open up a terminal and run the following command from
./gradlew clean deployWarTomcatTests
Setup environment to work with Eclipse (or move to Inside IntelliJ)
This will make sure the dependencies are downloaded correctly and your project compiles correctly.
4. Clean any Eclipse configuration, if any by running this command from
core/dotCMS (this step is optional)
5. Run the eclipse plugin tasks to configure .project, .classpath and .factorypath from
6. Open Eclipse and import the project - choose the
7. Select “Existing project into Workspace”
This doc assumes you have followed the from Command Line dotCMS installation steps 1-3* *
4. Click on “Import Project”
5. Select build.gradle file from dotCMS path
6. Specify any additional settings if you wish and click OK
7. Set a “Test Resource” path
Go to File → Project Structure → Modules → dotCMS → dotCMS_functionalTest and set src/functional-test/java folder as Test Source, as well as src/functional-test/resources as Test Resource. Then click Apply and OK.
8. Do the same with dotCMS_integrationTest module.
Logging into your dotCMS installation
In a browser, go to
the css will compile and the site should render
In another browser tab, go to
- User: firstname.lastname@example.org
- Password: admin
Note: using 127.0.0.1 for front end traffic will allow you to login at localhost:8080/dotAdmin under a different session. You can also use your browser in incognito mode for the same effect.
The following additional information may be helpful when working with a dotCMS source distribution.
The following gradle commands are used to perform the specified tasks when developing from source:
|Build dotCMS WAR file|
|Compile Core project|
|Compile Core project, preserving assets|
|Compile Core project for testing|
|Compile Core and ee projects||This task is for dotCMS internal use only, since it compiles code for the ee.jar which is not available in the public dotCMS repo.|
|Create Distribution||e.g. .tar.gz, .zip files|
Note: Under the regular dotCMS distribution the deploy-plugins.sh and the undeploy-plugins.sh must be used to deploy/undeploy plugins; the above gradle commands are only used when developing from source.
- [Gradle tasks](#GradleTasks} must be run from the core/dotCMS folder.
- WAR files generated by the
gradlew jarcommand are generated in the folder.
- Distribution files (e.g.
.zipfiles) are generated in the core/dist-output folder.