Reputation: 298
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.
Upvotes: 0
Views: 464
Reputation: 41
To be executed, your plugin must reside in <build><plugins>
not in <build><pluginManagement><plugins>
.
Upvotes: 0
Reputation: 789
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>
Upvotes: 1