Exploring Your Project

This page shows you what’s in your generated project.

Structure

The directory generated in the previous step contains a multi-module Maven project with the following structure:

$ tree
.
├── ${artifactId}-keygen
│   ├── pom.xml
│   └── src
│       ├── main
│       │   ├── filtered
│       │   │   └── ${packageInPathFormat}
│       │   │       └── keygen
│       │   │           └── Main.properties
│       │   └── java
│       │       └── ${packageInPathFormat}
│       │           └── keygen
│       │               ├── LicenseManager.java.vtl
│       │               ├── LicensingSchema.java.vtl
│       │               └── Main.java.vtl
│       └── test
│           └── java
│               └── ${packageInPathFormat}
│                   └── keygen
│                       └── MainIT.java.vtl
├── ${artifactId}-keymgr
│   ├── pom.xml
│   └── src
│       ├── main
│       │   ├── filtered
│       │   │   └── ${packageInPathFormat}
│       │   │       └── keymgr
│       │   │           └── Main.properties
│       │   └── java
│       │       └── ${packageInPathFormat}
│       │           └── keymgr
│       │               ├── LicenseManager.java.vtl
│       │               ├── LicensingSchema.java.vtl
│       │               └── Main.java.vtl
│       └── test
│           ├── java
│           │   └── ${packageInPathFormat}
│           │       └── keymgr
│           │           ├── LicensingSchemaIT.java.vtl
│           │           └── MainIT.java.vtl
│           └── resources
├── ${artifactId}-keymgrsrv
│   ├── pom.xml
│   └── src
│       ├── main
│       │   └── java
│       │       └── ${packageInPathFormat}
│       │           └── keymgrsrv
│       │               └── LicenseConsumerManagerResolver.java
│       └── test
│           └── java
│               └── ${packageInPathFormat}
│                   └── keymgrsrv
│                       └── Main.java
└── pom.xml

53 directories, 17 files

… where ${packageInPathFormat} is like ${package}, but with / instead of . characters.

Overview

Following is an overview of the generated files and sub-directories. In these definitions, the pattern ** refers to any valid directory path name, whereas * refers to any substring of any single path name element:

**/pom.xml
These are the Maven POM files for the respective Maven modules in the matched directories.
pom.xml
The Maven file in the top level directory is colloquially called the parent POM. The parent POM defines useful defaults for use by the other Maven POM files. For example, it contains a section with properties which configure the algorithms and parameters used by the generated licensing schema classes.
**/*.java.vtl
These are Apache Velocity template files for generating Java source files. Each template file is merged with all Maven properties into a Java source file by the TrueLicense Maven Plugin. The TrueLicense Maven Plugin is added to the build lifecycle in the Maven POM (**/pom.xml) files.
${artifactId}-keygen
This directory contains the module with the code required to generate license keys for your software product.
This module needs to be kept under lock and key - you must not distribute it!
${artifactId}-keygen/src/main/java/${package}/keygen/LicenseManager.java.vtl
This file defines the part of the licensing schema for use within the license key generator - see page Using the API.
${artifactId}-keygen/src/main/java/${package}/keygen/LicensingSchema.java.vtl
Deprecated - provided for compatibility only. You can ignore this file if you’re not upgrading your software product from an older version of the TrueLicense Maven Archetype.
${artifactId}-keymgr
This directory contains the module with the code required to consume license keys within your software product. This module is supposed to be bundled with your software product as a library that your software product depends upon for installing, loading, verifying or uninstalling license keys.
You must obfuscate this module and its dependencies in order to prevent your software product from being vulnerable to an attack where the original TrueLicense Core JAR would be replaced with a stub! A configuration for ProGuard is included in the Maven POM for this module which is used to generate an obfuscated version of the standalone JAR of this module - see page Using the CLI.
${artifactId}-keymgr/src/main/java/${package}/keymgr/LicenseManager.java.vtl
This file defines the part of the licensing schema for use within your software product - see page Using the API.
${artifactId}-keymgr/src/main/java/${package}/keymgr/LicensingSchema.java.vtl
Deprecated - provided for compatibility only. You can ignore this file if you’re not upgrading your software product from an older version of the TrueLicense Maven Archetype.
${artifactId}-keymgrsrv
This directory contains the module with the code to provide a RESTful web service for license management in your software product. You can ignore this module if your application is not a server application or if you don’t want to expose an API for license management via a RESTful web service in your software product.