2010-04-15 5 views
0

속성을 변경하는 데 ants propertyregex 메서드를 사용하고 있는데 문제가 해결되었습니다. 나는 반환 문자가 손실됩니다.propertyregex는 여러 줄의 반환 문자를 제거합니다.

는 여기 변경 시도하고있는 작업은 다음과 같습니다

cluster.path=\ 
${nbplatform.active.dir}/harness:\ 
${nbplatform.active.dir}/platform:\ 
${nbplatform.active.dir}/nb 

이것은 .properties 파일에 있습니다.

<propertyregex property="cluster.path" 
       input="${cluster.path}" 
       regexp="nbplatform.active.dir" 
       replace="xplatform.base" 
       global="true" 
       override="true"/> 

물건을 교체하지만 난 얻을 :

그래서 나는 다음과 같이 변경하기 위해 노력하고있어

cluster.path= ${xplatform.base}/harness\: ${xplatform.base}/platform\: ${xplatform.base}/nb 

나에 의해 제어되지 선 아래로이 브레이크 로직 (넷빈즈) ':'를 구분 기호로 사용합니다.

아이디어가 있으십니까?

+0

@javydreamercsw - .properties 파일을 어떻게로드하고 있습니까? 또한 cluster.path 속성의 값을 어떻게 검사하고 있습니까? 문제를 설명하는 완전한 빌드 파일로 압축 해 줄 수 있습니까? –

+0

아니요, 값 자체를 변경하려고합니다. 나는 이런 식으로 파일 자체를 변경하는 작업을했다 :

  
javydreamercsw

답변

0

나는 파일 자체를 다음과 같이 변경했다. replaceregexp file = "nbproject/platform.properties"match = "nbplatform.active.dir"replace = "platform.base"byline = "true"flags = "g , s "/

관련 문제