There is something else I would like to suggest.

Let's say I have a service-unit artifact and my target component does not
have a serviceUnitAnalyzer, I've seen the logic on the jbi-maven-plugin and
how it uses the serviceUnitAnalyzer and I noticed that it either uses that
jbi-services.xml file or looks up the target component for a
serviceUnitAnalyzer class name.
What if we also have a <serviceUnitAnalyzerClass></serviceUnitAnalyzerClass>
declared in that service-unit artifact (not the component) where I can
specify my desired serviceUnitAnalyzer for that SU. Example:

<project .....
<artifactId>myproject</artifactId>
<packaging>jbi-service-unit</packaging>
<build>
 <plugins>
    <plugin>
               <groupId>org.apache.servicemix.tooling</groupId>
               <artifactId>jbi-maven-plugin</artifactId>
               <version>${servicemix-version}</version>
               <configuration>
<serviceUnitAnalyzerClass>org.test.jbi.bean.BeanServiceUnitAnalyzer
</serviceUnitAnalyzerClass>
               </configuration>
    </plugin>
 </plugins>
</build>

Notice that the <serviceUnitAnalyzerClass> is in the SU's configuration and
not the component, this way the desired serviceUnitAnalyzer is not tied to
the component but to the plugin's configuration (And also keeping the
current approach).


Then in the
org.apache.servicemix.maven.plugin.jbi.GenerateServiceUnitDescriptorMojoclass
add a String field called 'serviceUnitAnalyzerClass' and insert this
where it finds the serviceUnitAnalyzer class:

               if (useServiceUnitAnalyzer.booleanValue()) {
+            if (serviceUnitAnalyzerClass!= null)
+                return serviceUnitAnalyzerClass;
                       MavenProject project = getComponentProject();


Does this makes sense?



Eduardo Burgos


On 5/22/07, Guillaume Nodet <[EMAIL PROTECTED]> wrote:

Yeah, it's missing.
Feel free to attach one to a JIRA :-)

On 5/23/07, Eduardo Burgos <[EMAIL PROTECTED]> wrote:
>
> Is there a ServiceUnitAnalyzer for this component? if not, can I provide
> one?
>
> Eduardo Burgos
>



--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to