[sikuli] 03/06: Back to maven to build docs
Gilles Filippini
pini at debian.org
Mon Nov 13 16:10:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
pini pushed a commit to branch master
in repository sikuli.
commit d8b7ad49fc6386c4f41bec53fcee6440e1c7418d
Author: Gilles Filippini <pini at debian.org>
Date: Wed Nov 1 18:23:52 2017 +0100
Back to maven to build docs
---
debian/changelog | 3 ++
debian/control | 1 +
debian/libsikulixapi-doc.install | 2 +-
debian/patches/javadoc-configuration.patch | 45 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 25 ++++-------------
6 files changed, 57 insertions(+), 20 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3c1dfb3..7caa44f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ sikulix (1.1.1-4) unstable; urgency=medium
libopencv3.2-java (closes: #877075)
* Benefit from the jython maven integration as well
* Update patches accordingly
+ * New patch javadoc-configuration.patch: give up building the doc via
+ a direct use of javadoc, and patch maven config to have it working
+ properly (closes: #873703)
-- Gilles Filippini <pini at debian.org> Mon, 30 Oct 2017 21:48:19 +0100
diff --git a/debian/control b/debian/control
index 651b91d..03c2bf0 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Java maintainers <pkg-java-maintainers at lists.alioth.debian.or
Uploaders: Gilles Filippini <pini at debian.org>
Build-Depends: debhelper (>= 9~), cdbs, default-jdk (>= 2:1.7)
, maven-debian-helper, libmaven-exec-plugin-java, libmaven-source-plugin-java
+ , libmaven-install-plugin-java
, libmaven-javadoc-plugin-java, jython (>= 2.7.1), jruby, swig
, libopencv-dev (>= 3.3.0+dfsg-1~), libtesseract-dev, libjxgrabkey-java, libcommons-cli-java
, libswing-layout-java, libswingx-java, libjgoodies-forms-java
diff --git a/debian/libsikulixapi-doc.install b/debian/libsikulixapi-doc.install
index a23b2ad..400ea7e 100644
--- a/debian/libsikulixapi-doc.install
+++ b/debian/libsikulixapi-doc.install
@@ -1 +1 @@
-doc/* usr/share/doc/libsikulixapi-doc/api
+API/target/apidocs/* usr/share/doc/libsikulixapi-doc/api
diff --git a/debian/patches/javadoc-configuration.patch b/debian/patches/javadoc-configuration.patch
new file mode 100644
index 0000000..281c235
--- /dev/null
+++ b/debian/patches/javadoc-configuration.patch
@@ -0,0 +1,45 @@
+Index: sikuli/API/pom.xml
+===================================================================
+--- sikuli.orig/API/pom.xml
++++ sikuli/API/pom.xml
+@@ -176,24 +176,33 @@
+ </excludes>
+ </configuration>
+ </plugin>
+- <!-- <plugin>
++ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+- <version>2.9.1</version>
++ <version>3.0.0-M1</version>
+ <configuration>
+- <excludePackageNames>org.opencv.*;edu.unh.*</excludePackageNames>
++ <sourceFileExcludes>
++ <sourceFileExclude>**/basics/WindowsHotkeyManager.java</sourceFileExclude>
++ <sourceFileExclude>**/basics/MacHotkeyManager.java</sourceFileExclude>
++ <sourceFileExclude>**/util/SysJNA.java</sourceFileExclude>
++ <sourceFileExclude>**/natives/WinUtil.java</sourceFileExclude>
++ <sourceFileExclude>**/natives/MacUtil.java</sourceFileExclude>
++ <sourceFileExclude>**/android/*.java</sourceFileExclude>
++ <sourceFileExclude>**/vnc/*.java</sourceFileExclude>
++ <sourceFileExclude>**/guide/*.java</sourceFileExclude>
++ </sourceFileExcludes>
+ <show>public</show>
+- <quiet>true</quiet>
++ <quiet>false</quiet>
+ </configuration>
+- <executions>
++ <!-- <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+- </executions>
++ </executions> -->
+ </plugin>
+- <plugin>
++ <!-- <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
diff --git a/debian/patches/series b/debian/patches/series
index a54b671..1e75760 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ opencv-3.patch
no-jadb.patch
no-vnc.patch
jxgrabkey-not-embedded.patch
+javadoc-configuration.patch
diff --git a/debian/rules b/debian/rules
index a40f4a6..6fbf753 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,8 +16,8 @@ export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
JAVA_HOME := /usr/lib/jvm/default-java
-# Skip javadoc maven target because it fails resolving dependencies
-# between SikuliX-* subprojects:
+# Add 'intall' maven target to workaround failure in resolving dependencies
+# between SikuliX-* subprojects during 'javadoc' target:
# ...
# [INFO] Building Unnamed - org.sikuli:SikuliX-Natives:jar:1.1.0
# [INFO] task-segment: [javadoc:jar]
@@ -31,9 +31,7 @@ JAVA_HOME := /usr/lib/jvm/default-java
# ----------
# 1) org.sikuli:SikuliX-Basics:jar:1.1.0
# ...
-# Instead, we use our own javadoc command line to generate the documentation
-# (see target install/libsikulix-script-doc below)
-DEB_MAVEN_DOC_TARGET :=
+DEB_MAVEN_BUILD_TARGET := package install
# Despite the option '--package=<package>', maven debian helper is not
# that good at handling several binary packages.
@@ -47,6 +45,9 @@ export VP_CONFIGURE_FLAGS=--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TY
configure/libsikulixapi-jni::
[ -z "$(DEB_FAIL)" ]
sed "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g;s/@DEB_HOST_GNU_TYPE@/$(DEB_HOST_GNU_TYPE)/g" debian/libsikulixapi-jni.install.in > debian/libsikulixapi-jni.install
+ # Workaround non-orking <sourceFileExclude> at javadoc step
+ rm -f API/src/main/java/org/sikuli/basics/WindowsHotkeyManager.java
+ rm -f API/src/main/java/org/sikuli/util/SysJNA.java
clean::
rm -f debian/libsikulixapi-jni.install
@@ -67,17 +68,3 @@ install/sikulix::
install/libsikulixapi-java::
cp debian/maven.ignoreRules.full debian/maven.ignoreRules
mh_resolve_dependencies --non-interactive --offline -plibsikulixapi-java --base-directory=$(CURDIR) --non-explore
-
-# Generate doc the good old way
-install/libsikulixapi-doc::
- javadoc -windowtitle "Javadoc of Sikuli Script" \
- -encoding UTF-8 \
- -sourcepath Natives/src/main/java:Basics/src/main/java:Jython/src/main/java:JRuby/src/main/java:API/src/main/java \
- -subpackages org.sikuli \
- -d debian/tmp/doc/ \
- -link file:///usr/share/doc/default-jdk-doc/api \
- -link file:///usr/share/doc/jython-doc/html/javadoc \
- -link file:///usr/share/doc/libswing-layout-java/api \
- -link file:///usr/share/doc/libjxgrabkey-java/api \
- -link file:///usr/share/doc/libjavassist-java-doc/api \
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git
More information about the pkg-java-commits
mailing list