Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-549

Windows batch scripts _do_ _not_ _work_

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.1
    • Component/s: None
    • Labels:
      None

      Attachments

        Issue Links

          Activity

          Hide
          richardm Richard McCreadie added a comment -

          Default index paths do not work on windows:

          PS C:\Work\Source\richardm\workspace\Terrier> .\bin\trec_terrier.bat -i
          Set TERRIER_HOME to be C:\Work\Source\richardm\workspace\Terrier
          17:53:16.076 [main] INFO o.t.indexing.TwitterJSONCollection - TRECCollection read collection specification (1 files)
          17:53:16.081 [main] INFO o.t.indexing.TwitterJSONCollection - Processing C:\Work\Data\Tweet11.gz
          17:53:16.114 [main] INFO o.t.structures.indexing.Indexer - creating the data structures data_1
          17:53:16.114 [main] ERROR org.terrier.structures.Index - Cannot create new index: path C:\Work\Source\richardm\workspaceichardmworkspaceTerriervarindex does not exist, or cannot be written to

          vs.

          PS C:\Work\Source\richardm\workspace\Terrier> .\bin\trec_terrier.bat "-Dterrier.index.path=C:\Work\Source\richardm\workspace\Terrier\var\index" -i
          Set TERRIER_HOME to be C:\Work\Source\richardm\workspace\Terrier
          17:54:55.481 [main] INFO o.t.indexing.TwitterJSONCollection - TRECCollection read collection specification (1 files)
          17:54:55.485 [main] INFO o.t.indexing.TwitterJSONCollection - Processing C:\Work\Data\Tweet11.gz
          17:54:55.517 [main] INFO o.t.structures.indexing.Indexer - creating the data structures data_1
          17:54:55.716 [main] WARN o.t.structures.indexing.Indexer - Adding empty document 28965132189040641

          Show
          richardm Richard McCreadie added a comment - Default index paths do not work on windows: PS C:\Work\Source\richardm\workspace\Terrier> .\bin\trec_terrier.bat -i Set TERRIER_HOME to be C:\Work\Source\richardm\workspace\Terrier 17:53:16.076 [main] INFO o.t.indexing.TwitterJSONCollection - TRECCollection read collection specification (1 files) 17:53:16.081 [main] INFO o.t.indexing.TwitterJSONCollection - Processing C:\Work\Data\Tweet11.gz 17:53:16.114 [main] INFO o.t.structures.indexing.Indexer - creating the data structures data_1 17:53:16.114 [main] ERROR org.terrier.structures.Index - Cannot create new index: path C:\Work\Source\richardm\workspaceichardmworkspaceTerriervarindex does not exist, or cannot be written to vs. PS C:\Work\Source\richardm\workspace\Terrier> .\bin\trec_terrier.bat "-Dterrier.index.path=C:\Work\Source\richardm\workspace\Terrier\var\index" -i Set TERRIER_HOME to be C:\Work\Source\richardm\workspace\Terrier 17:54:55.481 [main] INFO o.t.indexing.TwitterJSONCollection - TRECCollection read collection specification (1 files) 17:54:55.485 [main] INFO o.t.indexing.TwitterJSONCollection - Processing C:\Work\Data\Tweet11.gz 17:54:55.517 [main] INFO o.t.structures.indexing.Indexer - creating the data structures data_1 17:54:55.716 [main] WARN o.t.structures.indexing.Indexer - Adding empty document 28965132189040641
          Hide
          richardm Richard McCreadie added a comment -

          Otherwise the bat scripts seem to do what they are intended to do once mvn package has been run? At least they work on my machine using powershell.

          Although, looking at what they are doing now, not sure why we need them. Given that we are building a fat jar with all dependencies anyway can't we just tell maven to add org.terrier.applications.AnyclassLauncher as the main class and simply call the jar directly?

          Show
          richardm Richard McCreadie added a comment - Otherwise the bat scripts seem to do what they are intended to do once mvn package has been run? At least they work on my machine using powershell. Although, looking at what they are doing now, not sure why we need them. Given that we are building a fat jar with all dependencies anyway can't we just tell maven to add org.terrier.applications.AnyclassLauncher as the main class and simply call the jar directly?
          Hide
          richardm Richard McCreadie added a comment -

          Linking the previous fix to the bat scripts. Still not seeing anything wrong with the bat scripts themselves.

          Show
          richardm Richard McCreadie added a comment - Linking the previous fix to the bat scripts. Still not seeing anything wrong with the bat scripts themselves.
          Hide
          richardm Richard McCreadie added a comment - - edited

          On the default indexing path the issue is when specifying the index path in the property file. Documentation needs to state somewhere that location names need [double backslashes] in the property file but not for the command line (quotes are sufficient here)

          Show
          richardm Richard McCreadie added a comment - - edited On the default indexing path the issue is when specifying the index path in the property file. Documentation needs to state somewhere that location names need [double backslashes] in the property file but not for the command line (quotes are sufficient here)
          Hide
          craigm Craig Macdonald added a comment -

          Checked bin/terrier.bat on a Windows machine, committed some fixes.

          Show
          craigm Craig Macdonald added a comment - Checked bin/terrier.bat on a Windows machine, committed some fixes.

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: