Setup

Last updated on 22nd April 2024

Each of these setup processes can be done with user-wide authentication or project-local authentication. Although most modellers need user-wide authentication, there may be instances where a different license is necessary in one or more specific projects. The setup processes go through user-wide setup first, followed by project-local setup.

Note: Regardless of whether you use the command line and Maven to run or IntelliJ the follow steps will be required.

Authentication

Maven will search for a file called settings.xml in its home directory when creating a default server authentication configuration.

Use the following commands to create and open the Maven home directory, .m2 directory, if it hasn't been created already.

On a Windows command prompt (WinKey + R, cmd), run the following commands.

md "%userprofile%\.m2"
explorer "%userprofile%\.m2"

On Mac OS and Linux, run the following commands.

mkdir -p ~/.m2

open ~/.m2 # MacOS
xdg-open ~/.m2 # Linux

Next, if settings.xml doesn't exist in that directory, create it. The basic structure of the file should look like the following.

<?xml version="1.0" encoding="UTF-8"?>
<settings>
    <servers>
        <server>
            <id>simudyne.jfrog.io</id>
            <username></username>
            <password></password>
        </server>
    </servers>
</settings>

Place your username and password in the appropriate XML elements, then save the file. The username and password are located in your Maven access token file.

The format of the Maven access token file has changed slightly over time. For older Simudyne users, the username is the name of the access token file, and the password is the file content. Newer users can find both the username and passowrd in the contents of the access token file, as the first and second line, respectively.

Your organisation may require you to use a proxy for Maven requests. Proxy settings should be placed in the settings.xml file under the "proxies" element. For more information on configuring a proxy, see Maven's proxy configuration page.

There are two different ways Maven can be configured for project-local authentication.

  1. On the command line, pass -S settings.xml to any mvn command.
  2. In the IDE, override the Maven configuration on a per-project basis. The exact method for this will vary depending on the IDE and version. For IntelliJ Idea, Simudyne's recommended IDE, you should be able to take the following steps:
  3. a. Go to "Build, Execution, Deployment".
  4. b. In "Build Tools", select "Maven".
  5. c. Tick the override box for the "User settings file" property.
  6. d. Set it to point to the settings.xml file in your project.

Simudyne License

SDK users should recieve a Simudyne license file as part of the onboarding process. Please contact support@simudyne.com if there are any license problems.

Simudyne licenses have a .license extension, and the SDK automatically searches for licenses in the .simudyne directory. If the directory contains more than one license file, the SDK will pick one at random.

Read more in-depth documentation on licensing here.

Use the following commands to create and open the .simudyne directory. Put the license file inside after the directory has been created.

On a Windows command prompt (WinKey + R, cmd), run the following commands.

md "%userprofile%\.simudyne"
explorer "%userprofile%\.simudyne"

On Mac OS and Linux, run the following commands.

mkdir -p ~/.simudyne

open ~/.simudyne # MacOS
xdg-open ~/.simudyne # Linux

There are several ways that Simudyne licenses can be configured for project-local authentication.

  1. Copy the license to a project's root directory and rename it to `licenseKey'. The SDK will then prioritize this license.
  2. Put a core.license-file property into the simudyneSDK.properties file. The value should be the path to your license relative to your project root directory.
  3. Pass in the license location via the Java command line using the -DsimudyneLicenseFile flag.

The Simudyne SDK needs a valid license in order to run. This license is valid for one user, for a specified period. The license contains the following fields:

  • user_name -> The name of the user this license is issued for
  • email_address -> The email addres of the user this license if issued for
  • organisation
  • contract_reference
  • distributed -> Whether or not this license is valid for running the Simudyne SDK in a distributed mode
  • hard_termination -> Whether or not the Simudyne SDK will stop working after the license expiry date
  • core_limit -> The maximum number of cores this license is valid to run on
  • issue_date
  • valid_to
  • signature -> A signed hash of the license. This gets validated against the public key (which is embedded in the software)

No details of the license should be changed. If any changes are made, the license will not be valid, and the software will not run. License validation happens locally, which means no calls back to Simudyne are made when validating the license.

Verifying Installation

You should now be able to run the SDK by either using the Maven command 'mvn clean compile exec:java -s settings.xml` or by right-clicking on the Main.java file in IntelliJ and clicking run.

This will for the first time take quite a while as it will be downloading all dependencies to your local machine. From there they are then cached in your .m2 folder. If you ever have an issue it's recommended to possibly remove the contents of this folder first as it will ensure there are no caching issues should a clean compile usage in Maven commands fail.

After it completes downloading the various dependencies and compiled you should if successful see the line Server online at http://localhost:8080/. You can then go to this location on your web browser and be able to view the list of registered models. If you are able to get to this step then you have successfully setup your authentication and license.

We recommend downloading our starter project containing sample models on the Simudyne GitHub. This is a complete Simudyne SDK project with the Simudyne SDK dependencies for downloading the libraries.

If you have any issues, the setup fails to authenticate - please provide any error messages and as much info as possible and email directly to **support@simudyne.com**