2

IntelliJ IDEA 11/12 user, here.

We have a Maven/OSGi multi-module project set up in which module1 depends on module2. module2 exports packages with MANIFEST only.

When coding in module1, is there any way to set up IntelliJ IDEA so it honors the exported packages of module2 and flag any disallowed imports in module1 as errors (the way Eclipse does this)?

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
marathon
  • 7,881
  • 17
  • 74
  • 137
  • 3
    Probably not, IntelliJ's support for OSGi is non-existent. You might want to vote here: http://youtrack.jetbrains.com/issue/IDEA-100812. Or just use Bndtools ;-) – Neil Bartlett Apr 26 '13 at 20:53
  • 1
    Hey @NeilBartlett. It'd be great if there were an article/blog entry that would decribe how to use bndtools with IntelliJ IDEA. Is there one you'd recommend (or shall I poke about for one)? It'd be even more awesome if we could point at it here, at SO. – Jacek Laskowski Apr 28 '13 at 08:03
  • 1
    @JacekLaskowski Bndtools requires Eclipse. As I said, IntelliJ support for OSGi is non-existent. Anyway, here is the Bndtools tutorial: http://bndtools.org/tutorial.html – Neil Bartlett Apr 28 '13 at 11:25
  • 1
    I believe one could create a quite viable OSGi-aware environment in IntelliJ based on Maven where Maven drives dependencies that are set up with appropriate plugins. Don't you think it could work for any IDE, IDEA including? Just thinking aloud. – Jacek Laskowski Apr 28 '13 at 12:42
  • 2
    I think once you used bndtools you see that you need a bit more than maven. However, bnd, the foundation of bndtools is designed to run in other IDEs, it has no dependency on Eclipse. Just looking for someone to integrate it in IDEA as Neil did for Eclipse – Peter Kriens May 01 '13 at 07:00
  • IntelliJ does actually have quite a lot of support for OSGi, so @NeilBartlett seems to be spreading FUD at this point. While it might be true that bndtools offers more support, it's wrong to slag off an IDE on that basis. – Software Engineer Jun 09 '13 at 04:57
  • @EngineerDollery I'm happy to be proven wrong. Link to a document or blog post about it please. My information is based on reports from IntelliJ users who have switched to Bndtools because of the lack of OSGi support in IntelliJ. – Neil Bartlett Jun 09 '13 at 06:50
  • Here's the Jetbrains page describing their OSGi support, as per Neil's quite reasonable request. http://www.jetbrains.com/idea/features/osgi.html – Software Engineer Jun 09 '13 at 07:17
  • I might switch too, if it had better support, but that doesn't mean that it's support is 'non-existant'. You really are encouraged to try it yourself too, as it's open-source and free (although in the free version, you have to use the plug-in version of the support, as it's only fully integrated in the commercial version -- and there's nothing wrong with people making some money). – Software Engineer Jun 09 '13 at 07:19
  • I say quite reasonable -- quite reasonable would have been to google it. This is the opposite of reasonable really, but I don't actually mind -- I'm here to help :-p – Software Engineer Jun 09 '13 at 07:20

0 Answers0