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 <mailto:osgi-dev@mail.osgi.org> > https://mail.osgi.org/mailman/listinfo/osgi-dev > <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