Multiple environments with Composer

Similar to the previous posts about configuring dqMan/DQLTester (Multiple environments with dqMan/DQLTester) and tomcat (Multiple environments with Tomcat/DA), Composer can be launched the same way:

Folder structure:

  • composer.bat
  • properties
    • env1
      • dev
        • dfc.properties
      • prod
        • dfc.properties
    • env2
      • dev
        • dfc.properties
      • prod
        • dfc.properties
  • etc.

Composer.bat:

@Echo off
SETLOCAL ENABLEEXTENSIONS

SET composerfolder=path to composer folder<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span>
SET folderbase=dfcproperties
SET parambase=-Ddfc.properties.file=

echo ****************
echo 1. env1 dev
echo 2. env2 prod
...
echo ****************

SET /p var= ^&gt; Choose option:

if "%var%"=="1" goto op1
if "%var%"=="2" goto op2
...

:op1
SET JAVA_TOOL_OPTIONS=%parambase%%cd%\%folderbase%\env1\dev\dfc.properties
goto finish

:op2
SET JAVA_TOOL_OPTIONS=%parambase%%cd%\%folderbase%\env1\prod\dfc.properties
goto finish
...

:finish

start "" /D %composerfolder% /B %composerfolder%\composer.exe
cls&amp;exit

Composer/Repoint plugins/guides

 

This is a list of plugins/guides I’ve developed over the years:

This Composer plugin provides a button that allows you to quickly change your dfc.properties configuration from a configurable list enabling the use different environments so you don’t have to use different composers or manually change dfc.properties.

This guide will help you integrate repoint into your composer (as a perspective), so you don’t need to have multiple eclipse’s instances opened at the same time.

While repoints allows you to run API scripts from the API commands windows, it doesn’t work with DQL scripts. This plugin modifies the DQL command window so it will recognize the script sintax (@absolute_path_to_script_file)

This plugin modifies the DQL command window in repoint so you can use the auto-complete feature with default/custom document types and attributes while you type the DQL query.