Re: Refactor samples to use the maven jbi plugin
I have checked in the change to the SU packaging MOJO so that all the libraries are bundled under lib, there was a problem with the servicemix-components pom.xml since servicemix-core was not marked scope provided so I changed that - however since the SU uses classes from servicemix-core I had to add it as provided to that pom.xml. Leaving it as was caused the problems whereby the packaging always included servicemix-core and its deps in the SU lib directory. P On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: Done. In samples/loan-broker. Currently, the problem is that the dependent jar servicemix-components which is referenced in the pom for the loan-broker-lw-su SU is not included in the SU. (Wether this particular one should be or nor is discussed in another thread, so ...) -- Cheers, Guillaume Nodet On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > Sounds good :) > > P > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > > > Probably need to modify the GenerateServiceUnitMojo so that it > > contains > > > > logic similar to teh GenerateComponentMojo. Though we'll need to > > filter > > > > out > > > > the jbi-component so it does end up bundled. > > > > > > > > I can take a look now if you like > > > > > > > > Btw, I have an example ready to fix. > > I can check it in if you need. > > > > That would be great :) > > > > > > P > > > > > > > > On 8/1/06, Guillaume Nodet < [EMAIL PROTECTED]> wrote: > > > > > > > > > > I've just seen a problem though. > > > > > I though the maven-jbi-plugin would embed jar dependencies in the > > > > service > > > > > unit, but it does not seem to be the case. > > > > > > > > > > Let's say I have a multiproject build containing a jar, a SU and a > > SA. > > > > > If the code inside the SU depends on the jar, I would want the jbi > > > > plugin > > > > > to > > > > > automatically bundle it in the SU. We do not need to generate the > > > > > classpath > > > > > tag > > > > > in the xbean.xml, but the jar would be bundled along with the > > classes > > > > in > > > > > the > > > > > SU. > > > > > > > > > > Any thoughts on how to do that ? > > > > > > > > > > -- > > > > > Cheers, > > > > > Guillaume Nodet > > > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Sounds great! > > > > > > > > > > > > P > > > > > > > > > > > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > Based on some earlier discussions, I will start to refactor > some > > > > of > > > > > the > > > > > > > samples > > > > > > > that use standard JBI components to use the maven jbi plugin > > > > instead > > > > > of > > > > > > an > > > > > > > ant > > > > > > > based build file. > > > > > > > This will allow: > > > > > > >* testing the samples as part of the build > > > > > > >* demonstrate the use of the jbi plugin > > > > > > > > > > > > > > Note that the samples will be moved to the trunk/samples dir > and > > > > the > > > > > > > source > > > > > > > distribution > > > > > > > of these artifacts will be included in the main distribution. > > > > > > > > > > > > > > -- > > > > > > > Cheers, > > > > > > > Guillaume Nodet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Guillaume Nodet > > > > > > > > > > > -- > > Cheers, > > Guillaume Nodet > > > > > >
Re: Refactor samples to use the maven jbi plugin
The manve tooling now does all the packaging for SA and SU's : see http://www.servicemix.org/site/working-with-service-units.html http://www.servicemix.org/site/working-with-service-assemblies.html The problem with the xbean classpath has been discussed a little, and I think we are trying to work out whether it would be best placed in ServiceMix or in XBean. P On 8/2/06, Ramon Buckland <[EMAIL PROTECTED]> wrote: Guillaume Nodet wrote: > I've just seen a problem though. > I though the maven-jbi-plugin would embed jar dependencies in the service > unit, but it does not seem to be the case. > > Let's say I have a multiproject build containing a jar, a SU and a SA. > If the code inside the SU depends on the jar, I would want the jbi > plugin to > automatically bundle it in the SU. We do not need to generate the > classpath > tag > in the xbean.xml, but the jar would be bundled along with the classes > in the > SU. Why would the classpath entry not need to be generated in the xbean.xml ? (is there a smoke and mirrors approach to getting the su to load jars it contains ?) > Any thoughts on how to do that ? > When we started our build project back in May, the SU "jar" bundling was a tricky one and brief looks at the tooling, we decided to use the assembly plugin from Maven. So a quick hack and we create a ZIP mojo Essentially, the goal for installing an SU fires the assembly which dumps all the necessary jars into the the defined target/somedir/lib along with the other src/main/resources then zips it all. This zip is then the artifact. The SA is just a repeat lather rinse of above, expecting the SU is a ZIP as the artifact. We later worked out this is all probably doable using the assembly plugin. The only problem we have is that the xbean/servicemix files in the SUs need to be hand carved to define their individual classpaths, causing very sometimes stressful class loading issues. Does something in tooling now bundle everything that is required as above .. ie create a somepackage-version-su.zip '--xbean.xml # from a template (adding the lib/jar.jar entries) '--lib/jar.jar '--lib/jar2.jar and then bundle this into an SA ? It looks like tooling/jbi-maven-plugin gets there, but doesn't add the classpath entries. (which would be SM specific, so perhaps needing a "servicemix-su" type ??) r.
Re: Refactor samples to use the maven jbi plugin
Guillaume Nodet wrote: I've just seen a problem though. I though the maven-jbi-plugin would embed jar dependencies in the service unit, but it does not seem to be the case. Let's say I have a multiproject build containing a jar, a SU and a SA. If the code inside the SU depends on the jar, I would want the jbi plugin to automatically bundle it in the SU. We do not need to generate the classpath tag in the xbean.xml, but the jar would be bundled along with the classes in the SU. Why would the classpath entry not need to be generated in the xbean.xml ? (is there a smoke and mirrors approach to getting the su to load jars it contains ?) Any thoughts on how to do that ? When we started our build project back in May, the SU "jar" bundling was a tricky one and brief looks at the tooling, we decided to use the assembly plugin from Maven. So a quick hack and we create a ZIP mojo Essentially, the goal for installing an SU fires the assembly which dumps all the necessary jars into the the defined target/somedir/lib along with the other src/main/resources then zips it all. This zip is then the artifact. The SA is just a repeat lather rinse of above, expecting the SU is a ZIP as the artifact. We later worked out this is all probably doable using the assembly plugin. The only problem we have is that the xbean/servicemix files in the SUs need to be hand carved to define their individual classpaths, causing very sometimes stressful class loading issues. Does something in tooling now bundle everything that is required as above .. ie create a somepackage-version-su.zip '--xbean.xml # from a template (adding the lib/jar.jar entries) '--lib/jar.jar '--lib/jar2.jar and then bundle this into an SA ? It looks like tooling/jbi-maven-plugin gets there, but doesn't add the classpath entries. (which would be SM specific, so perhaps needing a "servicemix-su" type ??) r.
Re: Refactor samples to use the maven jbi plugin
Do you have an example, I'm not sure to understand. Are you talking about a SU that depends on another SU ? Well, elements in a SU can have dependencies on both component libraries and normal java libraries. SAs may contain SUs that have dependencies upon different versions of these libraries. The classic example is during an ongoing business migration scenario. Step one is to roll out an integration solution for the existing legacy system using JBI. Then you build a new solution to replace the existing one and start to roll it out over a period of months to all the locations. Eventually you have upgraded all your sites and you can decommission the legacy system. In the intervening time, you have new and old systems running in parallel. If the cutover period is long enough, you may be rolling out v1.1 patches to new systems, whilst installing v1.0 code elsewhere and still maintaining legacy code. If ServiceMix is forming the integration layer then you will want to be able to deploy SUs for new solutions that can use later versions of dependent libraries without having any impact on previously implemented solutions on earlier dependencies. It's similar to the issues involved in maintaining XML Schema versions for interface specifications. Terry
Re: Refactor samples to use the maven jbi plugin
thanks P On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: Done. In samples/loan-broker. Currently, the problem is that the dependent jar servicemix-components which is referenced in the pom for the loan-broker-lw-su SU is not included in the SU. (Wether this particular one should be or nor is discussed in another thread, so ...) -- Cheers, Guillaume Nodet On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > Sounds good :) > > P > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > > > Probably need to modify the GenerateServiceUnitMojo so that it > > contains > > > > logic similar to teh GenerateComponentMojo. Though we'll need to > > filter > > > > out > > > > the jbi-component so it does end up bundled. > > > > > > > > I can take a look now if you like > > > > > > > > Btw, I have an example ready to fix. > > I can check it in if you need. > > > > That would be great :) > > > > > > P > > > > > > > > On 8/1/06, Guillaume Nodet < [EMAIL PROTECTED]> wrote: > > > > > > > > > > I've just seen a problem though. > > > > > I though the maven-jbi-plugin would embed jar dependencies in the > > > > service > > > > > unit, but it does not seem to be the case. > > > > > > > > > > Let's say I have a multiproject build containing a jar, a SU and a > > SA. > > > > > If the code inside the SU depends on the jar, I would want the jbi > > > > plugin > > > > > to > > > > > automatically bundle it in the SU. We do not need to generate the > > > > > classpath > > > > > tag > > > > > in the xbean.xml, but the jar would be bundled along with the > > classes > > > > in > > > > > the > > > > > SU. > > > > > > > > > > Any thoughts on how to do that ? > > > > > > > > > > -- > > > > > Cheers, > > > > > Guillaume Nodet > > > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Sounds great! > > > > > > > > > > > > P > > > > > > > > > > > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > Based on some earlier discussions, I will start to refactor > some > > > > of > > > > > the > > > > > > > samples > > > > > > > that use standard JBI components to use the maven jbi plugin > > > > instead > > > > > of > > > > > > an > > > > > > > ant > > > > > > > based build file. > > > > > > > This will allow: > > > > > > >* testing the samples as part of the build > > > > > > >* demonstrate the use of the jbi plugin > > > > > > > > > > > > > > Note that the samples will be moved to the trunk/samples dir > and > > > > the > > > > > > > source > > > > > > > distribution > > > > > > > of these artifacts will be included in the main distribution. > > > > > > > > > > > > > > -- > > > > > > > Cheers, > > > > > > > Guillaume Nodet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Guillaume Nodet > > > > > > > > > > > -- > > Cheers, > > Guillaume Nodet > > > > > >
Re: Refactor samples to use the maven jbi plugin
Done. In samples/loan-broker. Currently, the problem is that the dependent jar servicemix-components which is referenced in the pom for the loan-broker-lw-su SU is not included in the SU. (Wether this particular one should be or nor is discussed in another thread, so ...) -- Cheers, Guillaume Nodet On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: Sounds good :) P On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > Probably need to modify the GenerateServiceUnitMojo so that it > contains > > > logic similar to teh GenerateComponentMojo. Though we'll need to > filter > > > out > > > the jbi-component so it does end up bundled. > > > > > > I can take a look now if you like > > > > > Btw, I have an example ready to fix. > I can check it in if you need. > > That would be great :) > > > > P > > > > > > On 8/1/06, Guillaume Nodet < [EMAIL PROTECTED]> wrote: > > > > > > > > I've just seen a problem though. > > > > I though the maven-jbi-plugin would embed jar dependencies in the > > > service > > > > unit, but it does not seem to be the case. > > > > > > > > Let's say I have a multiproject build containing a jar, a SU and a > SA. > > > > If the code inside the SU depends on the jar, I would want the jbi > > > plugin > > > > to > > > > automatically bundle it in the SU. We do not need to generate the > > > > classpath > > > > tag > > > > in the xbean.xml, but the jar would be bundled along with the > classes > > > in > > > > the > > > > SU. > > > > > > > > Any thoughts on how to do that ? > > > > > > > > -- > > > > Cheers, > > > > Guillaume Nodet > > > > > > > > On 8/1/06, Philip Dodds <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Sounds great! > > > > > > > > > > P > > > > > > > > > > On 8/1/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Based on some earlier discussions, I will start to refactor some > > > of > > > > the > > > > > > samples > > > > > > that use standard JBI components to use the maven jbi plugin > > > instead > > > > of > > > > > an > > > > > > ant > > > > > > based build file. > > > > > > This will allow: > > > > > >* testing the samples as part of the build > > > > > >* demonstrate the use of the jbi plugin > > > > > > > > > > > > Note that the samples will be moved to the trunk/samples dir and > > > the > > > > > > source > > > > > > distribution > > > > > > of these artifacts will be included in the main distribution. > > > > > > > > > > > > -- > > > > > > Cheers, > > > > > > Guillaume Nodet > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > Cheers, > > Guillaume Nodet > > > > > > -- > Cheers, > Guillaume Nodet > >