mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
380 lines
17 KiB
XML
380 lines
17 KiB
XML
<?xml version="1.0" encoding="UTF-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 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>org.mage</groupId>
|
|
<artifactId>mage-root</artifactId>
|
|
<version>1.4.58</version>
|
|
<packaging>pom</packaging>
|
|
<name>Mage Root</name>
|
|
<description>Mage Root POM</description>
|
|
|
|
<properties>
|
|
<!-- app: game must be able to run under java 8 -->
|
|
<java.version>1.8</java.version>
|
|
<root.dir>${project.basedir}</root.dir>
|
|
|
|
<!-- TODO: research and optimize version in modules (version change for modules and server configs must be changeable by one line instead perl script -->
|
|
<mage-version>1.4.58</mage-version>
|
|
<argLine>-Dfile.encoding=UTF-8</argLine>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
|
|
|
|
<!-- build: logs settings for maven tests and travis ci builds -->
|
|
<xmage.build.tests.treeViewRunnerShowAllLogs>false</xmage.build.tests.treeViewRunnerShowAllLogs>
|
|
|
|
<!--
|
|
report: code coverage tools (disabled by default)
|
|
|
|
Output file formats:
|
|
* exec-files - generates in any runs, can be used by IntelliJ IDEA in show coverage data dialog: ./module_name/target/jacoco.exec
|
|
* XML - used by sonar for analysis and upload: ./Mage.Reports/target/site/jacoco-aggregate/jacoco.xml
|
|
* HTML - used by devs for offline view: ./Mage.Reports/target/site/jacoco-aggregate/index.html
|
|
* CSV - for something else: ./Mage.Reports/target/site/jacoco-aggregate/jacoco.csv
|
|
|
|
How to generate execute stats and reports:
|
|
* for IDE or sonar usage: mvn install -Djacoco.formats=XML -Djacoco.skip=false -Dmaven.test.failure.ignore=true
|
|
* for offline report: mvn install -Djacoco.skip=false -Dmaven.test.failure.ignore=true
|
|
-->
|
|
<jacoco.formats>XML,HTML</jacoco.formats>
|
|
<jacoco.skip>true</jacoco.skip>
|
|
|
|
<!--
|
|
report: sonar settings for code static analysis and coverage report
|
|
Actual analys visible on https://sonarcloud.io/project/overview?id=magefree_mage
|
|
|
|
How to analyse and upload to the server (warning, it can takes 15+ hours):
|
|
1. Collect code coverage data in xml format (see jacoco above);
|
|
2. mvn -e sonar:sonar -Dsonar.projectKey=magefree_mage -Dsonar.organization=magefree -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=xxx
|
|
-->
|
|
<sonar.coverage.jacoco.xmlReportPaths>${root.dir}/Mage.Reports/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
|
|
</properties>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<configuration>
|
|
<encoding>UTF-8</encoding>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- default manifest settings (parent) -->
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Built-By>MageTeam</Built-By>
|
|
<Build-Time>${maven.build.timestamp}</Build-Time>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!--
|
|
JaCoCo Code Coverage support
|
|
Agent must be injected for all modules, but real report generates in Mage.Reports
|
|
-->
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>0.8.11</version>
|
|
<executions>
|
|
<execution>
|
|
<!-- prepare command line to inject in java agent (collect code executing stats) -->
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>${java.version}</source>
|
|
<target>${java.version}</target>
|
|
<encoding>UTF-8</encoding>
|
|
<!--
|
|
Because of known error in maven-compiler-plugin 3.2 useIncrementalCompilation is inverted
|
|
so remove this arg with update that fixes the problem
|
|
https://jira.codehaus.org/browse/MCOMPILER-209
|
|
-->
|
|
<useIncrementalCompilation>false</useIncrementalCompilation>
|
|
<!-- <compilerArgument>-Xlint:all</compilerArgument> -->
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<!-- test runner for maven, travis-ci (IDE uses own test runner) -->
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.1.2</version>
|
|
<dependencies>
|
|
<!-- tree reporter deps -->
|
|
<dependency>
|
|
<groupId>me.fabriciorby</groupId>
|
|
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
|
|
<version>1.2.1</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<!-- ******************** -->
|
|
<!-- default plain report -->
|
|
<!-- ******************** -->
|
|
<!--
|
|
printSummary: print elapsed time and other stats per test file
|
|
- if you disable this, you will not be able to trace the name of the test
|
|
from where the logs are printed
|
|
- failed tests will be shown anyway
|
|
-->
|
|
<printSummary>true</printSummary>
|
|
|
|
<!--
|
|
reportFormat: summary format
|
|
- brief: print total elapsed time only
|
|
- plain: print brief + elapsed time for each test name
|
|
-->
|
|
<reportFormat>brief</reportFormat>
|
|
|
|
<!--
|
|
useFile: enable txt and xml reports in .\target\surefire-reports
|
|
- useless, so disable it for more performance
|
|
-->
|
|
<useFile>false</useFile>
|
|
|
|
<!-- **************** -->
|
|
<!-- tree view report -->
|
|
<!-- **************** -->
|
|
<!-- for full logs: use xmage.build.tests.treeViewRunnerShowAllLogs -->
|
|
<!-- for ai logs in ci build: use .travis/log4j.properties -->
|
|
<!-- for default maven logs: delete or comment all settings below -->
|
|
<consoleOutputReporter>
|
|
<disable>true</disable>
|
|
</consoleOutputReporter>
|
|
<statelessTestsetInfoReporter
|
|
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
|
|
<theme>ASCII</theme>
|
|
<printStacktraceOnError>true</printStacktraceOnError>
|
|
<printStacktraceOnFailure>true</printStacktraceOnFailure>
|
|
<printStdoutOnError>true</printStdoutOnError>
|
|
<printStdoutOnFailure>true</printStdoutOnFailure>
|
|
<printStdoutOnSuccess>${xmage.build.tests.treeViewRunnerShowAllLogs}</printStdoutOnSuccess>
|
|
<printStderrOnError>true</printStderrOnError>
|
|
<printStderrOnFailure>true</printStderrOnFailure>
|
|
<printStderrOnSuccess>${xmage.build.tests.treeViewRunnerShowAllLogs}</printStderrOnSuccess>
|
|
</statelessTestsetInfoReporter>
|
|
|
|
<!-- for compatible with jacoco code coverage - argLine moved to properties section
|
|
<argLine>-Dfile.encoding=UTF-8</argLine>
|
|
-->
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-install-plugin</artifactId>
|
|
<version>2.5.2</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
<version>2.7</version>
|
|
</plugin>
|
|
|
|
<!-- devs only: allows to run apps from command line by exec:java command -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>3.0.0</version>
|
|
</plugin>
|
|
|
|
<!-- generate readable readme file for releases -->
|
|
<!-- results uses in distribution.xml -->
|
|
<!-- https://github.com/walokra/markdown-page-generator-plugin -->
|
|
<plugin>
|
|
<groupId>com.ruleoftech</groupId>
|
|
<artifactId>markdown-page-generator-plugin</artifactId>
|
|
<version>2.4.0</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<inputDirectory>../</inputDirectory>
|
|
<inputFileExtensions>md</inputFileExtensions>
|
|
<outputDirectory>${project.build.directory}/docs</outputDirectory>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
|
|
<modules>
|
|
<module>Mage</module>
|
|
<module>Mage.Common</module>
|
|
<module>Mage.Server</module>
|
|
<module>Mage.Sets</module>
|
|
<module>Mage.Client</module>
|
|
<module>Mage.Plugins</module>
|
|
<module>Mage.Server.Plugins</module>
|
|
<module>Mage.Server.Console</module>
|
|
<module>Mage.Tests</module>
|
|
<module>Mage.Verify</module>
|
|
<module>Mage.Reports</module>
|
|
</modules>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>jboss-public-repository</id>
|
|
<name>JBoss Repository</name>
|
|
<url>https://repository.jboss.org/nexus/content/groups/public</url>
|
|
<!-- These optional flags are designed to speed up your builds by reducing remote server calls -->
|
|
<releases>
|
|
<updatePolicy>never</updatePolicy>
|
|
</releases>
|
|
<snapshots>
|
|
<updatePolicy>daily</updatePolicy>
|
|
</snapshots>
|
|
</repository>
|
|
<repository>
|
|
<id>local-project-repo</id>
|
|
<url>file://${basedir}/repository</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencies>
|
|
<!-- GLOBAL dependencies - used in all xmage modules (no need to add it to child modules) -->
|
|
<dependency>
|
|
<!-- logs support (log4j as engine + slf4j as facade) -->
|
|
<!-- TODO: migrate from log4j to logback code usage (see SLF4J Migrator http://www.slf4j.org/migrator.html) -->
|
|
<!-- TODO: migrate log4j configs to logback xml (see properties to xml translation http://logback.qos.ch/translator/ -->
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-reload4j</artifactId>
|
|
<version>2.0.17</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<!-- database support - ORM -->
|
|
<groupId>com.j256.ormlite</groupId>
|
|
<artifactId>ormlite-jdbc</artifactId>
|
|
<version>5.7</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- database support - H2 db engine (main db) -->
|
|
<!-- WARNING, do not update db engine (stable: 1.4.197) cause compatibility issues, see https://github.com/h2database/h2database/issues/2078 -->
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<version>1.4.197</version>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<!-- junit 4 tests -->
|
|
<groupId>org.junit.vintage</groupId>
|
|
<artifactId>junit-vintage-engine</artifactId>
|
|
<version>5.8.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- junit 5 tests -->
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>5.8.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- write asserts in unit tests like a real language -->
|
|
<groupId>org.assertj</groupId>
|
|
<artifactId>assertj-core</artifactId>
|
|
<version>3.21.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<dependencyManagement>
|
|
<!-- OTHER dependencies - you must add it to child modules manually (copy groupId and artifactId without scope and version) -->
|
|
<!-- write shared libs from all childs here to version control -->
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>javax.xml.bind</groupId>
|
|
<artifactId>jaxb-api</artifactId>
|
|
<version>2.3.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.sun.xml.bind</groupId>
|
|
<artifactId>jaxb-impl</artifactId>
|
|
<version>2.3.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jaxb</groupId>
|
|
<artifactId>jaxb-core</artifactId>
|
|
<version>3.0.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- junit compatible dependencies (xmage uses junit 5 platform for all v4 and v5 tests) -->
|
|
<groupId>org.junit</groupId>
|
|
<artifactId>junit-bom</artifactId>
|
|
<version>5.8.1</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- json support -->
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
<version>2.13.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- extended lib from google (collections, io, etc) -->
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<version>33.4.8-jre</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- escape/unescape html in texts -->
|
|
<groupId>org.unbescape</groupId>
|
|
<artifactId>unbescape</artifactId>
|
|
<version>1.1.6.RELEASE</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- zip files support -->
|
|
<groupId>net.java.truevfs</groupId>
|
|
<artifactId>truevfs-profile-base</artifactId>
|
|
<version>0.14.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- lib with useful code and utils -->
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>3.18.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<!-- scraping lib to download and parse html/symbols/images/svg -->
|
|
<groupId>org.jsoup</groupId>
|
|
<artifactId>jsoup</artifactId>
|
|
<version>1.21.2</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
</project>
|