Getting bndtools/Eclipse to do less?

80 views
Skip to first unread message

Mark Raynsford

unread,
Mar 23, 2018, 9:26:00 AM3/23/18
to bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello.

I've been using Intellij IDEA for quite a while now. My requirements
are pretty simple: All OSGi configuration is done in my pom.xml via the
maven-bundle-plugin. In IDEA, this works well enough: The IDE picks up
the necessary bundle configuration information from the plugin's
configuration, and every time I click "Build" in the IDE, a new bundle
is produced with the right manifest and is copied to an output
directory that I specify. It's very important to me that the pom.xml is
the sole source for all configuration details. All production builds
are produced from Maven but, during development, I'm fine with the
IDE producing short-lived bundles for testing.

The problem: The version of bnd shipping with the current version of
IDEA is ancient (it's something like 3.0.*). It can't cope with Java 9
bytecode. It can't be upgraded (it's embedded into the osmorc OSGi
plugin).

I'm looking at moving back to Eclipse after years of being away from
it, but it seems like the bndtools plugin from the marketplace does
*way* more than I need and seems to require me to use bnd.bnd
configuration files (which violates my rule of having all configuration
data in the pom.xml file).

Is it possible to get Eclipse to read configuration data from the
pom.xml, and then use a modern version of bnd to produce a bundle.jar
file (and copy it to a target output directory) in one step each time
I edit/recompile? I don't need any of the features of the bndtools
plugin except for actually producing bundles.

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUAUAAKCRBcGntxKBLM
BcZVAP0WuuyCG6U+enotlHsmUI+YYO5Ol5p71NF5c7NvjEtT8AEAi28bSt78sQVT
r5SMAxqCsu45/UnwarLKava+yoK8MQc=
=w5o3
-----END PGP SIGNATURE-----

Mark Raynsford

unread,
Mar 23, 2018, 9:50:09 AM3/23/18
to bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-03-23T13:25:36 +0000
"'Mark Raynsford' via bndtools-users" <bndtool...@googlegroups.com>
wrote:
> All production builds
> are produced from Maven but, during development, I'm fine with the
> IDE producing short-lived bundles for testing.

Small thing I forgot to mention: The reason I don't just have the IDE
run Maven is because a Maven build takes ~20 seconds or so, whilst
building from the IDE takes around a second (whether in IDEA or
Eclipse).

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUGAwAKCRBcGntxKBLM
Ba3CAQCaE+bXebQ1OMTPXGjYgc3ZMIbIGZLBOrBCPsNLbYUSwAD+Nf3ryzRRyQG7
sgA09odkZ+viLRTsTmkq5pzeiIuJGwk=
=Kzkr
-----END PGP SIGNATURE-----

Tim Ward

unread,
Mar 23, 2018, 9:54:37 AM3/23/18
to bndtool...@googlegroups.com
Hi, 

It sounds like you want to use Bnd with Maven, which is fine. There are a bunch of bnd-based maven plugins that will help you:

  • bnd-maven-plugin
  • bnd-indexer-maven-plugin
  • bnd-resolver-maven-plugin
  • bnd-export-maven-plugin
  • bnd-testing-maven-plugin

Modern versions of Bndtools (3.5 and above) support Maven pretty well, and will offer you lots of help when using these in Eclipse (including incremental build), but you can also just use them in IntelliJ.

I hope this helps,

Tim

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Raynsford

unread,
Mar 23, 2018, 10:23:43 AM3/23/18
to Tim Ward, bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-03-23T09:54:27 -0400
Tim Ward <tim....@paremus.com> wrote:

> Hi,
>
> It sounds like you want to use Bnd with Maven, which is fine. There are a bunch of bnd-based maven plugins that will help you:
>

Ah, so it's just a matter of using the bnd-* Maven plugins instead of
the Felix maven-bundle-plugin? I made the rather arbitrary decision to
use the Felix plugin years back and never re-evaluated that decision.

I'll give the bnd-* plugins a shot! Thanks.

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUN4QAKCRBcGntxKBLM
Bbd4AP46+amR65ZZImvIj3T2RtrQNir99j9wvDoD3EwM4kwqPwEA2oxquk0Zm+AH
3l+HvJjSjyt70Iv30hCdARrBLmm3AA4=
=Zz/r
-----END PGP SIGNATURE-----

Mark Raynsford

unread,
Mar 23, 2018, 11:14:25 AM3/23/18
to bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

'Lo.

I've put together a trivial project to try out the bnd-* maven plugins
in Eclipse:

https://github.com/io7m/osgitest0-20180323

If I:

1. Open this project in a fresh Eclipse instance
2. Add a bndtools project nature
3. Remove the created bnd.bnd file (because I'm using a <bnd> element
in my pom.xml file)
4. Ensure that "Build automatically" is enabled
5. Edit a Java file and then save

Eclipse goes into what appears to be an infinite loop of rebuilding the
code. The UI still responds and so on, but it seems to be endlessly
retriggering the same build task over and over. Turning off "Build
automatically" stops it happening, but I'd prefer to have that enabled
for other reasons.

