Reeng properties

This commit is contained in:
Claude Brisson
2023-10-29 13:59:03 +01:00
parent eaf2a253d6
commit 8e5450486e
7 changed files with 81 additions and 12 deletions

View File

@@ -59,10 +59,11 @@
<configuration> <configuration>
<scan>0</scan> <scan>0</scan>
<httpConnector> <httpConnector>
<port>8085</port> <host>${pairgoth.api.host}</host>
<port>${pairgoth.api.port}</port>
</httpConnector> </httpConnector>
<webApp> <webApp>
<contextPath>/api/</contextPath> <contextPath>${pairgoth.api.context}/</contextPath>
</webApp> </webApp>
</configuration> </configuration>
</plugin> </plugin>

View File

@@ -6,5 +6,5 @@ CSSWATCH=$!
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5006" export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5006"
#mvn --projects view-webapp -Dpairgoth.api.url=http://localhost:8085/api/ package jetty:run #mvn --projects view-webapp -Dpairgoth.api.url=http://localhost:8085/api/ package jetty:run
mvn -o --projects view-webapp package jetty:run mvn -DskipTests=true --projects view-webapp package jetty:run
kill $CSSWATCH kill $CSSWATCH

55
pom.xml
View File

@@ -78,6 +78,39 @@
</repository> </repository>
</repositories> </repositories>
<profiles>
<profile>
<id>manual-properties</id>
<activation>
<file>
<exists>pairgoth.properties</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>pairgoth.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
@@ -109,6 +142,28 @@
<kotlin.code.style>official</kotlin.code.style> <kotlin.code.style>official</kotlin.code.style>
<kotlin.compiler.jvmTarget>10</kotlin.compiler.jvmTarget> <kotlin.compiler.jvmTarget>10</kotlin.compiler.jvmTarget>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental> <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<!-- pairgoth default properties -->
<pairgoth.env>dev</pairgoth.env>
<pairgoth.webapp.protocol>http</pairgoth.webapp.protocol>
<pairgoth.webapp.host>localhost</pairgoth.webapp.host>
<pairgoth.webapp.port>8080</pairgoth.webapp.port>
<pairgoth.webapp.context>/</pairgoth.webapp.context>
<pairgoth.webapp.external.url>http://localhost:8080</pairgoth.webapp.external.url>
<pairgoth.api.protocol>http</pairgoth.api.protocol>
<pairgoth.api.host>localhost</pairgoth.api.host>
<pairgoth.api.port>8085</pairgoth.api.port>
<pairgoth.api.context>/api</pairgoth.api.context>
<pairgoth.api.external.url>http://localhost:8085/api</pairgoth.api.external.url>
<pairgoth.store>file</pairgoth.store>
<pairgoth.store.file.path>tournamentfiles</pairgoth.store.file.path>
<pairgoth.smtp.sender></pairgoth.smtp.sender>
<pairgoth.smtp.host></pairgoth.smtp.host>
<pairgoth.smtp.port>587</pairgoth.smtp.port>
<pairgoth.smtp.user></pairgoth.smtp.user>
<pairgoth.smtp.password></pairgoth.smtp.password>
<pairgoth.logger.level>info</pairgoth.logger.level>
<pairgoth.logger.format>[%level] %ip [%logger] %message</pairgoth.logger.format>
</properties> </properties>
<modules> <modules>

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005" export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005"
mvn -DskipTests --projects api-webapp package jetty:run mvn -DskipTests=true --projects api-webapp package jetty:run

View File

@@ -3,4 +3,4 @@
# debug version # debug version
# mvn package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006 -jar application/target/pairgoth-engine.jar # mvn package && java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006 -jar application/target/pairgoth-engine.jar
mvn -DskipTests package && java -jar application/target/pairgoth-engine.jar mvn -DskipTests=true package && java -jar application/target/pairgoth-engine.jar

View File

@@ -99,12 +99,13 @@
<configuration> <configuration>
<scan>1</scan> <scan>1</scan>
<httpConnector> <httpConnector>
<port>8080</port> <host>${pairgoth.webapp.host}</host>
<port>${pairgoth.webapp.port}</port>
</httpConnector> </httpConnector>
<!-- <!--
<systemProperties> <systemProperties>
<pairgoth.api.url>${webapp.url}</pairgoth.api.url> <pairgoth.api.url>${pairgoth.api.url}</pairgoth.api.url>
<pairgoth.env>${webapp.env}</pairgoth.env> <pairgoth.env>${pairgoth.env}</pairgoth.env>
</systemProperties> </systemProperties>
--> -->
<webApp> <webApp>

View File

@@ -1,7 +1,19 @@
# webapp # environment
webapp.env = dev env = dev
webapp.url = https://localhost:8080
api.url = https://localhost:8085/api # webapp connector
webapp.protocol = http
webapp.interface = localhost
webapp.port = 8080
webapp.context = /
webapp.external.url = http://localhost:8080
# api connector
api.protocol = http
api.interface = localhost
api.port = 8085
api.context = /api
api.external.url = http://localhost:8085/api
# store # store
store = file store = file