OSGI plugin development with Domino Designer 10 - osgi

Up to date I was using IBM Domino Designer V9.0.1 FP8 to develop an OSGI plugin. With this version everything was working as intended. I've created a plugin project, a feature project and an update site project. Selecting "Build all" in the update site project created all the the corresponding jar files.
Today I've installed IBM (HCL) Domino Desinger V10 FP2 (fresh install i.e. I've deinstalled V9.0.1 and deleted the old "workspace" directory in NotesData, but I kept the NotesData itself).
Now if I open my plugin projects, I can edit the plugin, save the Java classes without any errors. Up to this point everything is working as usual. But now, if I use "Build all" in the update site project I see a screen with "generating ant script" and then the build process is finished, but no jar files are generated.
Any ideas why this is happening? Am I missing some files? Am I missing some configurations?
BTW: if I use standard eclipse to build the plugin all jar files are generated.

Domino Designer is a customised version of Eclipse. 9.0.1 FP9 and lower is a very old version of Eclipse, 9.0.1 FP10+ is a much newer version, so not comparable to what was happening before. It's possible there are differences in the customisation of Eclipse that are affecting it. But every Domino OSGi plugin developer I'm aware of uses standard Eclipse.
Follow the steps for setting up your environment here https://github.com/OpenNTF/XPagesExtensionLibrary/wiki/Development-Environment. In the documentation there I've tried to document why steps are done and what they achieve, as well as just the steps themselves. The intention is to pass on understanding to a broader set of developers, for future proofing.

Related

Netbeans 11 Gradle Project does not run gradle on save

I have just installed Netbeans 11.1 and when I save one of my Java files, Netbeans does not start a gradle build automatically. This used to work in Netbeans 8.2.
I have installed nb-javac and have also tried the newest Beta version to no avail.
Is this a known bug or do I need to reconfigure something when going from NB 8.2 to 11.1?
(This is only an explanation rather than a solution to your problem.)
First, Compile on Save is an option which is set or unset at the individual project level, rather than at the global level. So for a NetBeans Gradle project, select Properties > Build > Compile to view the setting for the Compile on Save checkbox. For that checkbox, note that:
It is unchecked by default, so there will not be an automatic Gradle build when you save a project file.
It is disabled, so you cannot trigger a build whenever you save a project file.
The problem persists in the latest beta of NetBeans 11.2.
I don't see a bug report for this issue, so perhaps you can raise one? Click the Log In button to sign up first if necessary.
That said, there is a related issue which may explain why the check box cannot be enabled. See closed bug NETBEANS-680 Erroneous Gradle Compile-on-Save activity which relates to Gradle projects using version 9.0 of NetBeans. Apparently there were spurious and unwanted compile-on-save runs being triggered even though Compile on Save was unchecked. Perhaps the feature has been deliberately disabled for Gradle projects because of that issue, though that is just speculation on my part.
Also see the GitHub page for the Gradle plugin. Comments from the NetBeans team for NETBEANS-680 suggest that the problem was with the plugin rather than NetBeans. That said, if NetBeans is offering functionality that cannot be enabled (i.e Compile on Save), it is definitely a NetBeans issue regardless of the underlying cause.
Finally, note that you can configure the Gradle plugin using Tools > Options > Java > Gradle, but I dodn't see any options there that would help with this issue.

unable to create dynamic web project in spring tool suite 4.2.1

