• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Version writer

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am writing a little piece of code that shall parse a simple folder structure to replace the version number present in all of the version.txt files. The way in which I have approached this is to get this to work for a single version.txt file in the same directory as my class and this worked as expected (the new version number is provided as an argument at compile time, e.g. 02.500). The problem lies when I build this to parse a folder structure. The Folder structure is XXX_Src/Dist, where XXX varies. The problem I am getting is that the file is not read in at getFileContents method. An arraylist prior to this stage is created, containing all the varying XXX's (as above), which IS working. The file structure is there. I am using WSAD. Any ideas? Any help/advice would be appreciated. This is driving me mad! I hope I am making sense.

Thanks,

Ujgar Singh Amli

The code is as follows:




BUILD-ALL.PROPERTIES FILE
 
Ujgar Singh Amli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Come on guys, can someone help me please?!
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's kind of long to debug for you. Most of it works? What part doesn't? Does it just get file not found? You have quite a lot of logging. Anything useful coming out there?
 
Ujgar Singh Amli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stan,

thanks for your reply. The problem lies within the getContentstoWrite method. The programme is giving me a file not found (the first statement within the try statement). Yet the file is there. The folder structure is there.

The programme (when adapted accordingly) works fine for a version.txt file in the same directory as the class file.

I am baffled with this. Ps I am using this within WSAD.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic