0

I've downloaded the latest version of JNA (this is the first time I've looked at it tbh) and I want to generate the javadoc for it. I'm looking to generate the documentation from folder \domino-jna-master\domino-jna\src\main\java\com\mindoo\domino\jna which is in a parent folder and using command:

javadoc -sourcepath {parent-folder}\domino-jna-master\domino-jna\src\main\java\com\mindoo\domino\jna -d c:\JNA -subpackages .

to put the generated documentation in to the c:\JNA folder.

It's finding the .java files okay but it's generating errors like:

  • cannot find symbol
  • package lotus.notes does not exist

If I use the -Xdoclint:none and --ignore-source-errors options to suppress error generation also does not work with the final error being 'no public or protected classes found to document'.

I've also tried this through eclipse but that's just a wizard for the javadoc command.

This is fairly new to me as I find most documentation online so any help you can give me would be appreciated.

added 2022-12-09

I've tried building it. I've had to change the folder location for the lwpd.domino.napi.jar file was located in the \lib\ext folder on my build from:

mvn install:install-file -Dfile="C:\Program Files (x86)\HCL\Notes\osgi\shared\eclipse\plugins\com.ibm.domino.napi_-version-\lwpd.domino.napi.jar" -DgroupId=com.ibm -DartifactId=napi -Dversion=11.0.0 -Dpackaging=jar

to

mvn install:install-file -Dfile="C:\Program Files\HCL\Notes\jvm\lib\ext\lwpd.domino.napi.jar" -DgroupId=com.ibm -DartifactId=napi -Dversion=12.0.2 -Dpackaging=jar

I'm getting one error when running the following command:

mvn -DJVMPARAMS= -DDOMINOOSGIDIR="C:\Program Files\HCL\Notes\osgi" -DDOMINODIR="C:\Program Files\HCL\Notes" -DNOTESINI="C:\Program Files\HCL\Notes\Notes.ini" clean install -Dmaven.test.skip=true

as follows:

[ERROR] Internal error: java.lang.RuntimeException: Could not resolve project dependencies: Missing:
[ERROR] ----------
[ERROR] 1) com.ibm:domino-api-binaries:jar:11.0.0
[ERROR]
[ERROR]   Try downloading the file manually from the project website.
[ERROR]
[ERROR]   Then, install it using the command:
[ERROR]       mvn install:install-file -DgroupId=com.ibm -DartifactId=domino-api-binaries -Dversion=11.0.0 -Dpackaging=jar -Dfile=/path/to/file
Adam
  • 5,495
  • 2
  • 7
  • 24

1 Answers1

2

Please take a look at the section "Creating your own build" of the README.md file.

You need to register a few Notes/Domino JARs before you can run the build. Here is that part of the documentation:

Creating your own build

The following instructions are only relevant when you want to create your own Domino JNA release version.

Registration of local Notes.jar, lwpd.commons.jar and lwpd.domino.napi.jar

There are three JAR files that are part of every Notes Client installation and that are required to compile the Domino JNA code.

On macOS, you can find the files in these locations:

  • /Applications/HCL Notes.app/Contents/Resources/jvm/lib/ext/Notes.jar
  • /Applications/HCL Notes.app/Contents/Eclipse/shared/eclipse/plugins/com.ibm.commons_-version-/lwpd.commons.jar
  • /Applications/HCL Notes.app/Contents/Eclipse/shared/eclipse/plugins/com.ibm.domino.napi_-version-/lwpd.domino.napi.jar

On Windows you fine them here:

  • C:\Program Files (x86)\HCL\Notes\jvm\lib\ext\Notes.jar
  • C:\Program Files (x86)\HCL\Notes\osgi\shared\eclipse\plugins\com.ibm.commons_-version-\lwpd.commons.jar
  • C:\Program Files (x86)\HCL\Notes\osgi\shared\eclipse\plugins\com.ibm.domino.napi_-version-\lwpd.domino.napi.jar