Is this a known issue? Is there a workaround?

- - --
Mark Raynsford | http://www.io7m.com

- -----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUXywAKCRBcGntxKBLM
BbvTAQChJsUYlM88NUSxuhu+BniRo/VQush6nSfvDl7YmdQKrwEA0twAr2C00UfL
+80ioJfaXzEjrJOh3TFTN/dsZ8M23wM=
=he3k
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUZzQAKCRBcGntxKBLM
BaKOAQDtz6Hltwl23s0la/VYKbAkbVRh6Wazsijpl3XWT6NIsAEA/041x/XMG6kq
9r7NA3/KnApLQLlrIMoIvS/jbBjolgs=
=RL32
-----END PGP SIGNATURE-----

BJ Hargrave

unread,
Mar 23, 2018, 11:18:10 AM3/23/18
to bndtool...@googlegroups.com
You don't want the bndtools nature for a maven project. It is a maven project not a Bnd Workspace project (no cnf folder).

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
BJ

Tim Ward

unread,
Mar 23, 2018, 11:18:39 AM3/23/18
to bndtool...@googlegroups.com
If you are using Maven then you should not be adding the bndtools nature to the project. The bndtools nature is used to indicate that bnd should be in control of the build, whereas when you’re using Maven you want m2e to be in control.

In general you want to treat your projects as vanilla maven projects. Bndtools will discover that you’re using the bnd plugins and “help” m2e to do the right thing.

Tim

BJ Hargrave

unread,
Mar 23, 2018, 11:20:36 AM3/23/18
to bndtool...@googlegroups.com
And make sure you have installed the bndtools.m2e feature which is separate from the main bndtools feature. :-)
--
BJ

Mark Raynsford

unread,
Mar 23, 2018, 11:24:48 AM3/23/18
to BJ Hargrave, Tim Ward, bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-03-23T15:17:57 +0000
BJ Hargrave <b...@bjhargrave.com> wrote:
>
> You don't want the bndtools nature for a maven project. It is a maven
> project not a Bnd Workspace project (no cnf folder).
>
> And make sure you have installed the bndtools.m2e feature which is separate
> from the main bndtools feature. :-)

On 2018-03-23T11:18:34 -0400
Tim Ward <tim....@paremus.com> wrote:
>
> If you are using Maven then you should not be adding the bndtools nature to the project. The bndtools nature is used to indicate that bnd should be in control of the build, whereas when you’re using Maven you want m2e to be in control.
>
> In general you want to treat your projects as vanilla maven projects. Bndtools will discover that you’re using the bnd plugins and “help” m2e to do the right thing.

Got it, thank you!

This is working incredibly well. Definitely the quickest
modify/compile/refresh workflow I've seen to date.

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrUcPQAKCRBcGntxKBLM
BfFMAP0Qe2qYx6QpYqHMExiVvO/TOD0/gaRkzCG1u70OwntTKgEAi/Q+LzdDRxhF
L7NTsBwShUtcJJCZU6ygVr2cVE0Q0Ac=
=vufZ
-----END PGP SIGNATURE-----

Mark Raynsford

unread,
Mar 26, 2018, 1:19:33 PM3/26/18
to bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-03-23T15:24:44 +0000
"'Mark Raynsford' via bndtools-users" <bndtool...@googlegroups.com>
wrote:

> Got it, thank you!
>
> This is working incredibly well. Definitely the quickest
> modify/compile/refresh workflow I've seen to date.

I notice that we seem to be in the rather awkward situation that
Intellij IDEA will pick up the correct settings when using the Felix
maven-bundle-plugin, but won't when using the bnd-maven-plugin. Eclipse
will pick up the right settings when using the bnd-maven-plugin but not
when using the maven-bundle-plugin.

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrkrlwAKCRBcGntxKBLM
BYIpAP4z7i71u7qht62ewrlSFpTxrtkig+Hk2BuZTtEF7BnUZwD8CGpl89Fp9MX+
m7i6Kjs8+kdhHXwcWEiSiTRaPus5Ig8=
=1H4c
-----END PGP SIGNATURE-----

BJ Hargrave

unread,
Mar 26, 2018, 3:08:51 PM3/26/18
to bndtool...@googlegroups.com
Can you be more specific? I am unclear what you mean by "pick up the right settings". What settings and picked up by whom?

Obviously Bndtools and bnd-maven-plugin come from the same team (us). IDEA's integration comes from ? and maven-bnd-plugin is from Apache.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
BJ

Mark Raynsford

unread,
Mar 26, 2018, 3:47:41 PM3/26/18
to BJ Hargrave, bndtool...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2018-03-26T19:08:39 +0000
BJ Hargrave <b...@bjhargrave.com> wrote:

> Can you be more specific? I am unclear what you mean by "pick up the right
> settings". What settings and picked up by whom?
>
> Obviously Bndtools and bnd-maven-plugin come from the same team (us).
> IDEA's integration comes from ? and maven-bnd-plugin is from Apache.
>

