On 22/01/2008, Flo <[EMAIL PROTECTED]> wrote:
>
>
> Hi Stuart,
>
> thanks for your clarifications. It seems that there were more gaps to
> fill than I expected .-)
>
> Just one more thing: I'd love to have a look at the weather-dao and
> weather-service bundles that you mentioned and which I've 'seen being
> installed' in the screenshot on the aforementioned web page.
Hi Flo,
the weather bundles are downloaded from the Spring-DM snapshots repository
added earlier on in the example - the source for these bundles is available
from
the Spring-DM source tree (under the samples/weather directory)
However on my machine they do not show up!? I see them defined as
> 'dependencies' in the pom.xml in the 'provision' directory but they do
> not seem to be pulled from the repository.
do you mean the source is not in the project? if so then that is correct -
when
you import a bundle with "pax-import-bundle" you are telling Pax-Construct
to
provision this binary along with locally built bundles, not to add the
source
this is because you don't need the source to deploy them and there's no real
point in compiling them locally when the binary bundle is already available
however, if you use "mvn install pax:eclipse -DdownloadSources" then you
will
be able to load the binary project into Eclipse (use "import existing
project..."
and point it to the project folder) and this will have sources attached if
they've
been uploaded...
you should find the weather bundles are being deployed during
"pax:provision"
if not then check the Spring-DM snapshot repository listed in the example
has
been added to the top-level pom
When I try to copy them
> into the directory tree from the 'samples' directory of the release
> candidate I get problems with maven. What I did is the following:
yes, this won't work because the Spring-DM samples directory assumes it will
be
built as part of the Spring-DM tree - so you can't simply rip it out and
attach it to
a different project structure as there will probably be missing
properties/settings
you'll also pollute the current project with various plugin settings from
Spring-DM
that will conflict with expectations in Pax-Construct (for example the
default setup
for the bundleplugin)
1. Copy the 'samples' directory from the RC2 (can that cause
> incompatibility iussues?) in the root directory of the project.
> 2. Remove the 'simple-sample' and the 'petclinic' directories and
> their <module> entries from the parent pom in the 'samples' directory
> 3. Add the 'samples' module to the main pom in the root directory
> 4. When I run 'mvn clean install pax:eclipse -DdownloadSources' I get
> a build failure 'Required goal not found: org.apache.felix:maven-
> bundle-plugin:install'
> 5. When I run 'mvn pax:provision' I get a build failure 'Unable to
> find release version for org.ops4j.pax.runner:pax-runner:pom:RELEASE'
>
> What am I doing wrong?
you're mixing pieces of different maven projects - which will cause all
sorts of
confusion (it's like sticking pieces of source code together without
checking
what inputs they expect and what outputs they produce)
basically, don't expect to see source or pom.xml files for imported bundles
instead use "mvn install pax:eclipse -DdownloadSources" to attach source
to the generated Eclipse project (again this won't add the source locally,
it
will just let Eclipse search and view the source code attachment)
when the source hasn't been uploaded to the maven repo then you'll need
to go to the relevant project website and browse the source there
While we're on that subject: In which case
> should I put a dependency in the pom.xml under 'provision' and when
> should I copy the bundle in the root directory f(or instance in case
> of the 'weather' or 'simple-service' examples)?
if you need to deploy an externally supplied bundle along with your locally
built bundles then use "pax-import-bundle" or edit the provision pom.xml
if you want to rebuild an externally supplied bundle then there's 2 options:
1) create a new skeleton bundle project using "pax-create-bundle"
ie. remove the example source and drop in the external source
- you'll probably also need to tweak the instructions in osgi.bnd
to match the ones from the external project, if it uses bnd
( the key thing is to keep the generated Pax-Construct pom )
2) rebuild the external bundle using the external source tree, ie.
separately to your Pax-Construct project - you should pick up
the updated bundle when you next do "mvn pax:provision:"
Thanks again for your help. Before I really get started with porting
> my project to Spring DM I want to make sure I get the basics (I'm
> aware though that I'm rather asking questions about the pax tools and
> not Spring DM itself...)
true - it may be better to move this thread to [email protected] :)
Cheers
> Flo
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "Spring and OSGi" group.
> To post to this group, send email to [EMAIL PROTECTED]
> To unsubscribe from this group, send email to
> [EMAIL PROTECTED]
> For more options, visit this group at
> http://groups.google.com/group/spring-osgi?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>
--
Cheers, Stuart
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general