From: Andreas Beeker
Date: Sat, 10 Apr 2021 11:44:30 +0000 (+0000)
Subject: fix paths for integration build, docs, add site task to main build.gradle
X-Git-Tag: REL_5_1_0~259
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=861ff655088135198176b4b4a0b6e80c08e8d196;p=poi.git
fix paths for integration build, docs, add site task to main build.gradle
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888580 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/build.gradle b/build.gradle
index a85f346ee2..345b5c34d8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -381,4 +381,56 @@ rat {
}
}*/
-//compileJava.dependsOn 'downloadJarsToLibs'
\ No newline at end of file
+//compileJava.dependsOn 'downloadJarsToLibs'
+
+task site(type:Exec) {
+ if (System.env.FORREST_HOME == null) {
+ throw new InvalidUserDataException(
+ 'Apache Forrest is not installed.\n' +
+ 'Please install Apache Forrest (see https://forrest.apache.org/index.html) and set the\n' +
+ 'FORREST_HOME environment variable!')
+ }
+
+ if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
+ // maybe Java 9-11 works too?
+ throw new GradleScriptException("Apache Forrest must be executed with Java 8!")
+ }
+
+ if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
+ commandLine 'cmd', '/c', "${System.env.FORREST_HOME}/bin/forrest.bat"
+ } else {
+ commandLine "${System.env.FORREST_HOME}/bin/forrest"
+ }
+
+ //store the output instead of printing to the console:
+ standardOutput = new ByteArrayOutputStream()
+
+ ext.output = {
+ return standardOutput.toString()
+ }
+
+ doLast {
+ println 'Broken links:'
+ println file("${buildDir}/tmp/brokenlinks.xml").text
+
+ /* Apache Forrest is dead, so we cannot expect fixes there however it does not handle "https" in "credits"
+ currently if the *.xml file is in a sub-directory, see Apache Forrest code at
+ main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl:350
+
+ So we need to replace the links afterwards to have a fully "https" website and avoid browser warning about
+ a "mixed content" website */
+ def buildSite = "${buildDir}/site"
+
+ println "Fix https in ${buildSite}"
+
+ ant.replace(dir: buildSite, summary:'true', includes:'**/*.html',
+ token:'http://www.apache.org/events/current-event-125x125.png',
+ value:'https://www.apache.org/events/current-event-125x125.png')
+
+ ant.replace(dir: buildSite, summary:'true', includes:'**/*.html',
+ token:'http://www.google.com/search',
+ value:'https://www.google.com/search')
+
+ ant.fixcrlf(srcdir: buildSite, includes:'**/*.html,**/*.css', eol:'unix', eof:'remove')
+ }
+}
diff --git a/poi-integration/build.xml b/poi-integration/build.xml
index a8183c309b..75c9405cdf 100644
--- a/poi-integration/build.xml
+++ b/poi-integration/build.xml
@@ -139,7 +139,7 @@ Before running this, you should execute the "assemble" target in the main build.
-
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
index 1cbb4d4fc3..972ff22b9a 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
@@ -535,7 +535,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
*
* Sheets that have missing or empty cells may result in
* sparse calls to cell
. See the code in
- * src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
+ * poi-examples/src/main/java/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
* for an example of how to handle this scenario.
*/
void cell(String cellReference, String formattedValue, XSSFComment comment);
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
index 4eb67ea8a5..7cee29bb9c 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
@@ -916,7 +916,7 @@ public class SXSSFCell extends CellBase {
}
}
-//COPIED FROM https://svn.apache.org/repos/asf/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java since the functions are declared private there
+//COPIED FROM https://svn.apache.org/repos/asf/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java since the functions are declared private there
/**
* Used to help format error messages
*/
diff --git a/poi/src/main/java/org/apache/poi/hssf/extractor/ExcelExtractor.java b/poi/src/main/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
index 5fa855546f..93fdb46093 100644
--- a/poi/src/main/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
+++ b/poi/src/main/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
@@ -51,7 +51,7 @@ import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
* the XLS2CSVmra example
*
*
- * @see XLS2CSVmra
+ * @see XLS2CSVmra
*/
public class ExcelExtractor implements POIOLE2TextExtractor, org.apache.poi.ss.extractor.ExcelExtractor {
private final HSSFWorkbook _wb;