1

I have one project called common. I tried to generate java source code from IDL files using idlj-maven-plugin, but failed again and again. I have multiple files under Idl/ folder which is at the same path as pom.xml. I have another project called channel containing IDL files, but those files in project channel use the idl files defined in common using include. how can I generate java source code using idlj-maven-plugin? Do I need to use idlj or jacorb as compiler? What do I miss? Thanks!

For project common, my configuration is as below:

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>idlj-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </execution>
                </executions>
                <configuration>
                    <compiler>jacorb</compiler>
                    <sourceDirectory>Idl</sourceDirectory>
                </configuration>
            </plugin>
liya
  • 156
  • 3
  • 10

1 Answers1

1

JacORB uses idlj-maven-plugin to generate its stubs. The plugin configuration can be found https://github.com/JacORB/JacORB/blob/master/pom.xml#L415 and an example of its usage within the hello demo is https://github.com/JacORB/JacORB/blob/master/demo/hello/pom.xml#L29

Note that the idl file is stored within (for the hello demo) src/main/idl/server.idl

Nick Cross
  • 119
  • 4
  • Thank you, Nick, but I have my idl files under Idl folder, can I define the sourceDirectory? – liya Nov 19 '15 at 02:04
  • 1
    Looking at the source for IDLJMojo, the default for sourceDirectory is `${basedir}/src/main/idl` so you should be able to configure and override that. You should probably add a dependency (as per my example) for the version of JacORB you wish to use. – Nick Cross Nov 19 '15 at 12:33
  • Thank you very much, Nick, I finally know how to configure it. – liya Dec 04 '15 at 01:54