Install on Windows

To use the Polylith tool and to get access to all the features in tools.deps, make sure you have CLI tools and git installed. If you install git for the first time, don't forget to set the user name and email.
If you got this error when installing clj:
clj : The 'clj' command was found in the module 'ClojureTools', but the module could not be loaded.
For more information, run 'Import-Module ClojureTools'.
...and if you followed the instruction and executed this:
Import-Module ClojureTools
...and got this error:
Import-Module : File C:\Users\Admin\Documents\WindowsPowerShell\Modules\ClojureTools\ClojureTools.psm1
cannot be loaded because running scripts is disabled on this system. For more information,
see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
...then try this:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
To install the poly command on Windows:
  • Download the latest release of the poly jar,
    e.g. poly-0.2.15-alpha.jar.
  • Create the Polylith directory somewhere on your machine, e.g.
    C:\Program Files\Polylith and copy the jar file to that directory.
  • Create the file poly.bat with this content (make sure you point to the jar):
    @echo off
    start /wait /b java %JAVA_OPTS% -jar "C:\Program Files\Polylith\poly-0.2.15-alpha.jar" %*
  • Add C:\Program Files\Polylith to the Windows PATH variable.
Test the installation by typing poly help from the command line.
Note: The coloring of text is not supported on Windows.