These files need to be registered as Maven artifacts with the right groupId / artifactId on the local machine, because they are not available on Maven Central (com.ibm.commons is there, but outdated).

For the Mac, use this syntax (replace "-version-" with the right version on your machine):

mvn install:install-file -Dfile="/Applications/HCL Notes.app/Contents/Resources/jvm/lib/ext/Notes.jar" -DgroupId=com.ibm -DartifactId=domino-api-binaries -Dversion=11.0.0 -Dpackaging=jar

mvn install:install-file -Dfile="/Applications/HCL Notes.app/Contents/Eclipse/shared/eclipse/plugins/com.ibm.commons_-version-/lwpd.commons.jar" -DgroupId=com.ibm -DartifactId=ibm-commons -Dversion=11.0.0 -Dpackaging=jar

mvn install:install-file -Dfile="/Applications/HCL Notes.app/Contents/Eclipse/shared/eclipse/plugins/com.ibm.domino.napi_-version-/lwpd.domino.napi.jar" -DgroupId=com.ibm -DartifactId=napi -Dversion=11.0.0 -Dpackaging=jar

For Windows, use this syntax (replace "-version-" with the right version on your machine):

mvn install:install-file -Dfile="C:\Program Files (x86)\HCL\Notes\jvm\lib\ext\Notes.jar" -DgroupId=com.ibm -DartifactId=domino-api-binaries -Dversion=11.0.0 -Dpackaging=jar

mvn install:install-file -Dfile="C:\Program Files (x86)\HCL\Notes\osgi\shared\eclipse\plugins\com.ibm.commons_-version-\lwpd.commons.jar" -DgroupId=com.ibm -DartifactId=ibm-commons -Dversion=11.0.0 -Dpackaging=jar

mvn install:install-file -Dfile="C:\Program Files (x86)\HCL\Notes\osgi\shared\eclipse\plugins\com.ibm.domino.napi_-version-\lwpd.domino.napi.jar" -DgroupId=com.ibm -DartifactId=napi -Dversion=11.0.0 -Dpackaging=jar

Maven build

Mac: On Mac, use this syntax to build Domino JNA against the Notes Client:

mvn -DJVMPARAMS=-d64 -DDOMINOOSGIDIR=/Applications/HCL\ Notes.app/Contents/MacOS -DDOMINODIR=/Applications/HCL\ Notes.app/Contents/MacOS -DNOTESINI=~/Library/Preferences/Notes\ Preferences clean install -Dmaven.test.skip=true

Windows: To build against the HCL Notes Client on Windows use this syntax:

mvn -DJVMPARAMS= -DDOMINOOSGIDIR="C:\Program Files (x86)\HCL\Notes\osgi" -DDOMINODIR="C:\Program Files (x86)\HCL\Notes" -DNOTESINI="C:\Program Files (x86)\HCL\Notes\Notes.ini" clean install -Dmaven.test.skip=true

After the build is done, the directory target/lib contains all recursive dependencies required to use the library, e.g. JNA and Apache tool libraries.

  • That's great, thanks. And from the very author himself too! – Adam Dec 06 '22 at 12:53
  • 1
    Per Henrik Lausten contacted me ☺️. If you have further questions, feel free to create a Github issue or join the Domino JNA slack channel at xpages.slack.com – Karsten Lehmann Dec 06 '22 at 13:16
  • I appreciate you taking the time to pop over and comment. Thanks again! – Adam Dec 06 '22 at 13:22
  • Hi Karsten, really sorry to trouble you again but I'm getting an error -> Could not resolve project dependencies: Missing: com.ibm:domino-api-binaries:jar:11.0.0. What am I doing wrong? Many thanks in advance. – Adam Dec 09 '22 at 16:00
  • You need to execute the three mvn install:install-file commands listed above to register Maven artifacts for three JARs in the Notes Client program directory. – Karsten Lehmann Dec 10 '22 at 17:07