Changed compiler compliance to 11, modularized all packages (#29)

* added package- and module-info.java, changed JRE from 8 to 11

* moved ObjectProcessor into the processors package

Co-authored-by: CyB3RC0nN0R <kske@outlook.de>
This commit is contained in:
delvh 2020-03-07 22:04:02 +01:00 committed by GitHub
parent 866c8c1a48
commit a89f0939e8
19 changed files with 108 additions and 54 deletions

View File

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> <classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="optional" value="true"/>
</attributes> <attribute name="maven.pomderived" value="true"/>
</classpathentry> </attributes>
<classpathentry kind="src" output="target/classes" path="src/main/java"> </classpathentry>
<attributes> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attribute name="optional" value="true"/> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="optional" value="true"/>
</attributes> <attribute name="maven.pomderived" value="true"/>
</classpathentry> <attribute name="test" value="true"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> </attributes>
<attributes> </classpathentry>
<attribute name="optional" value="true"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attribute name="maven.pomderived" value="true"/> <attributes>
<attribute name="test" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -9,9 +9,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up JDK 1.8 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 11
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn -B package --file pom.xml

View File

@ -9,9 +9,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warn
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
@ -112,4 +112,4 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=11

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<installed facet="java" version="1.8"/>
<installed facet="jpt.jpa" version="2.1"/> <installed facet="jpt.jpa" version="2.1"/>
<installed facet="java" version="11"/>
</faceted-project> </faceted-project>

21
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>informatik-ag-ngl</groupId> <groupId>informatik-ag-ngl</groupId>
<artifactId>envoy-server-standalone</artifactId> <artifactId>envoy-server-standalone</artifactId>
<version>0.1-alpha</version> <version>0.1-beta</version>
<name>Envoy Server</name> <name>Envoy Server</name>
<url>https://github.com/informatik-ag-ngl/envoy-server-standalone</url> <url>https://github.com/informatik-ag-ngl/envoy-server-standalone</url>
@ -13,8 +13,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
</properties> </properties>
<repositories> <repositories>
@ -28,12 +28,12 @@
<dependency> <dependency>
<groupId>com.github.informatik-ag-ngl</groupId> <groupId>com.github.informatik-ag-ngl</groupId>
<artifactId>envoy-common</artifactId> <artifactId>envoy-common</artifactId>
<version>v0.2-alpha</version> <version>develop-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.informatik-ag-ngl</groupId> <groupId>com.github.informatik-ag-ngl</groupId>
<artifactId>java-nio-server</artifactId> <artifactId>java-nio-server</artifactId>
<version>v0.1-alpha</version> <version>master-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
@ -54,11 +54,20 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
</resource> </resource>
</resources> </resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version> <version>3.2.0</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <phase>package</phase>

View File

@ -0,0 +1,9 @@
/**
* This package contains classes related to persistence.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-alpha
*/
package envoy.server.data;

View File

@ -9,7 +9,7 @@ import com.jenkov.nioserver.IMessageProcessor;
import com.jenkov.nioserver.Message; import com.jenkov.nioserver.Message;
import com.jenkov.nioserver.WriteProxy; import com.jenkov.nioserver.WriteProxy;
import envoy.server.ObjectProcessor; import envoy.server.processors.ObjectProcessor;
/** /**
* Handles incoming objects.<br> * Handles incoming objects.<br>

View File

@ -0,0 +1,9 @@
/**
* This package contains all classes related to client connection management.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-alpha
*/
package envoy.server.net;

View File

@ -0,0 +1,9 @@
/**
* This package contains the class that manages application startup.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy Server Standalone v0.1-alpha
*/
package envoy.server;

View File

@ -5,7 +5,6 @@ import java.util.Arrays;
import envoy.data.Contacts; import envoy.data.Contacts;
import envoy.event.ContactOperationEvent; import envoy.event.ContactOperationEvent;
import envoy.server.ObjectProcessor;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;
import envoy.server.net.ObjectWriteProxy; import envoy.server.net.ObjectWriteProxy;

View File

@ -6,7 +6,6 @@ import java.util.stream.Collectors;
import envoy.data.Contacts; import envoy.data.Contacts;
import envoy.event.ContactSearchRequest; import envoy.event.ContactSearchRequest;
import envoy.event.ContactSearchResult; import envoy.event.ContactSearchResult;
import envoy.server.ObjectProcessor;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.data.User; import envoy.server.data.User;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;

View File

@ -4,7 +4,6 @@ import java.io.IOException;
import envoy.data.IdGenerator; import envoy.data.IdGenerator;
import envoy.event.IdGeneratorRequest; import envoy.event.IdGeneratorRequest;
import envoy.server.ObjectProcessor;
import envoy.server.data.ConfigItem; import envoy.server.data.ConfigItem;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.net.ObjectWriteProxy; import envoy.server.net.ObjectWriteProxy;

View File

@ -12,7 +12,6 @@ import envoy.data.Message.MessageStatus;
import envoy.data.User; import envoy.data.User;
import envoy.data.User.UserStatus; import envoy.data.User.UserStatus;
import envoy.event.HandshakeRejectionEvent; import envoy.event.HandshakeRejectionEvent;
import envoy.server.ObjectProcessor;
import envoy.server.data.Message; import envoy.server.data.Message;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;

View File

@ -5,7 +5,6 @@ import java.util.Date;
import envoy.data.Message; import envoy.data.Message;
import envoy.event.MessageStatusChangeEvent; import envoy.event.MessageStatusChangeEvent;
import envoy.server.ObjectProcessor;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;
import envoy.server.net.ObjectWriteProxy; import envoy.server.net.ObjectWriteProxy;

View File

@ -5,7 +5,6 @@ import java.io.IOException;
import envoy.data.Message.MessageStatus; import envoy.data.Message.MessageStatus;
import envoy.event.MessageStatusChangeEvent; import envoy.event.MessageStatusChangeEvent;
import envoy.exception.EnvoyException; import envoy.exception.EnvoyException;
import envoy.server.ObjectProcessor;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;
import envoy.server.net.ObjectWriteProxy; import envoy.server.net.ObjectWriteProxy;

View File

@ -1,4 +1,4 @@
package envoy.server; package envoy.server.processors;
import java.io.IOException; import java.io.IOException;

View File

@ -4,7 +4,6 @@ import java.io.IOException;
import envoy.data.User.UserStatus; import envoy.data.User.UserStatus;
import envoy.event.UserStatusChangeEvent; import envoy.event.UserStatusChangeEvent;
import envoy.server.ObjectProcessor;
import envoy.server.data.PersistenceManager; import envoy.server.data.PersistenceManager;
import envoy.server.data.User; import envoy.server.data.User;
import envoy.server.net.ConnectionManager; import envoy.server.net.ConnectionManager;

View File

@ -0,0 +1,10 @@
/**
* This package contains all classes that process data received from client
* connections.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy v0.1-alpha
*/
package envoy.server.processors;

View File

@ -0,0 +1,15 @@
/**
* This module contains all classes defining the server application of the Envoy
* project.
*
* @author Kai S. K. Engelbart
* @author Leon Hofmeister
* @author Maximilian K&auml;fer
* @since Envoy Server Standalone v0.1-beta
*/
module envoy.server {
requires transitive envoy.common;
requires transitive java.nio.server;
requires transitive java.persistence;
}