Usage

This plugin will process all *.idl files in the sourceDirectory into a common generated sources output directory. This will occur during the generate-sources phase and the sources directory will be added to the project for the compile phase.

To execute the goal in stand alone mode, you can type:

<<<mvn idlj:generate>>>

Available Configuration Options for each Source tag

  • compatible - Forces the creation of Java sources compatibile with JDK:s older than version 1.4. Defaults to true, if not provided
    ...
    <source>
      <compatible>false</compatible>
    </source>
    ...
  • emitStubs - Whether the compiler should emit client stubs. Defaults to true, if not provided
    ...
    <source>
      <emitStubs>false</emitStubs>
    </source>
    ...
  • emitSkeletons - Whether the compiler should emit server skeletons. Defaults to true, if not provided.
    ...
    <source>
      <emitSkeletons>false</emitSkeletons>
    </source>
    ...
  • packagePrefix - Specifies a single, global packageprefix to use for all modules. Defaults to "", if not provided.
    ...
    <source>
      <packagePrefix>com.mycompany</packagePrefix>
    </source>
    ...
  • includes - Specifies which files to include in compilation.
    ...
    <source>
      <includes>
        <include>YOUR_IDL_FILE.idl</include>
        <include>*_tool.idl</include>
      </includes>
    </source>
    ...
  • excludes - Specifies which files to exclude from compilation.
    ...
    <source>
      <excludes>
        <exclude>YOUR_IDL_FILE.idl</exclude>
        <exclude>*_tool.idl</exclude>
      </excludes>
    </source>
    ...
  • packagePrefixes - The list of package prefixes for certain types.
    • type The simple name of either a top-level module, or an IDL type defined outside of any module
    • prefix The generated Java package name with prefix for all files generated for that type
      ...
      <source>
        <packagePrefixes>
          <packagePrefixe>
            <type>module1</type>
            <prefix>com.mycompany.module1</prefix>
          </packagePrefixe>
          <packagePrefixe>
            <type>module2</type>
            <prefix>com.mycompany.module2</prefix>
          </packagePrefixe>
        </packagePrefixes>
      </source>
      ...
  • defines - The list of preprocessor symbols to define.
    • symbol The symbol to define
    • value The value of the symbol. This is optional.
      ...
      <source>
        <defines>
          <define>
            <symbol>MY_SYMBOLE1</symbol>
          </define>
          <define>
            <symbol>MY_SYMBOLE2</symbol>
            <value>FOO</value>
          </define>
        </defines>
      </source>
      ...
  • additionalArguments - The list of additional, compiler-specific arguments to use.
    ...
    <source>
      <additionalArguments>
        <additionalArgument>-nowarn</additionalArgument>
      </additionalArguments>
    </source>
    ...

Configuration example

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>idlj-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <compiler>idlj</compiler>
          <sources>
            <source>
              <includes>
                <include>YOUR_IDL_FILE.idl</include>
              </includes>
              <emitStubs>true</emitStubs>
              <emitSkeletons>true</emitSkeletons>
            </source>
          </sources>
          <includeDirs>
            <includeDir>AN_IDL_DIRECTORY</includeDir>
            <includeDir>ANOTHER_IDL_DIRECTORY</includeDir>
          </includeDirs>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>