Automated javadoc generation

Description

Hi,

Since the early days that i adopted iDempiere, I was using some scripts and command line tool to achieve that.

Talking with , this is the same he does as we can see here

With maven & tycho i found an easier and automated way to do that:

1 - org.idempiere.javadoc
this new project uses tycho-document-bundle and basically we need only two files to configure:

  • pom.xml: javadoc related options and details

  • MANIFEST.MF: plugins selection for generation

2 - enable/disable javadoc generation on main pom.xml
by default i think that is important and that at each build we have a new version of javadoc generated/published.
Note: if you don't want you just need to comment the line below

With this simple changes every time that you run "mvn verify" you will have inside org.idempiere.javadoc/API a fresh version of your documentation.

Environment

None

Attachments

4

Activity

Show:

Carlos Ruiz December 28, 2023 at 7:15 PM

another problem is caused by

because the file org.idempiere.webservices.resources/META-INF/MANIFEST.MF created there has an Export-Package: META-INF.cxf - javadoc complains about this package

Carlos Ruiz December 28, 2023 at 6:55 PM

this is not working in release-11

one of the causes is this:
https://bugs.openjdk.org/browse/JDK-8215582

but there are more issues

Hiep Lq November 20, 2020 at 8:51 AM


i saw you use build-helper-maven-plugin to get version output to doc as "8.1"
i guest you want to truncate "-SNAPSHOT" from project.version, right?

i suggest to use
${unqualifiedVersion} to get 8.1.0
or ever ${qualifiedVersion} to get full version info 8.1.0.202011200839

so i can remove build-helper-maven-plugin help speed up a little bit build process

Hiep Lq November 20, 2020 at 8:02 AM

note for people has only jre like me
i normal don't install jdk on laptop (history mint has jdk 8 but i prefer use jdk 11)

i use jdk by download version i prefer to folder and use export JAVA_HOME=jdk_folder
so when i run "mvn verify -DjavadocPluginPhase=verify" i get issue

> Failed to execute goal org.eclipse.tycho.extras:tycho-document-bundle-plugin:2.1.0:javadoc (idempiere-javadoc) on project org.idempiere.javadoc: Failed to run javadoc: Error while executing process. Cannot run program "javadoc" (in directory "/mnt/data/1Dev/triage/dev/idempiere/org.idempiere.javadoc/API"): error=2, No such file or directory

bellow is how to resolved it

export JAVA_HOME=jdk_folder
export PATH=$JAVA_HOME/bin:$PATH
mvn verify -DjavadocPluginPhase=verify

Carlos Ruiz June 15, 2020 at 6:54 PM

I think this finally worked correctly in jenkins, the URLs are:

https://jenkins.idempiere.org/job/iDempiereDaily/ws/org.idempiere.javadoc/API/index.html
https://jenkins.idempiere.org/job/iDempiere7.1Daily/ws/org.idempiere.javadoc/API/index.html

The trick in jenkins was explained at:
https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy

The most expedient approach is to use Jenkins 2.200+ and set up a second domain pointing to the same Jenkins instance (Jenkins URL: build.example.com; Resource Root URL: build-artifacts.example.com). This will result in resources being served from the resource root URL instead of the Jenkins URL. The advantage of this is that there are no cookies associated with this domain, and file paths are hopefully sufficiently non predictable that people won't be able to exfiltrate content.

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Priority

Created April 8, 2019 at 2:44 PM
Updated March 1, 2024 at 4:25 PM
Resolved January 4, 2024 at 2:08 PM