Hi all,
I found it. It's the @ character from @echo off. If I add the property 
<atChar>@</atChar> and replace my original run.bat with 

--------------------------------
${project.version}
${atChar}echo off
FOR /F "eol=; tokens=2,2 delims==" %%i IN ('findstr /i "http_port"
conf\configuration.properties') DO set http_port=%%i FOR /F "eol=; tokens=2,2 
delims==" %%i IN ('findstr /i "control_port"
conf\configuration.properties') DO set control_port=%%i

cmd /C java -jar target\bafana-web-${project.version}-standalone.jar
--httpPort=%http_port% --controlPort=%control_port% %*
--------------------------------

It works.

Cheers.
AA

-----Message d'origine-----
De : Alberti Antoine [mailto:[email protected]] 
Envoyé : mercredi 1 décembre 2010 19:06
À : [email protected]
Objet : Assembly filtering syntax - properties not filtered

Hi all,

is it possible that the syntax of a file to filter prevents the assembly plugin 
from detecting a variable to replace? If I filter the following run.bat file:
 
--------------------------------
${project.version}
@echo off
FOR /F "eol=; tokens=2,2 delims==" %%i IN ('findstr /i "http_port"
conf\configuration.properties') DO set http_port=%%i FOR /F "eol=; tokens=2,2 
delims==" %%i IN ('findstr /i "control_port"
conf\configuration.properties') DO set control_port=%%i

cmd /C java -jar target\bafana-web-${project.version}-standalone.jar
--httpPort=%http_port% --controlPort=%control_port% %*
--------------------------------

the result is:

--------------------------------
1.0-SNAPSHOT
@echo off
FOR /F "eol=; tokens=2,2 delims==" %%i IN ('findstr /i "http_port"
conf\configuration.properties') DO set http_port=%%i FOR /F "eol=; tokens=2,2 
delims==" %%i IN ('findstr /i "control_port"
conf\configuration.properties') DO set control_port=%%i

cmd /C java -jar target\bafana-web-${project.version}-standalone.jar
--httpPort=%http_port% --controlPort=%control_port% %*
--------------------------------


Note that the first instance of project.version is filtered, but not the second 
one. Of course, I added the first one as a test, to verify that the file was 
actually filtered.

What should I change in my original file?

Thanks a lot
Antoine Alberti

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to