Hi all,

I'm working on a maven 2 plugin to compile IDL files. Alan Cabrera created an initial plugin, and I am adding some additional features.

I have a couple of questions I'd like to have some help with.

I need to be specify various parameters to pass to the compiler backend. For each idl file to compile, the following needs to be specified:

- Whether the compiler should emit stubs,  skeletons or both
- A list of package prefixes
- A list of symbol definitions for preprocessing of the IDL files

Obviously, these configurations would be the same for many .idl files, so the .idl files should be grouped together.

I suppose an XML configuration of the plugin could look something like this:

<configuration>
  <compiler>jacorb</compiler>
  <sources>
    <source>
      <emit>all</emit>
      <includes>
        <include>**/*.idl</include>
      </includes>
      <excludes>
        <exclude>**/CORBA_TypeCode.idl</exclude>
      </excludes>
      <packagePrefixes>
        <packagePrefix>
          <type>IIOP</type>
          <prefix>org.omg</prefix>
        </packagePrefix>
      </packagePrefixes>
      <defines>
        <define>
          <symbol>_PRE_3_0_COMPILER_</symobl>
          <value>1</value>
        </define>
      </defines>
   </source>
   <test-source>
     .
     .
     .
   </test-source>
  </sources>
</configuration>

I think it would provide the neccessary flexibility. Does this configuration layout look OK to you guys?

I understand that the right way to scan for files to include for compilation is to use a org.codehaus.plexus.compiler.util.scan.StaleSourceScanner. This class uses a SourceMapping to specify which sources to include. There does not seem to be a mapping that can filter sources based some include and exclude patterns, however. Is anyone working on such a SourceMapping, or should I make up my own?

Best regards,
Anders

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to