'Ello.

Sorry, I assumed it was clear from the context of the preceding posts.
What I mean is:

I want to use Maven as the canonical source of information for
producing OSGi bundles and the like. However, I want to use an IDE to
build bundles just during development for quick testing. This implies
that the IDE needs to be able to read the various bundle manifest
settings from the Maven pom.xml in order to produce working bundles
when I click "build" (and use the IDE's internal build tool). The
reason I use the IDE's internal build tools is simply that running a
Maven build can take ~30 seconds, whereas the IDE internal builds
typically take less than a second. It's quicker.

The OSGi support in Intellij IDEA is provided by a JetBrains-provided
plugin called Osmorc. It's not very highly regarded as it's pretty bare
bones and it includes a very much out-of-date version of bnd internally
that can't handle Java 9 bytecode. Osmorc is capable of reading the
configuration information used by the Apache maven-bundle-plugin in
order to produce roughly equivalent bundles when using the IDE's
built-in "build" tool. It seems that it isn't capable of reading the
configuration information from the pom.xml if I use bnd-maven-plugin
instead (it appears to have explicit support for maven-bundle-plugin
but not bnd-maven-plugin).

The OSGi support in Eclipse is provided by Bndtools, as you know. My
original message to the list was asking how to get Eclipse to pick up
the bundle configuration data from the maven-bundle-plugin
configuration in my pom.xml. Tim suggested that I instead use the
bnd-maven-plugin. I did that, Eclipse picked up the configuration data
from the pom.xml, everything worked.

The problem here is that I obviously can't use both plugins. I need
to pick one, and my choice dictates what IDE people can use to work on
the project because neither IDE appears to support reading bundle
configurations from both plugins.

If I'm wrong on any of this, I'm happy (eager) to be corrected.

- --
Mark Raynsford | http://www.io7m.com

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWrlOSQAKCRBcGntxKBLM
BcXeAQDinslK5GCyy0oShRyhtQEy03C6E+N+3FDPpI+slXjNvwD/dTnljnSQQHj2
xDGla3KHIBRJsKGKeRkB83FKiGsJgg4=
=2Tba
-----END PGP SIGNATURE-----

Mark Raynsford

unread,
Mar 27, 2018, 6:21:47 AM3/27/18
to bndtool...@googlegroups.com
On 2018-03-26T19:47:21 +0000
"'Mark Raynsford' via bndtools-users" <bndtool...@googlegroups.com>
wrote:
>
> The problem here is that I obviously can't use both plugins. I need
> to pick one, and my choice dictates what IDE people can use to work on
> the project because neither IDE appears to support reading bundle
> configurations from both plugins.

I feel like these are the available options:

1. Use maven-bundle-plugin everywhere and update the Bndtools Eclipse
plugin to be able to read configuration data from the
maven-bundle-plugin executions in Maven.

2. Use bnd-maven-plugin everywhere and somehow persuade JetBrains to
update Osmorc to be able to read configuration data from the
bnd-maven-plugin executions in the Maven pom. That, or create an
Osmorc fork that can do it. A fork would have the advantage that it'd
be possible to upgrade the plugin to a non-ancient version of bnd.

3. Use maven-bundle-plugin everywhere but update it to be able to read
bnd instructions from a bnd.bnd file. Both the Eclipse Bndtools
plugin and Osmorc should be able to read the bnd.bnd file and would
therefore essentially ignore whatever's in the pom.xml file. Maven
would read the bnd.bnd file during compilation, so Maven builds would
continue to work.

Does anyone know how other IDEs cope with this stuff? Anyone use
NetBeans?

Tim Ward

unread,
Mar 27, 2018, 8:21:51 AM3/27/18
to bndtool...@googlegroups.com


> On 27 Mar 2018, at 06:21, 'Mark Raynsford' via bndtools-users <bndtool...@googlegroups.com> wrote:
>
> On 2018-03-26T19:47:21 +0000
> "'Mark Raynsford' via bndtools-users" <bndtool...@googlegroups.com>
> wrote:
>>
>> The problem here is that I obviously can't use both plugins. I need
>> to pick one, and my choice dictates what IDE people can use to work on
>> the project because neither IDE appears to support reading bundle
>> configurations from both plugins.
>
> I feel like these are the available options:
>
> 1. Use maven-bundle-plugin everywhere and update the Bndtools Eclipse
> plugin to be able to read configuration data from the
> maven-bundle-plugin executions in Maven.

This is likely to be a non-starter. The bndtools team tried to do this several times and it just didn’t work. It sounds as though M2E works differently from Osmorc in that it doesn’t run alternative code to do the manifest generation, it actually runs the maven plugins. For the maven-bundle-plugin this slows things down a lot, and it prevents the incremental build from working correctly.

This was one of the drivers behind creating the bnd-maven-plugin, so that we would be able to get Eclipse integration.

>
> 2. Use bnd-maven-plugin everywhere and somehow persuade JetBrains to
> update Osmorc to be able to read configuration data from the
> bnd-maven-plugin executions in the Maven pom. That, or create an
> Osmorc fork that can do it. A fork would have the advantage that it'd
> be possible to upgrade the plugin to a non-ancient version of bnd.

Even better would be to get Osmorc to build with the bnd from the declared plugin, that way the project output would be the same between the IDE and CI builds. This is what Bndtools does in Eclipse

>
> 3. Use maven-bundle-plugin everywhere but update it to be able to read
> bnd instructions from a bnd.bnd file. Both the Eclipse Bndtools
> plugin and Osmorc should be able to read the bnd.bnd file and would
> therefore essentially ignore whatever's in the pom.xml file. Maven
> would read the bnd.bnd file during compilation, so Maven builds would
> continue to work.

As mentioned above, Bndtools/M2E doesn’t work in the same way that Osmorc does. It actually runs the maven plugins, and the maven-bundle-plugin doesn’t play well with the IDE build. We tried for quite a long time I’m not sure that there

>
> Does anyone know how other IDEs cope with this stuff? Anyone use
> NetBeans?

To the best of my knowledge NetBeans requires you to run the maven build to get an updated manifest in your bundle.

>
> --
> Mark Raynsford | http://www.io7m.com
>

BJ Hargrave

unread,
Mar 27, 2018, 8:34:07 AM3/27/18
to bndtool...@googlegroups.com
maven-bundle-plugin replaces the jar packaging step with its own bundle packaging step. This creates a number of issues which is why bnd-maven-plugin does not replace the jar packaging step. It runs between the compilation and the jar packaging to generate the manifest and otherwise manipulate the target/classes folder which the jar packaging then jars. It thus works better in most build scenarios and M2E.

Osmorc must have some deeper integration with maven-bundle-plugin if it understand the configuration of the plugin and effectively acts as its replacement during IDE builds. Of course this is limiting since it only supports a certain level of one maven plugin. The M2E strategy is must better for build fidelity with the real maven build and also is ready for the future by not attempting to substitute for a maven plugin.
--
BJ

Mark Raynsford

unread,
Apr 13, 2018, 11:55:14 AM4/13/18
to Tim Ward, bndtool...@googlegroups.com
I've been playing around with this again, because it suddenly occurred
to me that IDEA could be persuaded to read a bnd.bnd file in the
project rather than try to read settings from the Maven POM, and that
the bnd-maven-plugin could also read this file. This means that both the
IDE and the plugin would produce a bundle from the same source.

The problem: Putting everything in the bnd.bnd file means duplicating a
lot of things that are supposed to be declared in the Maven POM. Version
numbers, descriptions, etc.

Even if I could put something like:

Bundle-Version: ${project.version}

.. in the bnd.bnd file and have the bnd-maven-plugin expand the
property, IDEA wouldn't be able to do this as it doesn't run Maven in
any sense.

Peter Kriens

unread,
Apr 13, 2018, 2:05:22 PM4/13/18
to bndtool...@googlegroups.com
Mark,
You know IDEA runs bnd workspaces in the Ultimate edition? You can then build with Gradle.

Kind regards,

Peter Kriens

Mark Raynsford

unread,
Apr 13, 2018, 2:46:36 PM4/13/18
to Peter Kriens, bndtool...@googlegroups.com
On 2018-04-13T20:05:08 +0200
Peter Kriens <pkr...@gmail.com> wrote:

> Mark,
> You know IDEA runs bnd workspaces in the Ultimate edition? You can then build with Gradle.
>

The basic problem isn't that I can't have something that works. I can
use the bnd-maven-plugin and then get identical Maven and Eclipse
builds without issue. I can alternatively use the maven-bundle-plugin
and get identical Maven and IDEA builds. But I can't do both
(obviously), and the Maven plugin I pick then dictates which IDE other
people have to use to work on my code.

I strongly dislike Gradle for other reasons. :)

