Daily Archives: September 29, 2004

Scripting in Ant

Today I had to create an automatic build for a Tuxedo Server. It requires the following steps:

  • generate sources from header files
  • compile each source with Cobol compiler
  • link all obj files into a dll

.
For I moment I have thought that a rapid bat file will solve my problem, but I wasn’t able to figure out how to obtain a list of header files from a directory. I have tryed the following:

 set LIST=
 for %%i in (*.ext) do set LIST=%LIST% %%i

but it didn’t work. After a while I have found out that I should enable delayed variable extensions and the above lines would become:

  set LIST=
  for %%i in (*.ext) do set LIST=!LIST! %%i

At this step I wasn’t sure I want to continue, so I have decided to switch to Ant.
Here obtaining the list of files was an easy one pathconvert did my job immediately. But I have faced a second problem: how should I pass each generated file to the Cobol compiler. The solution I have found (and I don’t know if it the unique one – give me hints if you have) was to use a script task. After downloading BSF and
Rhino in a few lines I have solved my problem.
Again Ant proved it’s a great tool for building projects.
I would appreciate any other possible solution.

Leave a comment

Filed under Uncategorized

notebook hapiness

I was looking for this all my life (ehhh… just kidding, just in the last time). It is the best thing I would expect.
Take a look: notebook.

Leave a comment

Filed under personalog, Tools

Got to know list

A long list of “got to know”.

Journey to Java

And I see it completed on other places :-), so I would like to add 3 more (for the moment):
XXIV+: You need to now how to use mock objects in your testing environment.
XXVI: You need to know how to refactor code.
XXVII: You need to know some enterprise integration patterns.

Leave a comment

Filed under links, personalog