Skip to content

Commit

Permalink
Merge pull request #9 from eSolutionsGrup/feature/upgrade_dependencie…
Browse files Browse the repository at this point in the history
…s_and_java_17_upgrade

- compatibility with java 17 & dependencies update
  • Loading branch information
mariusstaicu authored Oct 11, 2023
2 parents 0bdc823 + a5e3286 commit c8eb553
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: java
jdk: oraclejdk8
jdk: openjdk17
script: mvn -B -V clean install
1 change: 1 addition & 0 deletions base/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
license-manager-base.iml
target
4 changes: 2 additions & 2 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>ro.esolutions</groupId>
<artifactId>license-manager</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</parent>

<artifactId>license-manager-base</artifactId>
Expand All @@ -43,4 +43,4 @@
<artifactId>commons-io</artifactId>
</dependency>
</dependencies>
</project>
</project>
3 changes: 2 additions & 1 deletion core/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
license-manager-core.iml
license-manager-core.iml
target
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>ro.esolutions</groupId>
<artifactId>license-manager</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</parent>

<artifactId>license-manager-core</artifactId>
Expand Down Expand Up @@ -51,4 +51,4 @@
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* @author Nick Williams
* @version 1.0.2
* @see LicenseSecurityManager
* @see InsecureEnvironmentException
* @see InsecureEnvironmentError
* @since 1.0.0
*/
public final class LicenseManager {
Expand Down Expand Up @@ -80,7 +80,7 @@ private LicenseManager() {
try {
Class.forName("ro.esolutions.licensing.LicenseSecurityManager");
} catch (final ClassNotFoundException e) {
throw new InsecureEnvironmentException("The class ro.esolutions.licensing.LicenseSecurityManager could not be initialized.", e);
throw new InsecureEnvironmentError("The class ro.esolutions.licensing.LicenseSecurityManager could not be initialized.", e);
}

int cacheTimeInMinutes = LicenseManagerProperties.getCacheTimeInMinutes();
Expand All @@ -104,7 +104,7 @@ private LicenseManager() {
* licenseProvider}, {@link LicenseManagerProperties#setPublicKeyPasswordProvider(PasswordProvider)
* publicKeyPasswordProvider} or {@link LicenseManagerProperties#setPublicKeyDataProvider(PublicKeyDataProvider)
* publicKeyDataProvider} are null.
* @throws InsecureEnvironmentException if the {@link LicenseSecurityManager} cannot be instantiated
* @throws InsecureEnvironmentError if the {@link LicenseSecurityManager} cannot be instantiated
* @see LicenseSecurityManager for more information on the security features that protect the license manager
*/
public static synchronized LicenseManager getInstance() {
Expand Down
385 changes: 230 additions & 155 deletions core/src/main/java/ro/esolutions/licensing/LicenseSecurityManager.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class InsecureEnvironmentException extends Error {
public class InsecureEnvironmentError extends Error {

public InsecureEnvironmentException(final String message,final Throwable cause) {
public InsecureEnvironmentError(final String message, final Throwable cause) {
super("The license manager was activated in an insecure environment. " + message, cause);
}

public InsecureEnvironmentException(final SecurityException cause) {
public InsecureEnvironmentError(final SecurityException cause) {
super("The license manager was activated in an insecure environment. A security manager has already been " +
"installed, but it allows reflection access to the license cache and doesn't allow a new security " +
"manager to be installed.", cause);
Expand Down
58 changes: 30 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<packaging>pom</packaging>

<name>License Manager</name>
<version>1.0.2</version>
<version>1.0.3</version>
<description>
License Manager - A Java-based licensing tool for licensing commercial applications.
</description>
Expand All @@ -42,9 +42,9 @@
<name>Marius Staicu</name>
<email>[email protected]</email>
<organization>eSolutions Grup</organization>
<organizationUrl>http://www.esolutions.ro</organizationUrl>
<organizationUrl>https://www.esolutions.ro</organizationUrl>
<roles>
<role>architect</role>
<role>software engineer</role>
</roles>
<timezone>Romania/Bucharest</timezone>
</developer>
Expand All @@ -53,7 +53,7 @@
<name>Virgil Borcea</name>
<email>[email protected]</email>
<organization>eSolutions Grup</organization>
<organizationUrl>http://www.esolutions.ro</organizationUrl>
<organizationUrl>https://www.esolutions.ro</organizationUrl>
<roles>
<role>software engineer</role>
</roles>
Expand All @@ -67,60 +67,49 @@

<url>https://github.com/eSolutionsGrup/license-manager</url>
<scm>
<url>https://github.com/eSolutionsGrup/license-manager/</url>
<connection>https://github.com/eSolutionsGrup/license-manager.git</connection>
<developerConnection>https://github.com/eSolutionsGrup/license-manager.git/</developerConnection>
<url>https://github.com/eSolutionsGrup/license-manager</url>
<connection>scm:git:https://github.com/eSolutionsGrup/license-manager.git</connection>
<developerConnection>scm:git:https://github.com/eSolutionsGrup/license-manager.git</developerConnection>
</scm>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<commons-codec.version>1.7</commons-codec.version>
<commons-io.version>2.4</commons-io.version>
<commons-lang.version>2.4</commons-lang.version>
<guava.version>20.0</guava.version>
<asm.version>4.1</asm.version>

<!-- Plugins-->
<maven.gpg.version>1.6</maven.gpg.version>
<maven.source.plugin>3.0.1</maven.source.plugin>
<maven.javadoc.plugin>2.10.4</maven.javadoc.plugin>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
<version>1.15</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
<version>2.6</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<version>31.1-jre</version>
</dependency>

<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
<version>9.4</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand All @@ -136,6 +125,19 @@
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
Expand All @@ -144,7 +146,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.version}</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -158,7 +160,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin}</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -171,7 +173,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin}</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -185,4 +187,4 @@
</build>
</profile>
</profiles>
</project>
</project>

0 comments on commit c8eb553

Please sign in to comment.