Passing a jenkins build parameter to sbt plugin
<p>I need to create a jenkins project to compile and test a scala project. There are several scala projects so the build will be parameterized and run for each project.</p>

<p>To process a scala project, I want to use sbt plugin and specify "Sub-directory" using build parameter "project_name".</p>

<p>I tried to pass the parameter using $project_name, ${project_name}, %project_name% but none of those worked. I get output as follows (for first variation):</p>

<pre><code>[$project_name] $ cmd.exe /C " java -Dsbt.log.noformat=true -jar C:\.......\sbt\bin\sbt-launch.jar compile test "
The directory name is invalid
FATAL: command execution failed: Cannot run program "cmd.exe" (in directory "C:\.......\$project_name"): CreateProcess error=267, The directory name is invalid
java.io.IOException: Cannot run program "cmd.exe" (in directory "C:\.......\$project_name"): CreateProcess error=267, The directory name is invalid
</code></pre>

<p>If I add "Execute Windows batch command" step, I am able to pass the parameter to the script using %project_name%.</p>

<p>What is the right syntax?</p>