1

below is the script I am using and it is failing with error :

java.lang.RuntimeException: Source File: ../CalcMgr/exploded/ear/adf/META-INF/adf-config.xml does not exist.

I tried running it locally and the build.xml works. But in jenkins server though the file exists it is failing with that error.

    <echo message="Replacing '#\{JAVASCRIPT_VERSION\}' with '${env.JAVASCRIPT_VERSION}' in file: '${exploded}/ear/adf/META-INF/adf-config.xml'" />
        <refactorbuildno fileName="${exploded}/ear/adf/META-INF/adf-config.xml" searchText="#\{JAVASCRIPT_VERSION\}" replaceText="${env.JAVASCRIPT_VERSION}"/>

Anyone kindly help to fix this

SirFartALot
  • 1,215
  • 5
  • 25
jon
  • 213
  • 1
  • 5
  • 18
  • Did you check the character case of the path? Paths in Windows are case insensitve whereas paths under linux are case sensitive... You also checked the output of the "echo" message? – SirFartALot Jun 27 '19 at 08:26
  • I am building in windows both in local and in jenkins – jon Jun 27 '19 at 08:42
  • please also try to print out the absolute path: https://stackoverflow.com/questions/3136849/how-do-i-convert-a-relative-path-in-ant-to-an-absolute-path – SirFartALot Jun 27 '19 at 08:52
  • I didn't understood what it means. I am not using any relative paths in my script. Can you please put it in the command what you exactly want me to add – jon Jun 27 '19 at 09:04
  • FYI - ../CalcMgr/exploded/ear/adf/META-INF/adf-config.xml this path exists – jon Jun 27 '19 at 09:14
  • Well, `../CalcMgr/...` is a relative path. Just try `` and check if the resulting path exists... – SirFartALot Jun 27 '19 at 09:21
  • Thank You :) I will check and let you know – jon Jun 27 '19 at 11:38
  • I am getting patha as [echo] C:\Jenkins\jobs\calcmanager\branches\mydevelop\workspace\calcBuild\${exploded}\ear\adf\META-INF\adf-config.xml – jon Jun 28 '19 at 04:51
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/195662/discussion-between-sirfartalot-and-jon). – SirFartALot Jun 28 '19 at 05:29
  • but what I want is [echo] C:\Jenkins\jobs\calcmanager\branches\mydevelop\workspace\calcMgr\exploded\ear\adf\META-INF\adf-config.xml – jon Jun 28 '19 at 05:29

0 Answers0