CORBA IDL, C++, Java, all together: how?

  • From: "mhwood" < >
  • To:
  • Subject: CORBA IDL, C++, Java, all together: how?
  • Date: Fri, 11 Jan 2013 17:15:04 -0500

Duuh, of course I need to have Maven build a source artifact of my IDL 
sources.  Other people might want to build clients or add-on servers.

So, having done that, I cleaned out the NB-native C++ project and created a 
Maven project, using maven-nar-plugin to compile C++.  I built a Maven plugin 
wrapped around 'omniidl' to compile IDL to C++ for OmniORB.  (It's not 
published yet, sorry, but I intend to publish it.)  I added a dependency on 
the IDL source artifact and used the maven-dependency-plugin to unpack it 
into target/dependency.  My IDL compiler plugin drops generated C++ into 
target/generated-sources/c++.  Now I can configure the NAR plugin to compile 
from both of those source directories:


Code:

          <plugin>
              <groupId>org.codeswarm</groupId>
              <artifactId>maven-nar-plugin</artifactId>
              <version>20121119</version>
              <extensions>true</extensions>
              <configuration>
                  <cpp>
                      
<sourceDirectory>${project.projectDirectory}</sourceDirectory>
                      <includes>
                          <include>src/main/c++/main.cpp</include>
                          <include>target/generated-sources/c++/*.cc</include>
                      </includes>
                      <includePaths>
                          
<includePath>target/generated-sources/c++</includePath>
                      </includePaths>
                      <systemIncludePaths>
                          
<systemIncludePath>/usr/include/COS</systemIncludePath>
                      </systemIncludePaths>
                  </cpp>
                  <libraries>
                      <library>
                          <type>executable</type>
                      </library>
                  </libraries>
                  <linker>
                      <sysLibs>
                          <sysLib>
                              <name>omniORB4</name>
                          </sysLib>
                          <sysLib>
                              <name>omnithread</name>
                          </sysLib>
                          <sysLib>
                              <name>omniDynamic4</name>
                          </sysLib>
                      </sysLibs>
                  </linker>
              </configuration>
          </plugin>




Now it compiles and links!  Unfortunately the POM is a bit specific to 
OmniORB.






CORBA IDL, C++, Java, all together: how?

mhwood 01/01/2013

CORBA IDL, C++, Java, all together: how?

mhwood 01/11/2013

CORBA IDL, C++, Java, all together: how?

mhwood 01/21/2013

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close