我有一个叫common的项目。我尝试使用idlj-maven-plugin从IDL文件生成java源代码,但一次又一次失败。我在Idl/文件夹下有多个文件,与pom.xml的路径相同。我还有另一个名为channel的项目,其中包含IDL文件,但是project channel中的那些文件使用了在公共的include中定义的idl文件。如何使用idlj-maven-plugin生成java源代码?我需要使用idlj或jacorb作为编译器吗?我错过了什么?谢谢!
对于普通项目,我的配置如下:
<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>发布于 2015-11-19 00:35:41
JacORB使用idlj-maven-plugin来生成它的存根。插件配置可以在https://github.com/JacORB/JacORB/blob/master/pom.xml#L415中找到,在hello演示中使用它的一个示例是https://github.com/JacORB/JacORB/blob/master/demo/hello/pom.xml#L29
注意,idl文件存储在(对于hello演示) src/main/idl/server.idl中
https://stackoverflow.com/questions/33774512
复制相似问题