Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schlichtherle committed Feb 28, 2018
2 parents d6d2273 + bf6ac92 commit 4d56969
Show file tree
Hide file tree
Showing 38 changed files with 187 additions and 259 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[![Build Status](https://api.travis-ci.org/christian-schlichtherle/truelicense.svg)](https://travis-ci.org/christian-schlichtherle/truelicense)
[![Maven Central](https://img.shields.io/maven-central/v/net.truelicense/truelicense.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.truelicense%22)

# TrueLicense
# TrueLicense [![Maven Central](https://img.shields.io/maven-central/v/net.truelicense/truelicense.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.truelicense%22) [![Build Status](https://api.travis-ci.org/christian-schlichtherle/truelicense.svg)](https://travis-ci.org/christian-schlichtherle/truelicense)

TrueLicense is a commercial open source engine for license management on the Java Virtual Machine.
Due to its functional and modular design TrueLicense scales from simple to complex licensing schemas.
Expand Down
33 changes: 19 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<parent>
<groupId>net.java.truecommons</groupId>
<artifactId>truecommons-parent</artifactId>
<version>119</version>
<version>120</version>
</parent>

<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<packaging>pom</packaging>

<name>TrueLicense</name>
Expand Down Expand Up @@ -77,10 +77,9 @@
<maven.enforcer.requireMavenVersion>3.5.0</maven.enforcer.requireMavenVersion>
<maven.enforcer.requireJavaVersion>${maven.compiler.source}</maven.enforcer.requireJavaVersion>

<maven.version>3.3.9</maven.version>
<maven.version>3.5.2</maven.version>

<!-- maven-javadoc-plugin -->
<additionalparam>--allow-script-in-comments</additionalparam>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<googleAnalyticsAccountId>UA-28191662-1</googleAnalyticsAccountId>
<header><![CDATA[
Expand All @@ -105,8 +104,8 @@
<truelicense.obfuscate.scope>all</truelicense.obfuscate.scope>

<!-- dependencies -->
<jackson.version>2.9.1</jackson.version>
<javaee.version>7.0</javaee.version>
<jackson.version>2.9.4</jackson.version>
<javaee.version>8.0</javaee.version>
</properties>

<modules>
Expand Down Expand Up @@ -223,7 +222,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
Expand Down Expand Up @@ -284,7 +283,7 @@
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.3</version>
<version>3.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -334,6 +333,13 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<additionalOptions>--allow-script-in-comments</additionalOptions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5</version>
Expand Down Expand Up @@ -365,7 +371,7 @@
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.7.0-14</version>
<version>9.8.0-8</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -376,11 +382,12 @@
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.7.0</version>
<version>1.9.0</version>
<configuration>
<gitFlowConfig>
<versionTagPrefix>truelicense-</versionTagPrefix>
</gitFlowConfig>
<skipTestProject>true</skipTestProject>
</configuration>
</plugin>
</plugins>
Expand All @@ -400,11 +407,9 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.0.0</version>
<configuration>
<links>
<link>http://commons.apache.org/codec/apidocs/</link>
</links>
<additionalOptions>--allow-script-in-comments</additionalOptions>
</configuration>
<reportSets>
<reportSet />
Expand Down
2 changes: 1 addition & 1 deletion truelicense-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion truelicense-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ protected final SecretKey secretKey(final PasswordUsage usage) throws Exception
try (Password password = protection().password(usage)) {
final PBEKeySpec ks = new PBEKeySpec(password.characters());
try {
return SecretKeyFactory
.getInstance(algorithm())
.generateSecret(ks);
return SecretKeyFactory.getInstance(algorithm()).generateSecret(ks);
} finally {
ks.clearPassword();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ public final class ObfuscatedPasswordProtection implements PasswordProtection {

private final ObfuscatedString os;

public ObfuscatedPasswordProtection(final ObfuscatedString os) {
this.os = Objects.requireNonNull(os);
}
public ObfuscatedPasswordProtection(final ObfuscatedString os) { this.os = Objects.requireNonNull(os); }

@Override public Password password(PasswordUsage usage) {
return new ObfuscatedPassword();
}
@Override
public Password password(PasswordUsage usage) { return new ObfuscatedPassword(); }

private final class ObfuscatedPassword implements Password {

Expand Down
2 changes: 1 addition & 1 deletion truelicense-dto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-dto</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion truelicense-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-it</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion truelicense-jax-rs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-jax-rs</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion truelicense-jsf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-jsf</artifactId>
Expand Down
35 changes: 1 addition & 34 deletions truelicense-maven-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.truelicense</groupId>
<artifactId>truelicense</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</parent>

<artifactId>truelicense-maven-archetype</artifactId>
Expand Down Expand Up @@ -320,38 +320,5 @@
</plugins>
</build>
</profile>
<profile>
<id>generate-json-properties</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-test-sources</id>
<configuration>
<transformationSets>
<transformationSet>
<dir>${test-projects-directory}</dir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>json</targetExtension>
</fileMapper>
</fileMappers>
<includes>
<include>**/archetype.xml</include>
</includes>
<outputDir>${project.build.testOutputDirectory}/projects</outputDir>
<stylesheet>${test-projects-directory}/archetype-json.xsl</stylesheet>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
~ Copyright (C) 2005-2017 Schlichtherle IT Services.
~ All rights reserved. Use is subject to license terms.
-->
<!DOCTYPE stylesheet [
<!-- Use whatever line separator is used in this document: CR, LF or CRLF. -->
<!ENTITY lineSeparator "
">
]>
<xsl:stylesheet
exclude-result-prefixes="d xs"
version="1.0"
Expand All @@ -16,22 +11,42 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output indent="yes"/>

<xsl:template match="/d:archetype-descriptor/d:requiredProperties">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:for-each select="document('../../archetype-properties.xsd')/xs:schema/xs:complexType[@name = 'List']/xs:all/xs:element">
<xsl:text>&lineSeparator; </xsl:text>
<xsl:variable name="schema" select="document('../../archetype-properties.xsd')/xs:schema"/>
<xsl:for-each select="$schema/xs:complexType[@name = 'List']/xs:all/xs:element">
<requiredProperty key="{@name}">
<xsl:if test="@default">
<xsl:text>&lineSeparator; </xsl:text>
<defaultValue>
<xsl:value-of select="@default"/>
</defaultValue>
<xsl:text>&lineSeparator; </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="@name = 'editions'">
<validationRegex>([A-Za-z_$][A-Za-z0-9_$]*\s*)+</validationRegex>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="type" select="substring-after(@type, ':')"/>
<xsl:variable name="enumerationValues" select="$schema/xs:simpleType[@name = $type]/xs:restriction/xs:enumeration/@value"/>
<xsl:if test="$enumerationValues">
<validationRegex>
<xsl:for-each select="$enumerationValues">
<xsl:if test="position() != 1">
<xsl:text>|</xsl:text>
</xsl:if>
<xsl:text>\Q</xsl:text>
<xsl:value-of select="."/>
<xsl:text>\E</xsl:text>
</xsl:for-each>
</validationRegex>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</requiredProperty>
</xsl:for-each>
<xsl:text>&lineSeparator; </xsl:text>
</xsl:copy>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,12 @@
<xs:restriction base="xs:token">
<xs:enumeration value="auto"/>
<xs:enumeration value="PBEWithMD5AndDES"/>
<xs:enumeration value="PBEWithMD5AndTripleDES"/>
<xs:enumeration value="PBEWithSHA1AndDESede"/>
<xs:enumeration value="PBEWithSHA1AndRC2_40"/>
<xs:enumeration value="PBEWithSHA1AndRC2_128"/>
<xs:enumeration value="PBEWithSHA1AndRC4_40"/>
<xs:enumeration value="PBEWithSHA1AndRC4_128"/>
<xs:enumeration value="PBEWithHmacSHA1AndAES_128"/>
<xs:enumeration value="PBEWithHmacSHA224AndAES_128"/>
<xs:enumeration value="PBEWithHmacSHA256AndAES_128"/>
Expand Down Expand Up @@ -719,6 +724,8 @@
<xs:enumeration value="SHA384withECDSA"/>
<xs:enumeration value="SHA512withECDSA"/>
<xs:enumeration value="NONEwithRSA"/>
<xs:enumeration value="MD2withRSA"/>
<xs:enumeration value="MD5withRSA"/>
<xs:enumeration value="SHA1withRSA"/>
<xs:enumeration value="SHA224withRSA"/>
<xs:enumeration value="SHA256withRSA"/>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.0.0</version>
<configuration>
<version>${dollar}{javadoc.version}</version>
</configuration>
Expand Down Expand Up @@ -486,7 +486,7 @@
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>5.3.3</version>
<version>6.0</version>
</dependency>
</dependencies>
<executions>
Expand Down
Loading

0 comments on commit 4d56969

Please sign in to comment.