Author: jleroux
Date: Sat Dec 1 12:30:50 2018 New Revision: 1847890 URL: http://svn.apache.org/viewvc?rev=1847890&view=rev Log: Fixed: Create a PoC for a documentation system for OFBiz based on Asciidoc (OFBIZ-9873) At r1831619 we committed a workaround to "turn off PDF in windows for now" I have found a real solution for this bug which prevents to check PDF results in Windows because the PDF were not generated there. I found this solution at https://github.com/asciidoctor/asciidoctorj-pdf/issues/8. After reading https://github.com/asciidoctor/asciidoctor-pdf/issues/850 I checked it also works on Linux. It uses the last version of jruby-complete. I guess the gradle-versions-plugin should be able to warn us when an upgrade of jruby-complete is available like it does for junitReport. Added: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java (with props) Modified: ofbiz/ofbiz-framework/trunk/build.gradle Modified: ofbiz/ofbiz-framework/trunk/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1847890&r1=1847889&r2=1847890&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Dec 1 12:30:50 2018 @@ -194,6 +194,9 @@ dependencies { // libs needed for junitreport junitReport 'junit:junit:4.12' junitReport 'org.apache.ant:ant-junit:1.10.5' + + // bug workaround - see OFBIZ-9873 + asciidoctor 'org.jruby:jruby-complete:9.2.4.0' // local libs getDirectoryInActiveComponentsIfExists('lib').each { libDir -> @@ -504,12 +507,7 @@ task createTenant(group: ofbizServer, de // ========== Documentation tasks ========== tasks.withType(AsciidoctorTask) { task -> - // bug workaround - see OFBIZ-9873 - if (os.contains('windows')) { - backends 'html5' - } else { - backends 'html5', 'pdf' - } + backends 'html5', 'pdf' attributes \ 'doctype': 'book', 'experimental': '', Added: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java?rev=1847890&view=auto ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java (added) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java Sat Dec 1 12:30:50 2018 @@ -0,0 +1,27 @@ +package org.apache.ofbiz.base.util.test; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; + +import org.apache.ofbiz.base.util.UtilXml; + +public class ServerTableEntryTest { + + public static void main(String[] args) throws IOException { + // TODO Auto-generated method stub + FileInputStream fis=new FileInputStream("C:\\payload_ofbiz.txt"); + Reader reader=new InputStreamReader(fis); + int temp=-1; + StringBuilder sb=new StringBuilder(); + while((temp=reader.read())!=-1) { + sb.append((char)temp); + temp=-1; + } + String str=sb.toString(); + //System.out.println(str); + fis.close(); + UtilXml.fromXml(str); + } +} Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/test/ServerTableEntryTest.java ------------------------------------------------------------------------------ svn:mime-type = text/plain |
Free forum by Nabble | Edit this page |