JAL-3287 adjustment to HelpLinksChecker to run in Windows and improvement to build...
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 4 Jun 2019 14:28:13 +0000 (15:28 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 4 Jun 2019 14:28:13 +0000 (15:28 +0100)
build.gradle
utils/HelpLinksChecker.java

index fb311a4..e099ef4 100644 (file)
@@ -538,6 +538,8 @@ task compileLinkCheck(type: JavaCompile) {
   destinationDir = file("$jalviewDir/$utilsDir")
   source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
 
+  inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
+  inputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.java")
   outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class")
   outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
 }
@@ -550,7 +552,6 @@ task linkCheck(type: JavaExec) {
   workingDir = jalviewDir
   def help = "$classes/$helpDir"
   args = [ "$classes/$helpDir", "-nointernet" ]
-  //args = [ "$classesDir/$helpDir", "-nointernet" ]
 
   doFirst {
     helplinkscheckeroutputfile.createNewFile()
index 1279b31..3b64180 100644 (file)
@@ -282,6 +282,7 @@ public class HelpLinksChecker implements BufferedLineReader.LineCleaner
         else
         {
           internalHrefCount++;
+          String relFile = System.getProperty("os.name").indexOf("Win") > -1 ? href.replace('/', '\\') : href;
           File hrefFile = href.equals("") ? htmlFile : new File(htmlFolder,
                   href);
           if (hrefFile != htmlFile && !fileExists(hrefFile, href))