[DEV] add first realase
This commit is contained in:
parent
1b9c8a212d
commit
213184187f
22
README.md
22
README.md
@ -1,3 +1,25 @@
|
||||
Generic OAuth interface
|
||||
=======================
|
||||
|
||||
|
||||
mvn install
|
||||
|
||||
mvn compile
|
||||
|
||||
mvn package
|
||||
|
||||
// download all dependency in out/maven/dependency
|
||||
mvn dependency:copy-dependencies
|
||||
|
||||
java -cp out/maven/scenarium-oauth-0.1.0.jar io.scenarium.oauth.WebLauncher
|
||||
|
||||
|
||||
// create a single package jar
|
||||
mvn clean compile assembly:single
|
||||
|
||||
|
||||
|
||||
java -cp out/maven/scenarium-oauth-0.1.0-jar-with-dependencies.jar io.scenarium.oauth.WebLauncher
|
||||
|
||||
|
||||
|
||||
|
21
pom.xml
21
pom.xml
@ -1,8 +1,8 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>scenarium-store</groupId>
|
||||
<artifactId>scenarium-store</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<groupId>scenarium</groupId>
|
||||
<artifactId>scenarium-oauth</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<properties>
|
||||
<jaxrs.version>2.1</jaxrs.version>
|
||||
<jersey.version>2.27</jersey.version>
|
||||
@ -120,6 +120,19 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>fully.qualified.MainClass</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Create coverage -->
|
||||
<!--
|
||||
<plugin>
|
||||
@ -153,6 +166,7 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Check the style of the code -->
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
@ -192,6 +206,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Generate Java-docs As Part Of Project Reports -->
|
||||
|
22
release/Dockerfile
Normal file
22
release/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM archlinux:latest
|
||||
|
||||
# update system
|
||||
RUN pacman -Syu --noconfirm && pacman-db-upgrade
|
||||
#install jdk-openjdk java-openjfx
|
||||
RUN pacman -S --noconfirm jdk-openjdk java-openjfx
|
||||
# clean all the caches
|
||||
RUN pacman -Scc --noconfirm
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-14-openjdk
|
||||
ENV JAVAFX_HOME=$JAVA_HOME
|
||||
ENV PATH=/usr/lib/jvm/java-14-openjdk/bin/:$PATH
|
||||
#ENV JAVA_VERSION=14.0.2
|
||||
|
||||
|
||||
RUN mkdir /application/
|
||||
ADD scenarium-oauth.jar /application/
|
||||
WORKDIR /application/
|
||||
|
||||
CMD ["java", "-cp", "/application/scenarium-oauth.jar", "io.scenarium.oauth.WebLauncher"]
|
||||
|
10
release/docker-compose.yaml
Normal file
10
release/docker-compose.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
version: '3'
|
||||
services:
|
||||
Oauth_service:
|
||||
build: .
|
||||
restart: always
|
||||
image: io.scenarium/oauth
|
||||
container_name: io.scenarium.oauth
|
||||
ports:
|
||||
- 17080:17080
|
||||
|
BIN
release/scenarium-oauth.jar
Normal file
BIN
release/scenarium-oauth.jar
Normal file
Binary file not shown.
24
src/io/scenarium/oauth/ConfigVariable.java
Normal file
24
src/io/scenarium/oauth/ConfigVariable.java
Normal file
@ -0,0 +1,24 @@
|
||||
package io.scenarium.oauth;
|
||||
|
||||
public class ConfigVariable {
|
||||
|
||||
public static String getDBHost() {
|
||||
return System.getProperty("io.scenarium.web.oauth.db.host", "localhost");
|
||||
}
|
||||
|
||||
public static String getDBPort() {
|
||||
return System.getProperty("io.scenarium.web.oauth.db.port", "15306");
|
||||
}
|
||||
|
||||
public static String getDBLogin() {
|
||||
return System.getProperty("io.scenarium.web.oauth.db.login", "root");
|
||||
}
|
||||
|
||||
public static String getDBPassword() {
|
||||
return System.getProperty("io.scenarium.web.oauth.db.port", "klkhj456gkgtkhjgvkujfhjgkjhgsdfhb3467465fgdhdesfgh");
|
||||
}
|
||||
|
||||
public static String getDBName() {
|
||||
return System.getProperty("io.scenarium.web.oauth.db.name", "oauth");
|
||||
}
|
||||
}
|
@ -30,6 +30,11 @@ public class WebLauncher {
|
||||
rc.registerClasses(UserResource.class);
|
||||
rc.property(LoggingFeature.LOGGING_FEATURE_LOGGER_LEVEL_SERVER, Level.WARNING.getName());
|
||||
|
||||
dbConfig = new DBConfig(ConfigVariable.getDBHost(),
|
||||
Integer.parseInt(ConfigVariable.getDBPort()),
|
||||
ConfigVariable.getDBLogin(),
|
||||
ConfigVariable.getDBPassword(),
|
||||
ConfigVariable.getDBName());
|
||||
dbConfig = new DBConfig("localhost",
|
||||
15306,
|
||||
"root",
|
||||
|
Loading…
x
Reference in New Issue
Block a user