Introduction

As a Maverick Synergy Hotfixes or Maverick Legacy customer, you should always ensure that your most recent license is added to your source code to ensure you have access to the latest API updates.

Maverick licenses are valid only for releases within your maintenance period. You will see the error below if you attempt to use a version of the product released outside your maintenance window.

com.maverick.ssh.SshException: Your subscription has expired! visit http://www.sshtools.com to purchase a subscription
	at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:317)
	at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:272)
	at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:260)
	at com.maverick.ssh.SshConnector.createInstance(SshConnector.java:241)
	at PasswordConnect.main(PasswordConnect.java:80)

The ideal time to update the license in your source code is when you receive our email with your new license key. If you do this on each renewal, regardless of whether you update the library version, it will ensure you never see a license error during development.

However, with the introduction of monthly subscriptions to our Hotfixes API, this has become more problematic due to the restricted maintenance window of a monthly license. We, therefore, have created a service that allows you to integrate licensing into your Maven build process to ensure you always have the latest license built into your code with absolutely no effort (other than making the changes to your build process to support it).

Setting up your Account

The first step is to upload a public key to your account. The public key will be used to authenticate access to our licensing server. This is just a standard SSH public/private key and can be generated with the ssh-keygen utility. We recommend generating a modern key type like ssh-ed25519.

ssh-keygen -t ssh-ed25519

You should encrypt the key with a passphrase.

Then log in to your account on our CRM at https://store.jadaptive.com and upload the key to your Authorized Keys list. This is accessed via the Home menu.

Upload the .pub file and provide a suitable name, for example, “Build Key”.

Whilst you’re logged in to your account, visit the Accounts page.

Find your account and make a note of the username that has been allocated to your account. It’s the underlined link in the first column.

Configuring Maven POM

You’re ready to configure your build and add our download plugin to your Maven POM. Add the following <plugin> entry to your <plugins> section under <build>

<build>
<plugins>
  <plugin>
	<groupId>com.sshtools</groupId>
	<artifactId>jadaptive-license-helper</artifactId>
	<version>0.0.1</version>
        <executions>
           <execution>
              <goals>
                 <goal>download-license</goal>
              </goals>
           </execution>
        </executions>
	<configuration>
           <username>lee_painter123</username>
           <companyName>Jadaptive Limited</companyName>
           <emailAddress>lee@jadaptive.com</emailAddress>
           <privateKey>-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACC6PZ5ixStWsnQIfSZ31Kes0M5FCRSRbH8KTS4gaLEMgAAAKAokRb8KJEW
/AAAAAtzc2gtZWQyNTUxOQAAACC6P5ixStWsnQIfSZc31Kes0M5FCRSRbH8KTS4gaLEMg
AAAEAFGZfrOfOXe9XzOmRd9W32on7cs6MdY2MFyPhuZ3/jro9nmLFK1aydAh9JlzfUp6z
QzkUJFJFsfwpNLiBosQyAAAAF2xlZUMZWVzLWlNYWMtUHJvLmxvY2FsAQIDBAUG
-----END OPENSSH PRIVATE KEY-----</privateKey>
           <passphrase>likeIwouldtellyouthat</passphrase>
           <productCode>SYNERGY</productCode>
         </configuration>
    </plugin>		  
  </plugins>
</build>

Set the <configuration> properties according to the values you collected earlier. The product code must be the correct code for the license you are downloading. Choose from the list below based on the API you use.

Maverick SynergySYNERGY
Maverick Legacy ClientMALC
Maverick Legacy ServerSSHD

Run the Build

Assuming you set that up correctly, your license will be embedded into your final jar file in a suitable location for the API to find it. Every time you build your solution, you will have the most recent license on your account.

If you have chosen one of our Monthly Hotfix subscriptions, this will be an invaluable time saver, ensuring your product has the most recent license for using our APIs in each release.