Building Your Project

This page shows you how to build your project.

Building Action

Please clean and install the project into your local Maven repository using the following command:

$ mvn clean install -Pintegration-test
[...]
[INFO] BUILD SUCCESS
[...]

The parameter -Pintegration-test triggers running the integration tests before installing the build artifacts into the local Maven repository.

If you get an error message instead of BUILD SUCCESS, then please follow it up. If you get lost, please review or contact the users mailing list for help.

Build Artifacts

Building the sample project produces the following artifacts - listed in alphabetic order:

${artifactId}-keygen/src/main/resources/${privateKeyStoreFile}
The private key store - see below.
${artifactId}-keygen/target/${artifactId}-keygen-${version}-standalone.jar
This is the standalone JAR for the Key Generator module. It is generated by bundling the regular JAR with all its dependency JARs. This is convenient to use on the command line because you don’t have to manually add all JARs to the class path. You must not distribute this JAR to users.
${artifactId}-keygen/target/${artifactId}-keygen-${version}.jar
This is the regular JAR for the Key Generator module. This JAR has dependencies on other JARs as specified in the Maven POM for this module. You must not distribute this JAR to users.
${artifactId}-keymgr/src/main/resources/${ftpKeyStoreFile}
The FTP key store - see below.
${artifactId}-keymgr/src/main/resources/${publicKeyStoreFile}
The public key store - see below.
${artifactId}-keymgr/target/${artifactId}-keymgr-${version}-guarded.jar
This is the obfuscated standalone JAR for the Key Manager module. It is generated from the standalone JAR by obfuscating its byte code. This improves security by making attacks on the byte code pretty hard. This is the only JAR which is intended for distribution to users as is.
${artifactId}-keymgr/target/${artifactId}-keymgr-${version}-standalone.jar
This is the standalone JAR for the Key Manager module. It is generated by bundling the regular JAR with all its dependency JARs. This is convenient to use on the command line because you just have to add this JAR to the class path. You should not distribute this JAR to users without additional obfuscation.
${artifactId}-keymgr/target/${artifactId}-keymgr-${version}.jar
This is the regular JAR for the Key Manager module. This JAR has dependencies on other JARs as specified in the Maven POM for this module. You should not distribute this JAR to users without additional obfuscation.
${artifactId}-keymgrsrv/target/${artifactId}-keymgrsrv-${version}.jar
This is the regular JAR for the Key Manager Service module. This JAR has dependencies on other JARs as specified in the Maven POM for this module. You should not distribute this JAR to users.

Generated Key Stores

When you run the build for the very first time, the following key store files are automatically generated:

  • ${artifactId}-keygen/src/main/resources/${privateKeyStoreFile}
  • ${artifactId}-keymgr/src/main/resources/${ftpKeyStoreFile}
  • ${artifactId}-keymgr/src/main/resources/${publicKeyStoreFile}

You can use the following command to inspect the entries in the generated key store files:

$ keytool -list -v -protected \
    -keystore ${keyStorePath} \
    -storetype ${keyStoreType}

… where you need to replace ${keyStorePath} with the respective path of the key store file and ${keyStoreType} with the value of the equal named property in the parent POM file pom.xml, i.e. JCEKS or JKS.

The output of this command will show you a lot of meta data information: The distinguished name of the key pair owner and issuer, the validity period of the certificate etc. However, TrueLicense only reads the key, its digital signature algorithm and its signature - all other meta data is ignored.