You get me wrong.

mvn install act as the same using Nexus or not, but Karaf won't get updated bundle if it's not present on the local repository (mvn deploy performed by another user). More over, dev:watch works only for SNAPSHOT by default (-SNAPSHOT is appended).

About Windows 7, maybe something is different. I have a VM with Windows 7 (on which I fixed the Karaf service wrapper ;)), I gonna make a try. It would be surprising that it works in a different way as we use JVM IO (no native code or so) to compare the last modification date (else it's a bug in the JVM that would be surprising around that ;)).

I keep you posted.

Regards
JB

On 11/10/2012 08:46 PM, Bengt Rodehav wrote:
Andreas and JB,

I'll look further into this when I'm back to work (that's where I have
Nexus). I'll temporarily disable Nexus by editing my settings.xml. That
will prove whether this is a Nexus problem or not.

However, JB, a "mvn install" works the same way regardless if you're
using Nexus or not. The artifact is installed in the local repo. In
order to publish to Nexus you do a "mvn deploy". But when retrieving an
artifact and Maven cannot find it in the local repo, it will ask Nexus.
Regarding snapshot versions (which this is), I think maven will download
snapshots from Nexus (or maven central) once every 24 h even if you have
a snapshot locally.

How does "update" work? Does it check if the bundle has been changed (by
looking at its size or modify time) or does it always update the bundle
regardless? I'm trying to figure out why "update" works but "dev:watch"
doesn't. It must be because the modify time is not correctly determined
- don't you agree?

Has any of you tried "dev:watch" on Windows 7? I know a lot of people
run Karaf on Linux and detecting a file's modify time might be different
on Windows than on Linux.

/Bengt


2012/11/10 Jean-Baptiste Onofré <[email protected] <mailto:[email protected]>>

    I think it could be related to Nexus.

    Maybe I get Bengt wrong but dev:watch only watch the local
    repository (.m2/repository) and compare the last modification date
    of the local location and the bundle location itself.

    So, if you do mvn install, it will work (as the bundle location is a
    MVN URL which can be found locally), whereas if someone else do a
    mvn deploy, and push the bundle on Nexus, Karaf won't see any change
    (as the local repository has not been updated).

    My 0.02€ (and I certainly missed what Benght means ;))

    Regards
    JB


    On 11/10/2012 10:00 AM, Andreas Pieber wrote:

        Since I can reproduce it anyhow locally it's kind of tricky...
        Looking
        at the code again I would say the only reason that it fails if
        update
        works is that you messed something up in your system (timestamps
        do not
        match). Would you mind attaching a remove debugger to your
        system and
        setting a breakpoint to
        org.apache.karaf.shell.dev.__watch.BundleWatcher
        line 85. The code there is really simple and you should see the
        problem
        within minutes then.

        Sorry for not being of any more help :-(

        Kind regards,
        Andreas


        On Sat, Nov 10, 2012 at 9:18 AM, Bengt Rodehav
        <[email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>> wrote:

             Good morning Andreas.

             I have a Nexus repository specified in my settings.xml -
        could that
             be a problem? However, doing an "update 97" works fine
        showing that
             the bundle location can be found. In this case the bundle
        resides in
             my local maven repo (not in Nexus).

             /Bengt

             Den 10 nov 2012 07:31 skrev "Andreas Pieber"
        <[email protected] <mailto:[email protected]>
             <mailto:[email protected] <mailto:[email protected]>>>:


                 Hey Bengt,

                 I've just checked again, but I can confirm that dev:watch
                 bascially does what it should do. How do you install your
                 bundles? Have you configured any alternative maven
        repositories?
                 Any other "unusual" settings?

                 Kind regards,
                 Andreas


                 On Fri, Nov 9, 2012 at 4:47 PM, Bengt Rodehav
        <[email protected] <mailto:[email protected]>
                 <mailto:[email protected] <mailto:[email protected]>>>
        wrote:

                     Thanks,

                     /Bengt


                     2012/11/9 Jean-Baptiste Onofré <[email protected]
        <mailto:[email protected]>
                     <mailto:[email protected] <mailto:[email protected]>>>


                         OK thanks for the update, I take a look just
        after your
                         other issue ;)

                         Regards
                         JB


                         On 11/09/2012 04:39 PM, Bengt Rodehav wrote:

                             I get the exact same results using Karaf 2.2.9.

                             /Bengt


                             2012/11/9 Jean-Baptiste Onofré
        <[email protected] <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>

                             <mailto:[email protected]
        <mailto:[email protected]>>>>


                                  It should be do "automatically".

                                  Could you test the same with Karaf 2.2.9 ?

                                  Regards
                                  JB


                                  On 11/09/2012 02:58 PM, Bengt Rodehav
        wrote:

                                      I tried "dev:watch *" but the
        bundle still
                             doesn't get updated.

                                      BTW do I need to execute "dev:watch
                             --start" or is it being done
                                      automatically after I've done
        "dev:watch 97"?

                                      /Bengt


                                      2012/11/9 Andreas Pieber
                             <[email protected]
        <mailto:[email protected]> <mailto:[email protected]
        <mailto:[email protected]>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
                             <mailto:[email protected]
        <mailto:[email protected]> <mailto:[email protected]
        <mailto:[email protected]>>

                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>>


                                           good question. Does a
        "dev:watch *"
                             works as expected?

                                           Kind regards,
                                           Andreas


                                           On Fri, Nov 9, 2012 at 9:40
        AM, Bengt
                             Rodehav
                                      <[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
                                           <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>> wrote:

                                               It looks like this in the
        log:

                                               /2012-11-09 09:34:21,416
        | DEBUG |
                             Thread-50        |

                                               BundleWatcher
                |

                               af.shell.dev.watch.______BundleWatcher
        81 | Bundle


                                      watcher thread
                                               started/
                                               /2012-11-09 09:34:21,416
        | DEBUG |
                             Thread-50        |
                                               configadmin
                | ?
                                                      ? | getProperties()/
                                               /2012-11-09 09:34:21,421
        | DEBUG |
                             lixDispatchQueue |
                                      framework
                                                                       | ?
                                             ?
                                               | FrameworkEvent PACKAGES
        REFRESHED -
                                      org.apache.felix.framework/
                                               /2012-11-09 09:34:22,421
        | DEBUG |
                             Thread-50        |
                                               configadmin
                | ?
                                                      ? | getProperties()/
                                               /2012-11-09 09:34:22,421
        | DEBUG |
                             lixDispatchQueue |
                                      framework
                                                                       | ?
                                             ?
                                               | FrameworkEvent PACKAGES
        REFRESHED -
                                      org.apache.felix.framework/
                                               /2012-11-09 09:34:23,421
        | DEBUG |
                             Thread-50        |
                                               configadmin
                | ?
                                                      ? | getProperties()/
                                               /2012-11-09 09:34:23,421
        | DEBUG |
                             lixDispatchQueue |
                                      framework
                                                                       | ?
                                             ?
                                               | FrameworkEvent PACKAGES
        REFRESHED -
                                      org.apache.felix.framework/


                                               Thus, every second the
        package
                                      org.apache.felix.framework seems
                                               to be refreshed. Nothing
        about
                             bundle 97 though. When I
                                      manually
                                               do an "update 97", the
        bundle is
                             refreshed properly.

                                               BTW, I'm running on
        Windows 7.

                                               /Bengt



                                               2012/11/9 [email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>
                                               <[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>>



                                                   Hi,

                                                   Do you have something
        in the log ?

                                                   Regards
                                                   JB

                                                   --
                                                   Jean-Baptiste Onofré
        [email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>
                             <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>
                             <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>


        http://blog.nanthrax.net
                                                   Talend -
        http://wwx.talend.com


                                                   ----- Reply message -----
                                                   From: "Bengt Rodehav"
                             <[email protected]
        <mailto:[email protected]> <mailto:[email protected]
        <mailto:[email protected]>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>

        <mailto:[email protected] <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>> <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>>>
                                                   To:
        <[email protected] <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>__>
                             <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>
                                      <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>__>__>__>

                                                   Subject: dev:watch
        problems
                                                   Date: Fri, Nov 9,
        2012 8:55 am


                                                   I'm trying to get the
                             dev:watch command to work but I
                                                   haven't succeeded
        yet. If I
                             want to watch the
                                      bundle with id
                                                   97, I do as follows:

                                                   dev:watch -i 1000
                                                   dev:watch 97
                                                   dev:watch --start

                                                   I could probably do
        all that
                             in one go but the
                                      above is for
                                                   clarity.

                                                   If I then rebuild (using
                             maven) the bundle with id 97 I
                                                   excpect that bundle to be
                             updated within
                                      approximately 1 s.
                                                   However, it never
        happens. If
                             I then do a "update
                                      97" then
                                                   it works.

                                                   The command
        "dev:watch --list"
                             shows the following:


                                                   /karaf@root>
        dev:watch --list/
                                                   /URL
                                             ID
                                      Bundle Name/
                                                   /
                                                   /
                                                   /97
                                              97
                                                   Service-Container ::
                             web-service-plugin/



                                                   What am I doing wrong?

                                                   I'm using Karaf 2.3.0.

                                                   /Bengt





                                  --
                                  Jean-Baptiste Onofré
        [email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>
                             <mailto:[email protected]
        <mailto:[email protected]>
                             <mailto:[email protected]
        <mailto:[email protected]>>>
        http://blog.nanthrax.net
                                  Talend - http://www.talend.com



                         --
                         Jean-Baptiste Onofré
        [email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>
        http://blog.nanthrax.net
                         Talend - http://www.talend.com





    --
    Jean-Baptiste Onofré
    [email protected] <mailto:[email protected]>
    http://blog.nanthrax.net
    Talend - http://www.talend.com



--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to