You can use this src/test folder to run the SDL Tridion deployer application in debug mode.
This Maven project uses the exec:java plugin to start a deployer process with test classes scope so that you can run a test deployer. Mind that the exec:java plugin does not run a compile target, you need to do that yourself first.
-
Set up your IDE Run/Debug configuration
- Based on Maven configuration
- Working directory: path to root project, i.e. Z:\Source Code\dd4t\dd4t-cache
- Command line: clean test-compile exec:java
- Before launch:
-
Update deployer configuration \src\test\resources\cd_deployer_conf.xml a. Set the TestDataLocation to [path to project]target\test-classes\test-data i.e. b. Set the Queue\Location to [path to project]target\deployer-test\queue i.e.
-
Update storage configuration \src\test\resources\cd_storage_conf.xml a. Set the path for the defaultFile storage to [path to project]target\deployer-test\cd_data_store i.e. b. Set the path for the defaultFile storage to [path to project]target\deployer-test\cd_data_store\data i.e.
-
Update logback configuration \src\test\resources\logback.xml set property log.folder to [path to project]/target/deployer-test/logs i.e.
-
Run Start debug session in IDE. Starting in run mode will result in "Error: Could not find or load main class com.intellij.rt.execution.application.AppMain" Helpful deployer logs are sent to the console Find the usual logs in [path to project]/target/deployer-test/logs Find the Tridion transport packages in [path to project]/target/deployer-test/incoming and [path to project]/target/deployer-test/queue
-
Get console session Open a command line console in the project root so you can run maven commands for step 5
-
Update deployer configuration Same like option One but skip TestDataLocation, this node is not used when running the deployer without the DeployerTestBench class
-
Update storage configuration Same like option One
-
Update logback configuration Same like option One
-
Run run "clean test exec:java"
-
Set up your IDE Run/Debug configuration
- Based on Application configuration
- Main class: Deployer
- VM options: -cp "./target/classes";./target/test-classes;./target/test-classes/lib/*;./target/test-classes/config"
- Working directory: path to root project, i.e. Z:\Source Code\dd4t\dd4t-cache
- Use classpath of module: dd4t-cache
- Before launch: Run maven goal: "clean test-compile"
-
Update deployer configuration Same like option One but skip TestDataLocation, this node is not used when running the deployer without the DeployerTestBench class
-
Update storage configuration Same like option One
-
Update logback configuration Same like option One
-
Run Copy transport packages from [path to project]target\test-classes\test-data to Z:\Source Code\dd4t\dd4t-cache\target\deployer-test\incoming Start debug session in IDE
Thanks to Jaime, https://sdltridionworld.com/articles/sdltridion2011/tutorials/Deployer_Extensions_With_Eclipse_7.aspx
Alse see "Installing the Content Deployer (other protocols) as a standalone Java process" in http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-8A295A4C-AE9E-43CC-9D76-34356947BC93