0

I am trying to generate source files by using the idlj-maven-plugin. I have configured the plugin in the following way:

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>idlj-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <compiler>idlj</compiler>
                    <includeDirs>
                        <includeDir>/additionalIdlFiles</includeDir>
                    </includeDirs>
                </configuration>
            </plugin>
            </plugins>
    </pluginManagement>
</build>

It works fine (it generates source files) when I'm using the following command in terminal:

mvn idlj:generate

However I would like to make this plugin work during the generate-sources phase. How can I do that? I have tried to specify the phase like below:

<phase>generate-sources</phase>

But it does not work. The: mvn generate-resources does not create any source files from idl files.

Piotr Michalczyk
  • 249
  • 1
  • 13

2 Answers2

1

This is from a POM I use, and "mvn generate-sources" invokes the IDL compiler just fine.

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>idlj-maven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
            <phase>generate-sources</phase>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <debug>true</debug>
            </configuration>
        </execution>
    </executions>
</plugin>
Greycon
  • 793
  • 6
  • 19
0

To be executed, your plugin must reside in <build><plugins> not in <build><pluginManagement><plugins>.

Wernke
  • 41
  • 3