Peter Kriens

unread,
Apr 14, 2018, 8:57:20 AM4/14/18
to bndtool...@googlegroups.com
Yes, we’re an opinionated bunch :-)

That said, I don’t like Gradle either (although slightly better than Maven) but I actually don’t care that much. With the bndtools workspace model I never use it myself. It is only used on the CI server. The fidelity between Gradle and bndtools is so high that it just always works automatically. BJ’s work on the gradle plugin is so good that so far I’ve never had to debug a gradle plugin.

I think we’re currently in a place in history where many developers got very disappointed with IDE’s because of the fidelity problem between IDE and CI. I am really surprised by the renaissance of command line tools.

I actually think we’re pretty close to Nirvana with bndtools. (And got the customers to prove it.) Sadly, most developers do not give it a chance anymore because they assume they end up with the same shit as m2e or PDE. Command line first!

Although the CI is a precondition, I do notice that I spent 99.99% of my time in the IDE. And I do know that the fast continuous build in bndtools saves me countless hours every year.

Kind regards,

Peter Kriens






>
> --
> Mark Raynsford | http://www.io7m.com
>

Mark Raynsford

unread,
Apr 14, 2018, 2:51:35 PM4/14/18
to Peter Kriens, bndtool...@googlegroups.com
On 2018-04-14T14:56:46 +0200
Peter Kriens <pkr...@gmail.com> wrote:
>
> Yes, we’re an opinionated bunch :-)

