XLD/R - Repo migration issues while using community plugin.

Follow

Rohit Yadav -

Scenario
While working on XLR/D repository migration, you run into errors - The input line is too long. 
The syntax of the command is incorrect.
Environment

XL Release, XL Deploy

Reasons & How to overcome.

This is due to having too many jars on the classpath that is passed as a CLI argument in this line of migrate.cmd: 
%JAVACMD% %DEPLOYIT_SERVER_OPTS% %DEPLOYIT_SERVER_LOG_OPTS% -cp "%DEPLOYIT_SERVER_CLASSPATH%" com.xebialabs.deployit.tools.RepositoryMigration %*

In later versions of java you were able to use wildcards in the classpath so this issue is resolvable by changing the following code: 
set DEPLOYIT_SERVER_CLASSPATH=conf;ext 
for %%i in (hotfix\*.jar) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i 
for %%i in (lib\*.jar) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i 
for %%i in (plugins\*.jar) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i 
for /d %%i in (plugins\*) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i

Into something kind of like: 
set DEPLOYIT_SERVER_CLASSPATH=conf;ext;lib\* 
for %%i in (hotfix\*.jar) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i 
for %%i in (plugins\*.jar) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i 
for /d %%i in (plugins\*) do set DEPLOYIT_SERVER_CLASSPATH=!DEPLOYIT_SERVER_CLASSPATH!;%%i

Caveats (if any)

 

Additional Information

 

Tags
 kb, how-to, xl-release,
Have more questions? Submit a request
Powered by Zendesk