how to use idlj-maven-plugin to generate java files

2.7k views Asked by At

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>
1

There are 1 answers

3
Nick Cross On

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