It's just a basic design philosophy issue. I grab anyone's Maven
project, I run the same command for every project. It builds. I look at
the pom.xml, and I'm never surprised.

I grab anyone's Gradle project, I scour the documentation (if there is
any) for the command I'm supposed to run to build it. It inevitably
fails to build. I look at the build.gradle file, and it naturally looks
and behaves differently to each and every other Gradle project I've
seen. I've had a long and bloody history of experience with build
systems in several languages (I've developed several) and the same
appears to be true of all of them: Give developers a turing-complete
language to describe their builds and the result will be chaos.

You can pry my slightly ugly, slightly decrepit, declarative, XML-based,
non-turing-complete build tool out of my cold dead hands.

>
> That said, I don’t like Gradle either (although slightly better than Maven) but I actually don’t care that much. With the bndtools workspace model I never use it myself. It is only used on the CI server. The fidelity between Gradle and bndtools is so high that it just always works automatically. BJ’s work on the gradle plugin is so good that so far I’ve never had to debug a gradle plugin.
>
>
> I think we’re currently in a place in history where many developers got very disappointed with IDE’s because of the fidelity problem between IDE and CI. I am really surprised by the renaissance of command line tools.

The IDEs keep bundling ancient versions of everything and don't seem
to let me use my own. I was mildly excited to see that the internal,
unpatchable version of bnd that's included in IDEA was updated
recently... To a version that came out in 2015. SIGH.

> I actually think we’re pretty close to Nirvana with bndtools. (And got the customers to prove it.) Sadly, most developers do not give it a chance anymore because they assume they end up with the same shit as m2e or PDE. Command line first!
>
> Although the CI is a precondition, I do notice that I spent 99.99% of my time in the IDE. And I do know that the fast continuous build in bndtools saves me countless hours every year.

Yep. To be clear, my goal is and always has been to have Maven be the
canonical and authoritative source of builds that make up releases
that other people use. It's also for CI use, as you've said. Command
line first, exactly.

I do a lot more than just build the code from Maven, I also have
it execute Checkstyle (and fail the build if checks fail),
execute Spotbugs (and fail the build if checks fail), do dependency
analysis (find unused dependencies, find direct uses of "undeclared"
transitive dependencies, forbid snapshot dependencies, forbid
dependency conflicts), do semantic versioning analysis (previously using
japicmp, but I'm migrating to bnd-baseline-maven-plugin; once again,
failing the build if version numbers haven't incremented correctly), do
javadoc generation, do documentation compilation from a custom tool I
wrote, do web site generation, do onejar construction (for command-line
applications, typically), do source jar generation, do OSGi bundle
generation, do unit test execution, do unit test coverage harvesting,
do byte-for-byte reproducible jar stripping (via the
reproducible-build-maven-plugin), do PGP jar signing, and last but not
least, execute deployments to Maven Central. I also add various checks
that enforce a very strict and consistent POM and project style across
all projects.

All of this stuff is handled by a parent POM so that it's not
duplicated in each of the ~60 projects (and counting). The majority of
that stuff is outside of the scope of Bndtools.

However, none of this stuff is important to me when I'm in the process
of developing code. All that's important to me then is that I can click
"Run..." in an IDE and run the code that I've just written in less
than a second.

I can get that right now if I use bnd directly instead of Maven, but
then I'd be duplicating at least some of the configuration between bnd
and Maven, because I need Maven for all of the other stuff above and, as
I said, it's the authoritative source for project information. I can get
quick execution in Eclipse if I use bnd-maven-plugin, and I can get
quick execution in IDEA if I use the maven-bundle-plugin.

I have one last thing to try: I think I can persuade IDEA to use the
manifest file that the bnd-maven-plugin generates. It would mean that
I'd have to run a Maven compile each time I needed to regenerate the
manifest, but I can maybe live with that. If that works, I'd switch to
using bnd-maven-plugin everywhere.

Christian Schneider

unread,
Apr 15, 2018, 3:02:39 AM4/15/18
to bndtool...@googlegroups.com
Eclipse m2e now uses a maven API to let plugins take part in the incremental build.
This should allow intellij idea to do the same. 

The reason that this works with the bnd-maven-plugin is that it uses the API. 
See this for some more informations about the integration:
https://github.com/bndtools/bnd/issues/1180

So I think it may be worth asking intellij if they can support this API too.

Btw. I am currently working on an example that shows how to run and debug pax exam tests as conveniently as bnd based tests in a bnd workspace. 
The tests can reside in the same maven project as the code, do not require a maven call to be updated and can be run directly using eclipse 
run or debug (no explicit remote debugging). So basically you simply edit a file, save it and run debug.

I will annouce the example on this list once I am finished.

Christian

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
--
Christian Schneider

http://www.liquid-reality.de

Computer Scientist

Mark Raynsford

unread,
Apr 15, 2018, 5:27:17 AM4/15/18
to Christian Schneider, bndtool...@googlegroups.com
On 2018-04-15T09:02:36 +0200
Christian Schneider <ch...@die-schneider.net> wrote:

> Eclipse m2e now uses a maven API to let plugins take part in the
> incremental build.
> This should allow intellij idea to do the same.
>
> The reason that this works with the bnd-maven-plugin is that it uses the
> API.
> See this for some more informations about the integration:
> https://github.com/bndtools/bnd/issues/1180
>
> So I think it may be worth asking intellij if they can support this API too.

Very nice, thanks. I'll open a ticket on the Jetbrains tracker and
explain the whole situation.

Milen Dyankov

unread,
Apr 15, 2018, 5:40:08 AM4/15/18
to bndtool...@googlegroups.com
Hi Mark,

I just wanted to say I agree with you 100% on both build tools and quick run arguments. I've in fact expressed very similar (although not that well atticulated) concerns in the past. I keep my fingers crossed for your arguments to be heard and acted upon. Yet I'm afraid the only answer would still be in the lines of  "bnd.bnd is the ultimate place to configure your project and everything else is shortcomings of your build tools and/or IDE which we can't help with". 

While that is true, it is the wrong standpoint IMHO. We have a chicken and egg problem here. Tool builders are not interested in better bnd support because not many developers use OSGi which is partly so because it is really hard to use OGSi unless they learn bnd (which for most people out there is just another unpopular build tool). IMHO (assuming OSGi wants to grow) it's the OSGi folks that should have interest in changing that and actively work with tool builders to make it stupid simple to use the goodies without having to turn an existent build process upside down. 

But I've given up fighting that battle. I'm building my own maven extension that tries to solve some of those issues. However given the amount of spare time I can dedicate to it, it woul likely never mature to become useful for anyone but me.

Best,
Milen



BJ Hargrave

unread,
Apr 15, 2018, 7:05:29 AM4/15/18
to bndtool...@googlegroups.com
You can put all your bnd configuration in the Pom. The bnd-maven-plugin supports this.

I think the frustration that Mark has here is that Eclipse m2e works well with bnd-maven-plugin but not maven-bnd-plugin and IDEA works well with maven-bnd-plugin but not bnd-maven-plugin.

Whether one puts bnd configuration in a bnd file or the Pom is orthogonal.
--
BJ

Tim Ward

unread,
Apr 15, 2018, 7:13:03 AM4/15/18
to bndtool...@googlegroups.com
It should also be noted that once you start using the Bundle annotations from OSGi R7 there’s typically no need to have a bnd file at all. The combination of a parent pom, defaults and annotations can replace it entirely.

Tim

Sent from my iPhone

Milen Dyankov

unread,
Apr 15, 2018, 8:59:13 AM4/15/18
to bndtool...@googlegroups.com
You are right. In fact even with R6 for most of the simple enough projects one can go without bnd.bnd file. My bad, I keep using bnd when I in fact mean bndrun files, which AFAIK is the only way to have click and run functionality. 

I may be misinterpreting Mark's point but it seams to me he largely has the same issue which I will generalize in 2 points:
 - have a well defined maven projects that contain 100% of the information needed, that every developer can understand and any CI can run    
 - have the ability to quickly run and test my code while developing without needing more than what's in those project's poms

Thus, not having to have the bndrun files was the first problem I was trying to solve with the maven extension. There is a working limited prototype of that already that can resolve and assemble runtimes. But that is indeed not the problem Mark seams to have.

The second one is the to be able to run and update those in seconds during development. I don't use Idea and I don't know how things look there but in Eclipse to do that, one needs BndTools which relays on bndrun files and largely does not care about what's in the pom. So moving "resolve and assemble" to the maven extension, renders BndTools useless. Moreover it turned out M2Eclipse does not fully support maven extensions [1] which also renders M2Eclipse useless for automated "safe -> compile -> build -> deploy / run" use case that is so common during development. 

My next challenge it to have BndTools-like functionality in the Maven extension. This way one could do `mvn em:run` and maven itself will (based solely on what's in the POM) monitor for changes, compile and (re)deploy bundles (much like BndTools does) in a IDE agnostic way. Unfortunately I'm yet to find the time to dig deep enough in both Maven and BndTools code to figure out if this is at all possible. I believe if something like that existed (based on bndrun files or not), it would solve Mark's problem of having a shared, well defined build that at the same time allows teams to use whatever IDE they want.


Milen

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Apr 16, 2018, 2:25:39 AM4/16/18
to bndtool...@googlegroups.com
I am not sure why you would not consider a bndrun file to be just another type of source file in the project. A project may have multiple bndrun files as it may have multiple source files of a variety of types.

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

Tim Ward

unread,
Apr 16, 2018, 2:42:03 AM4/16/18
to bndtool...@googlegroups.com
When using Maven I see a bndrun file as being roughly equivalent to an assembly descriptor.

Tim

Milen Dyankov

unread,
Apr 16, 2018, 3:41:23 AM4/16/18
to bndtool...@googlegroups.com
When using Maven I see a bndrun file as being roughly equivalent to an assembly descriptor.

Precisely! 

Personally what I hate more than having to write complex things in XML files is having to write complex things in properties files :) But I do realize that is a personal preference not an argument against it.

The real argument is that with bndrun files we need custom tools (like BndTools) that understand them. Therefore there will never be something like BndTools for Idea or Netbeans unless the authors of BndTools decide to write one. 
If we could get the same with standard Maven lifecycle, most of what BndTools does will be likely available OOTB in all IDEs and command line. And even when it's not, it will be much easier to convince IDE developers to improve support for well known and widely used build and assembly tool. It will also not force developers to learn bndrun files and directives (documentation of which is far from perfect). And we don't really have to get rid of bndrun files, just hide them. That's what EM does - it generates them on the fly and passes them to the plugin that understand them. 




Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Apr 16, 2018, 3:49:17 AM4/16/18
to bndtool...@googlegroups.com
There are bnd-*-maven-plugins which operate on bndrun files like export, resolve, test. These do not require Bndtools IDE support.

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

Milen Dyankov

unread,
Apr 16, 2018, 4:08:27 AM4/16/18
to bndtool...@googlegroups.com
Sure. But that's not the point. Say, there is a team that uses NetBeans (using another free IDE to avoid the "use free IDE" argument). How do they get to click-run-test their modules? There is no BndTools for NetBeans AFAIK. There is no Maven plugin that can monitor code changes and "redeploy on save" like BndTools does. So there are only two answers "switch to Eclipse" or "ask NetBeans to add support for bndrun files (which is essentially clone BndTools)". I think we both know non of this will happen.

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Apr 16, 2018, 4:12:36 AM4/16/18
to bndtool...@googlegroups.com
Is this not changing the problem we are talking about? I thought the issue was about using bndrun files in maven vs everything in poms. IDE support of any possible maven plugin is always up to the IDE. Eclipse m2e is probably more likely to work, in some way, with most any maven plugin. IDEA's magic understanding of maven-bundle-plugin is a one-off support which, of course, does not scale.

Perhaps we need to step back and agree on the problem under discussion here. Perhaps bndrun files is a distraction.

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

Milen Dyankov

unread,
Apr 16, 2018, 4:54:24 AM4/16/18
to bndtool...@googlegroups.com
I feet bad that I kind of hijacked Mark's thread so I went back re-reading the beggining of the thread. This is how the original problem was described:

This implies that the IDE needs to be able to read the various bundle manifest
settings from the Maven pom.xml in order to produce working bundles
when I click "build" (and use the IDE's internal build tool). The
reason I use the IDE's internal build tools is simply that running a
Maven build can take ~30 seconds, whereas the IDE internal builds
typically take less than a second. It's quicker.

I'm not sure if by "build" Mark means "just build the jar" or "build and resolve and run so I can test it". I kind of assumed the later but I may be wrong.

For "just build the jar" it should be no-brainer. It's standard Maven lifecycle that IDEs (or their respective Maven plugins) should understand. It should not require to "understand" individual Maven plugins. If that's not the case, it's the IDE (or their respective Maven plugins) to be improved.

For "build and resolve and run so I can test it" it's a whole different story. In Eclipse this requires BndTools which understands special kind of assembly descriptors - bndrun files. There is nothing Maven standard here. For that to work in other IDEs there are 2 possible solutions IMHO:
 - provide BndTools for each IDE
 - move (or rather wrap) the whole process in a standard Maven lifecycle way so IDEs can execute it in a common way.

So it is not, if there should or should not be bundrun files discussion. Apart from making it easier for Java developers to work with OSGi, that discussion is irrelevant. The issue is that with explicit bundrun files, IDEs have to rely on custom tools (BndTools) that understand them. I don't see many IDE maintainers happily building those. If the same could be part of standard Maven lifecycle, IDEs can just improve Maven support. 



Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Apr 16, 2018, 5:15:22 AM4/16/18
to bndtool...@googlegroups.com
But with the bnd-*-maven-plugins, the support for bndrun files _is_ part of "standard" maven support that an IDE can have. Eclipse m2e being an example. Bndtools has additional support for bndrun operations (editors, launching, ...) but this is somewhat independent of how the bndrun information is expressed.

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

Neil Bartlett

unread,
Apr 16, 2018, 5:15:57 AM4/16/18
to bndtool...@googlegroups.com
NetBeans users can use the current Maven plugins to generate a standalone application JAR. They can run and debug that JAR using existing NetBeans tooling for launching Java apps... I have to assume such tooling exists, I have never used NetBeans.

Why is this not enough? If you need advanced features like redeploy on save, then you need to use an IDE with specific support for the kind of runtime you are using, i.e. Bndtools.

Neil

Milen Dyankov

unread,
Apr 16, 2018, 8:27:30 AM4/16/18
to bndtool...@googlegroups.com
Right. I knew this is where we'll arrive :) That's why I wrote I've given up arguing about that already in my first mail :)
By the way in case you stay in Sofia until Thursday and you feel like it, we can discuss it face to face :) 

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

BJ Hargrave

unread,
Apr 17, 2018, 2:15:05 AM4/17/18
to bndtool...@googlegroups.com
I will be in Sofia til Saturday morning. :-)

Tim


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
BJ

Christian Schneider

unread,
Apr 17, 2018, 2:46:01 AM4/17/18
to bndtool...@googlegroups.com
I have just finished an example and docs of some tips and tricks I learned for writing OSGi tests using pax exam.
Some highlights:

- Mock tests for DS components using Mockito
- Debug pax exam based tests like plain java code (edit, save, debug)
- Full support for hamcrest matchers
- Use Awaitility for polling asynchronous external systems
- Create test bundles with bnd and DS components on the fly using TinyBundles
- Use logback in pax exam

See

This currently does not use bndrun files but I hope we will have bndrun support for pax exam at some point.

Cheers 
Christian

2018-04-15 9:02 GMT+02:00 Christian Schneider <ch...@die-schneider.net>:
Eclipse m2e now uses a maven API to let plugins take part in the incremental build.
This should allow intellij idea to do the same. 

The reason that this works with the bnd-maven-plugin is that it uses the API. 
See this for some more informations about the integration:
https://github.com/bndtools/bnd/issues/1180

So I think it may be worth asking intellij if they can support this API too.

Btw. I am currently working on an example that shows how to run and debug pax exam tests as conveniently as bnd based tests in a bnd workspace. 
The tests can reside in the same maven project as the code, do not require a maven call to be updated and can be run directly using eclipse 
run or debug (no explicit remote debugging). So basically you simply edit a file, save it and run debug.

I will annouce the example on this list once I am finished.

Christian

Bram Pouwelse

unread,
Apr 18, 2018, 2:41:12 PM4/18/18
to bndtool...@googlegroups.com
As this thread has several references to IntelliJ already I think I can add one more. 

I've just uploaded the "Amdatu" IntelliJ plugin as an alternative to the Osmorc plugin to the plugin repo (it's pending review so only available using a direct link). This plugin is partially re-using parts of the Osmorc codebase for importing and running projects. 