Previously I used to create dynamic web project on eclipse but I want to make project on spring tool suite i.e 4.2.1 & I've never used it before, so does anybody knows how to create a dynamic web project in Spring Tool Suite 4.2.1 or a reference to where I can get, as I've been trying to create one since 4 hours. Please help me.
Referring to this thread
To solve this on STS 4.x.x
Click on Help.
Go to Install New Software.
Select the main Eclipse update site for 2019-09 ( if not added, you must click o add button and paste this URL:http://download.eclipse.org/releases/2019-09/ on both fields).
search for m2e-wtp which will be in the last. There are four extensions showing up and you should install the ones you prefer.
Restart your IDE
see https://github.com/spring-projects/sts4/issues/96#issuecomment-484522744 on martinlippert comment..
I've added link of latest current version.
Hope this helps..
The Spring Tools 4.2.1 for Eclipse distribution didn't contain the necessary features and extensions to create dynamic web projects. This got added for later Spring Tools 4 versions. So the easiest solution would be to install a fresh distribution of the latest Spring Tools 4.3.2 for Eclipse and go from there.
As an alternative, you could also install the missing pieces into an existing Spring Tools 4 for Eclipse installation via Install New Software, then selecting the main Eclipse repository from the dropdown list, waiting for the list of features to appear, and selecting the features you are missing.

Using SonarLint in eclipse

I am trying to learn how to use SonarLint plugin in Eclipse. I downloaded the plugin and I have 4 views in my Eclipse now - SonarLint on the Fly, SonarLint Report, SonarLint Rule Description, SonarQube Servers.
In the SonarLint on the Fly, I am able to see only the JavaScript bugs scanned by SonarQube. Not the Java ones (I have Java rule set in SonarQube server as well). But if I open a Java file, then I am able to view java bugs and errors in this window.
In SonarReport, I have two tabs at the bottom - Current Project and All Projects. When I click on Current Project it scanned the current project and showed me only JavaScript errors but not Java.
So, my question is - Is there any way to see Java errors along with JavaScript? I should be able to view the Java errors throughout my project (without having to open java files and then see the bugs).
If analysis of JavaScript files is working, it should be easy to also have Java files. Few things to check:
For Java analysis to work fine, you should have installed the optional feature "SonarLint For Eclipse Java Configuration Helper"
Java files that are not part of an Eclipse Java project are ignored
Also, in the SonarLint Report view, the two buttons will only analyze changed files (ie files that are reported as changed by your SCM) so be sure that you also have some Java files with modifications.
Looking at SonarLint console while enabling verbose + analysis logs may help to understand your issue.

Problems with Osgi plugins in Domino Designer after 9.01. FP4

We have our own OSGI plugin with a set of custom code and some java libraries that we use cross projects. It is installed on servers via an update site and imported on developers Domino Designer.
It is working fine up to FP4, but in Domino Designer it is not added to bundles after FP4. For servers and Notes clients it works fine up to FP6 for which we have tested so far.
Tested now with FP7 on my Domino Designer, and the plugin installs fine both via update site and via manual import. However each time I open a database using this library I get build errors. It solves by going to the code, on the error select correct project configuration and adding our plugin to the required bundles. When I close the database and open again, I have to do the same process and we have the same problem with all databases using this plugin.
I have tested starting Notes with the osgi console, but all reports as it is installed normal there.
When viewing in package explorer before fixing the bundle I can see that the plugin is missing from Plugin dependecies and gets added there when doing the fix.
I just installed a fresh Domino Designer for a new user now and upgraded him directly to FP7. He got exactly the same problem. Downgrading him to FP4 solves the problem.
Anyone having the same problem or have ideas to how it can be solved?

Plugins folder during sonar upgrade

What is a good way for extension/plugins during sonar upgrade? I am upgrading sonar from 4.0 to 4.5.1 second time.In first time, I copied the old extension/plugins folder into new sonar version.It so happened that during first time, there was a C# plugins and during database upgrade step, we got the message of "Impossible to upgrade Database". On removing this plugin, the database upgrade didn't happen and we were taken directly to the login page. As a results projects were missing on sonar dashboard though the LDAP users got imported.So I would like to know what is the right way out of below ?
1. Copy the old plugins folder from sonar 4.0 (old) folder to sonar 4.5.1 (new) folder.
2. Don't copy the old plugin folder. Just download the new plugins which are required post sonar upgrade.
Don't do #2! It will screw up your rule profiles.
You started out correctly by copying the plugins folder. But you have to go a little farther.
You need to read the upgrade notes for each intervening version. They're all children of this general guide to upgrading. They should mention all plugin incompatibilities & you'll have to deal with those manually. You may be able to do some of the upgrades via the update center in the old version before you shut it down. The rest you have to handle by deleting/replacing the old plugin jars.

Resources