문제

I want to generate a MD5 checksum of a string (stored as a property value) and store it in other property to be used later in the script.

The only way I have found is to generate a file with the string, generate the MD5 of this file (with checksum task) and then delete the file.

Is there a better way to do it?


For example what I have done is:

<echo file="${tmpFile}">Datos20140306_${info.A}_${info.B}</echo>
<checksum file="${tmpFile}" property="info.md5" />
<delete file="${tmpFile}" />
<echo>Hash: ${info.md5}</echo>
도움이 되었습니까?

해결책

Looking at the Ant documentation (1.9) for <checksum>, it looks like that is the only way. Don't see a way to go straight to a property.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top