Some highlights: 
 - Completion when editing bnd(run) files 
 - Create project / module based on Bndtools templates (or workspace / project in Eclipse terminology) 
 - Re-exporting packages from a module works
 
It doesn't have all the features that are available in bndtools (yet) but we've been testing this on several (larger) projects internally for the last few weeks and we have no major issues there. 

Direct link: https://plugins.jetbrains.com/plugin/10639-amdatu
Source: https://bitbucket.org/amdatu/amdatu-idea

Cheers,
Bram 


To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
--
Christian Schneider

http://www.liquid-reality.de

Computer Scientist




--
--
Christian Schneider

http://www.liquid-reality.de

Computer Scientist

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

Mark Raynsford

unread,
Apr 23, 2018, 6:00:03 AM4/23/18
to Bram Pouwelse, bndtool...@googlegroups.com
On 2018-04-18T18:41:00 +0000
Bram Pouwelse <br...@pouwelse.com> wrote:

> As this thread has several references to IntelliJ already I think I can add
> one more.
>
> I've just uploaded the "Amdatu" IntelliJ plugin as an alternative to the
> Osmorc plugin to the plugin repo (it's pending review so only available
> using a direct link). This plugin is partially re-using parts of the Osmorc
> codebase for importing and running projects.
>
> Some highlights:
> - Completion when editing bnd(run) files
> - Create project / module based on Bndtools templates (or workspace /
> project in Eclipse terminology)
> - Re-exporting packages from a module works
>
> It doesn't have all the features that are available in bndtools (yet) but
> we've been testing this on several (larger) projects internally for the
> last few weeks and we have no major issues there.
>
> Direct link: https://plugins.jetbrains.com/plugin/10639-amdatu
> Source: https://bitbucket.org/amdatu/amdatu-idea

'Ello!

Sorry for the delay: Been getting things back together after a hardware
failure.

This plugin looks great. If it could gain support for loading bnd
instructions from bnd-maven-plugin instances in Maven, then this would
essentially solve the problem that started this thread in the first
place. I assume that it can already do it for maven-bundle-plugin
instances given that it's partially descended from Osmorc?

Bram Pouwelse

unread,
Apr 23, 2018, 7:23:49 AM4/23/18
to Mark Raynsford, bndtool...@googlegroups.com
 I assume that it can already do it for maven-bundle-plugin 
instances given that it's partially descended from Osmorc?

No it doesn't support that (yet) as I just took the parts from Osmorc required to get the bnd workspace model to work. We don't use Maven in our projects so to be honest it's not even on my todo list.... Having an alternative to Osmorc is "nice" but I think it would be even better if Osmorc would fully support bnd workspaces, there is an issue open for that [1] (for a long time by now) 
Reply all
Reply to author
Forward
0 new messages