Search code examples
antcorbaidljacorb

JacORB: changing prefix and suffix


I would like to change package prefix and suffix in my ant build while generating java from idl. This has to be generic solution! The idea goes like that:

I have idl files (ONE.idl, TWO.idl) with namespace ONE_cb in first and TWO_cb in second (as _cb suffix is required for c++ compatibility). TWO_cb has atributes from ONE_cb, ONE_cb has only basic types. I want to change that to packages going like com.example.ONE and com.example.TWO.

I'm using JacORB 3.6. and I don't know how to do it.
My code looks like that:

<target name="idlj-generate">
<idl2java
   srcdir="${psm.dir}/${project}/"
   destdir="${build.generated.dir}"
   includepath="${psm.dir}"
   all="true">
      <define key="__JACORB_GENERATE__"/>
      <i2jpackage names=":com.example"/>
      <i2jpackage names="_cb:"/>
</idl2java>
</target>

It doesn't work. As I stated before it has to be generic solution. adding

<i2jpackage names="TWO_cb:TWO"/> //option 2
<i2jpackage names="ONE_cb:ONE"/> //option 2b

Is not acceptable

Thank you for Your time.


Solution

  • For various research I concluded that generic solution is immpossible. Only way to perform changing prefix and suffix the same time is to explicite set all included names.