Hi Tim,
just to clarify (I'm not really used to maven yet):
If I want to define a dependency that is used by multiple sub modules,
then I MAY put this dependency in the root/parent pom. I also COULD put
this dependency in each of the sub module's poms which would have the
same effect as the aforementioned approach. I don't need to define the
dependecnies in both places.
Is this correct?
Regarding the running and reloading of applications in bndtools: I don't
use Eclipse, therefore I asked if there are maven commands that mimc
bndtools' behavior ;)
Kind regards,
Thomas
------ Originalnachricht ------
Von: "Tim Ward" <tim.w...@paremus.com>
An: "Thomas Driessen" <thomas.driessen...@gmail.com>; "OSGi Developer
Mail List" <osgi-dev@mail.osgi.org>
Gesendet: 31.01.2019 16:48:54
Betreff: Re: [osgi-dev] Move from bnd workspace to maven (enroute)
workspace
Hi
On 31 Jan 2019, at 15:22, Thomas Driessen via osgi-dev
<osgi-dev@mail.osgi.org> wrote:
Hi,
I'm currently trying to get used to the new enroute maven workspace
layout and now have some questions :)
1)
In a bnd workspace I had the central.xml file where I put all the
dependencies I wanted in my local maven bnd worspace repository. Where
do I put those dependencies now in the maven project workspace? In the
dependencies section of the root pom or rather in the dependencies
section of a specific module pom?
In this case you treat your dependencies just like you would in Maven.
If the dependency is used across many modules then you might add it to
the dependencyManagement section of the parent pom (to manage the
version in a single place), but you will always reference a dependency
in the module using it. There is nothing special about this (it really
is just vanilla Maven).
2)
In a bnd workspace I added the buildtime dependencies of a bundle to
its bnd file. What's the best practice now in a maven workspace? Do I
add those build time dependencies in the module pom?
Again, this is a normal Maven build that follows the same rules as all
the Maven examples you can find on the internet. Your module’s compile
time and runtime dependencies should be included in its pom, with the
appropriate scope.
3)
In Eclipse with bndtools installed and when using a bnd workspace
layout I am able to press the debug button of a bndrun file and
everything is perfectly integrated in the IDE. Additionally, when I
change code of bundles that are currently running in an osgi
framework, then those are rebuilt and redeployed on the fly.
If you do the same thing in your enRoute workspace you’ll get the same
behaviour.
Is there a way to reproduce a similar behavior only with maven
commands and a remote debugger?
You can start your application with remote debug enabled (just using
the normal JVM debug arguments as you describe below) but I would
recommend that you just do the same launching that you’ve been doing
from a bad workspace.
Right now I'm following the enroute tutorial and every time I changed
something in the code I type the following commands:
1 mvn -pl app -am bnd-indexer:index bnd-indexer:index@test-index
bnd-resolver:resolve package
2 java -jar -Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
.\app\target\app.jar
3 Then I start my remote debugger to attach to the jvm
Are there other maven commands that would me allow to skip step 2 and
3? Something like mvn jetty:run for web apps?
There isn’t a Maven command for it, but if you look at the Eclipse
version of the Running the Application
<https://enroute.osgi.org/tutorial/020-tutorial_qs.html#running-the-application>
section in the enRoute tutorials you can see how to run inside the IDE.
Best Regards,
Tim
Kind regards,
Thomas
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev