From ba33ebdf05350e76152acb38827f9a8df4c9d737 Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Mon, 21 Apr 2014 11:37:53 +0200
Subject: [PATCH] Linkink Docbook with Javadoc

---
 Sd1/Makefile              | 25 ++++++++-----------------
 Sd1/P/fraction/V1/pom.xml |  4 +++-
 Sd1/swd1.xml              |  3 ++-
 3 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/Sd1/Makefile b/Sd1/Makefile
index 0c9e1d7ad..0c4d17602 100644
--- a/Sd1/Makefile
+++ b/Sd1/Makefile
@@ -7,7 +7,9 @@ PPARAM=\
 -p eclipse.plugin.name Swd1 \
 -p eclipse.plugin.provider 'Martin Goik, goik@hdm-stuttgart.de'
 
-CP:=../ws/Docbook/Dbtools/target/classes:../ws/eclipse/Jdbc/target/classes:../ws/eclipse/HibIntro/target/classes:${HIBDEPS}:${JDBCDEPS}
+JAVAPROJECTS=P/fraction/V1
+
+
 
 BUILDROOT=/tmp
 #--no changes below this line------------------------------
@@ -15,25 +17,14 @@ BUILDBASE=$(BUILDROOT)/$(SCRIPTBASENAME)
 BUILDNAVI=$(BUILDBASE)/navi/$(PLUGINID)
 BUILDNONAVI=$(BUILDBASE)/nonavi/$(PLUGINID)
 
+all::${BUILDNAVI}/index.html ${BUILDNAVI}/printversion.pdf jdoc
 
-
-
-
-all::${BUILDNAVI}/index.html ${BUILDNAVI}/printversion.pdf
-
-jdocbase:
-	for project in P/Fraction/V1 do
-
-#cd ../ws/eclipse;javadoc \
-#-classpath ${HIBDEPS}:${JDBCDEPS} -d ${BUILDNAVI}/Ref/api -linksource \
-#         -link http://docs.oracle.com/javase/7/docs/api -link http://testng.org/javadocs -link http://docs.oracle.com/javaee/6/api \
-#         -link http://www.jdom.org/docs/apidocs -link http://docs.jboss.org/hibernate/orm/4.1/javadocs \
-#         `find Jdbc -name \*.java|grep -v \.metadata` `find Hibintro -name \*.java|grep -v \.metadata`
-
+jdoc:
+	$(foreach prj,$(JAVAPROJECTS),(cd $(prj);mvn javadoc:javadoc \"-DjavadocDestdir=${BUILDNAVI}/Ref/api/$(prj)\");)
 
 ${BUILDNAVI}/index.html ${BUILDNAVI}/printversion.pdf:${SCRIPTBASENAME}.xml lastAnswerId.xml
-	rm -rf $(BUILDBASE) || true
-	mkdir -p ${BUILDNAVI} ${BUILDNONAVI
+	rm -rf ${BUILDBASE} || true
+	mkdir -p ${BUILDNAVI} ${BUILDNONAVI}
 	#cd Ref/Fig;make all
 	saxon9he-xslt -xi -s:${SCRIPTBASENAME}.xml -xsl:../ws/Docbook/Extensions/Xsl/docbook2docbook.xsl >  ${SCRIPTBASENAME}.answer.xml
 	/usr/share/xmlmind/bin/convertdoc -p eclipse.plugin.id  $(PLUGINID) ${PPARAM} db5.toEclipseHelp  ${SCRIPTBASENAME}.answer.xml -u $(BUILDNAVI)
diff --git a/Sd1/P/fraction/V1/pom.xml b/Sd1/P/fraction/V1/pom.xml
index 3d5aa8215..ed3208439 100644
--- a/Sd1/P/fraction/V1/pom.xml
+++ b/Sd1/P/fraction/V1/pom.xml
@@ -12,6 +12,7 @@
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <javadocDestdir>~/tmp</javadocDestdir>
   </properties>
 
   <build>
@@ -31,9 +32,10 @@
         <artifactId>maven-javadoc-plugin</artifactId>
         <version>2.9.1</version>
         <configuration>
+          <linksource>true</linksource>
           <!-- Setting destDir interferes with taglet class  -->
           <additionalJOptions>
-            <additionalJOption>-d ~/tmp/${name}</additionalJOption>
+            <additionalJOption>-d ${javadocDestdir}</additionalJOption>
           </additionalJOptions>
          
           <taglets>
diff --git a/Sd1/swd1.xml b/Sd1/swd1.xml
index 6af8159a7..1b2097692 100644
--- a/Sd1/swd1.xml
+++ b/Sd1/swd1.xml
@@ -1945,7 +1945,8 @@ public void writeSvg() {
    * @return
    *     the current default interest rate value.
    */
-  public static double getDefaultInterestRate() {
+  public static double <link
+                  xlink:href="Ref/api/P/fraction/V1/de/hdm_stuttgart/de/sd1/fraction/Fraction.html">getDefaultInterestRate()</link> {
     return defaultInterestRate;
   }
 
-- 
GitLab