Use the thin client on Windows
Install the Java Runtime
The Java Thin Client requires a working copy of the JRE (Java Runtime Environment) that can be freely downloaded from java.com and installed with a wizard. It can also be simply unpacked and referenced in the PATH variable from a standard archive which can be downloaded from openjdk.net (see detailed instruction there).
To check that everything is working correctly after installing the JRE we can run "java --version" from either PowerShell or the standard Windows Command Prompt
At some point, as usual, Windows may ask you for permissions to execute the Java runtime: please allow the execution.
Download the Java Thin Client
To use the client first of all download the latest version, it will be put under your standard Windows "Downloads" folder. Now let's verify that everything is working as expected, launching the client for the first time and asking it to print its version. As you can see we are using the command "java -jar" followed with the full path to the newly downloaded meterian client file ("C:\Users\John\Downloads\meterian-cli.jar") and the command "--version"
The client promptly answers with its version number (please note that this may be different from the one shown here).
Executing the first analysis
Now we also need some code to verify that an analysis can be executed: make sure you have such project and also the tools required to compile, as the thin client does not contain any development tools.
Now you just move into such folder and run the client with "java -jar" followed with the full path to the newly downloaded meterian client file. If this is not a project managed bit a source control system (for example if you downloaded the sample project) you will also need to specify a "--project-url=" followed with a unique name or URL to identify your project later on your Dashboard.
If this is the first time you have ever used the client the system will open a new browser window asking you to authenticate to the Meterian platform:
Alternatively, you can alsoset up the METERIAN_API_TOKEN environment variable with one of tokens available in the account, or create a new one.
The client will proceed in the analysis, providing progress information, and at the end, it will also provide an URL of the project it was just scanned: You can open that URL with any browser and see the results of the analysis, the client will display only the resulting scores
Congratulations! Your installation on Windows is complete.
What if maven is not executing?
It may happen if your maven installation is non-standard. In that situation you need to inform the client about where the maven binary is and how it's called, this can be done using one of the Maven specific controls, maven.binary
, like in this example:
Last updated