Giter VIP home page Giter VIP logo

truelicense's Introduction

Release Notes Maven Central Apache License 2.0 Build Status

TrueLicense

TrueLicense is an open source engine for license management on the Java Virtual Machine. Due to its functional and modular design, it scales from simple to complex licensing schemas. TrueLicense features various interfaces for managing free trial periods, subscriptions, multiple editions, internationalization, privacy protection and more.

Before version 4, TrueLicense was covered by the GNU Affero General Public License, Version 3. Since version 4, it is covered by the Apache License, Version 2.0.

The old documentation at https://truelicense.net/ is now obsolete and will be updated eventually. In the mean time, please still use it as your reference.

Quick Start

You can generate a sample project using the TrueLicense Maven Archetype as follows:

mvn org.apache.maven.plugins:maven-archetype-plugin:generate \
    -B \
    -DarchetypeGroupId=global.namespace.truelicense-maven-archetype \
    -DarchetypeArtifactId=truelicense-maven-archetype \
    -DarchetypeVersion=4.0.3 \
    -DartifactId=stargazer \
    -Dcompany='Company Inc.' \
    -DgroupId=com.company.product \
    -Dpassword=test1234 \
    -Dsubject='StarGazer 2020' \
    -Dversion=1.0-SNAPSHOT
cd stargazer
chmod +x mvnw
export JAVA_HOME=$(/usr/libexec/java_home -v 11) # for macOS only
./mvnw clean verify

Next, you can generate a license key and save it to the file license.lic like this:

$ java -jar keygen/target/*-keygen-*-standalone.jar generate license.lic -output -
{"consumerAmount":1,"consumerType":"User","holder":"CN=Unknown","issued":1565085418292,"issuer":"CN=Company Inc.","subject":"StarGazer 2020"}

At this point, you will typically transmit the generated license key to your customer and they will install it into your software product. For these purposes, TrueLicense provides many interfaces:

  • There is an application programming interface for generating, installing, verifying and deleting license keys.
  • For the same purposes, there is also a command line interface - you have just used it to generate a license key.
  • There is also a Swing based graphical user interface for installing, verifying and uninstalling license keys.
  • For the same purposes, there is also a REST based web-interface.

For example, you can install the previously generated license key using the graphical user interface like this:

java -jar keymgr/target/*-keymgr-*-guarded.jar wizard

Follow the instructions of the licensing wizard to install and verify the license key which was previously saved to the file license.lic. Eventually, the licensing wizard will show you the properties of the installed license key:

Licensing Wizard Step 4

You have successfully generated, verified and installed a license key. Next, you should examine the code which has been generated by the TrueLicense Maven Archetype in order to learn how the API works and how you can integrate it into your application.

truelicense's People

Contributors

christian-schlichtherle avatar sonersivri avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.