A command-line tool for generating licenses. Usage is as follows:
To view usage and help:
ConsoleLicenseGenerator -help
To specify just config properties and be prompted for license properties:
ConsoleLicenseGenerator -config
To specify just license properties and be prompted for config properties:
ConsoleLicenseGenerator -license
To specify all options via properties files:
ConsoleLicenseGenerator -config -license
The ConsoleLicenseGenerator expects to be passed the path to two properties files, or one of them, or neither.
The "config" properties file contains information necessary to generate all licenses (key paths, passwords, etc.)
and generally will not need to change. The "license" properties file contains all of the information you need to
generate this particular license. See the Javadoc API documentation for information about the contents of these two
files.
If you do not specify the "config" properties file, you will be prompted to provide the values that were expected in
that file. Likewise, if you do not specify the "license" properties file, you will be prompted to provide the values
that were expected in that file.
Required Config Properties File Properties
net.nicholaswilliams.java.licensing.privateKeyFile=[The path to the file containing the encrypted private key; either this or net.nicholaswilliams.java.licensing.privateKeyClass must be specified.]
net.nicholaswilliams.java.licensing.privateKeyProvider=[The fully-qualified (canonical) name of the implementation of PrivateKeyDataProvider; either this or net.nicholaswilliams.java.licensing.privateKeyFile must be specified.]
net.nicholaswilliams.java.licensing.privateKeyPassword=[The password for decrypting the private key; either this or net.nicholaswilliams.java.licensing.privateKeyPasswordClass must be specified.]
net.nicholaswilliams.java.licensing.privateKeyPasswordProvider=[The fully-qualified (canonical) name of the implementation of PasswordProvider that provides the private key password; either this or net.nicholaswilliams.java.licensing.privateKeyPassword must be specified]
License Properties File Properties (Specify only those that you wish to include in the license)
net.nicholaswilliams.java.licensing.productKey=[The product key/serial number (String) for this license]
net.nicholaswilliams.java.licensing.holder=[The holder (String) for this license]
net.nicholaswilliams.java.licensing.issuer=[The issuer (String) for this license]
net.nicholaswilliams.java.licensing.subject=[The subject (String) for this license]
net.nicholaswilliams.java.licensing.issueDate=[The date this license was issued (defaults to the current date/time), format: YYYY-MM-DD hh:mm:ss in 24-hour time]
net.nicholaswilliams.java.licensing.goodAfterDate=[The date this license becomes active, format: YYYY-MM-DD hh:mm:ss in 24-hour time]
net.nicholaswilliams.java.licensing.goodBeforeDate=[The date this license expires, format: format: YYYY-MM-DD hh:mm:ss in 24-hour time]
net.nicholaswilliams.java.licensing.numberOfLicenses=[The seats/users/number of licenses this license is good for]
net.nicholaswilliams.java.licensing.features.MY_FEATURE=[Feature expiration date for "MY_FEATURE", format: YYYY-MM-DD hh:mm:ss in 24-hour time or "none"]
net.nicholaswilliams.java.licensing.features.ANOTHER_FEATURE=[Feature expiration date for "ANOTHER_FEATURE", format: YYYY-MM-DD hh:mm:ss in 24-hour time or "none"]
You can specify any arbitrary number of features (and their expiration date) using multiple properties that start
with
net.nicholaswilliams.java.licensing.features. The last part of the property key should be the
feature name. The value should either be "none" or the date the feature expires (YYYY-MM-DD hh:mm:ss in 24-hour
time).
NOTE: The default behavior is to encrypt the resulting license with the password or password provider
specified in the config properties file. To override this and use a different password to encrypt the license,
add
net.nicholaswilliams.java.licensing.password=[encryption password] to the license properties
file.
NOTE: The default behavior is to print the resulting license, Base64-encoded, to standard out. Instead, you
can write the raw, binary license data to a specific file with the property
net.nicholaswilliams.java.licensing.licenseFile=[file name].