[TR-549] Windows batch scripts _do_ _not_ _work_ Created: 31/Oct/18  Updated: 12/Jan/19  Resolved: 12/Jan/19

Status: Resolved
Project: Terrier Core
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Improvement Priority: Blocker
Reporter: Craig Macdonald Assignee: Richard McCreadie
Resolution: Fixed  
Labels: None

Issue Links:
Related
is related to TR-522 wrong paths in .bat files Resolved

 Comments   
Comment by Richard McCreadie [ 13/Dec/18 ]

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

Comment by Richard McCreadie [ 13/Dec/18 ]

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?

Comment by Richard McCreadie [ 17/Dec/18 ]

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

Comment by Richard McCreadie [ 19/Dec/18 ]

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)

Comment by Craig Macdonald [ 12/Jan/19 ]

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

Generated at Sat Aug 08 12:34:23 BST 2020 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.