TestRoots / watchdog

IntelliJ & Eclipse plugin for monitoring how Java applications are developed and tested
http://www.testroots.org
Other
19 stars 10 forks source link

WatchDog does not load in Eclipse/Windows #306

Closed Inventitech closed 6 years ago

Inventitech commented 6 years ago

WatchDog is not loaded in Eclipse Windows.

wd_not_loaded

After importing the project, this is the error I receive. Importing the package (which is the proper/preferred way) does not fix the problem (https://blog.osgi.org/2008/06/jsr-277-and-import-package.html), nor does lowering the severity to a warning.

change_warning_level_for_forbidden_reference

org.osgi.framework.BundleException: Could not resolve module: nl.tudelft.WatchDog [175]
  Unresolved requirement: Import-Package: org.eclipse.ui.browser
TimvdLippe commented 6 years ago

Copying my message from Mattermost:

I have generated the WatchDog bundle and installed it in an Eclipse installation on Windows 10 and have verified it works. You can reproduce this by following these steps:

  1. Take the zip attached to this message
  2. Help -> Install new Software
  3. On the right click Add...
  4. Click Archive
  5. Select the download zip
  6. Install the artifacts per the usual Eclipse installation instructions

For the archive, please see our channel in Mattermost.

Inventitech commented 6 years ago

Adding the bundle via the add require tooltip solves this problem, but introduces the unwanted bundle dependency. It is very strange that the import package solution does not work. I wonder whether the optional flag in org.eclipse.ui.browser;resolution:=optional has something to do with it.

Inventitech commented 6 years ago

(Also: why is it optional?)

TimvdLippe commented 6 years ago

It is optional because not every Eclipse installation ships with that package. This is mostly a security issue, as exposing the browser via Eclipse is considered a risk. The error is therefore a warning (also disabled in a Maven build), but I am not sure why Eclipse on Windows complains about this, while Eclipse Ubuntu works just fine.

I would say, let's investigate WatchDog development on Windows after the release. I can then have a fresh look and also look into making the install scripts cross-platform. (As the plugin is confirmed working on Windows per https://github.com/TestRoots/watchdog/issues/306#issuecomment-386254806)

Inventitech commented 6 years ago

Yeah, fwiw, I tested it on Windows, too, and found no glitches. It is, however, not as you say a warning severity thing, as that does not fix the problem (as outlined above).

But you don't have to dive into this. Since you have the most recent understanding of OSGi dependencies, I was wondering whether you could explain why importing the package does not work, but requiring the bundle does. Either way, this is not blocking anymore.