Skip to content

Commit

Permalink
include dependencies in jar
Browse files Browse the repository at this point in the history
  • Loading branch information
jberclaz committed Jul 19, 2024
1 parent 155ee65 commit bccd54b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 15 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,20 @@ Make sure `JAVA_HOME` is defined. Then:

If you make the jar file executable, you can double-click on the file to launch the client.

## Computer player
The latest version has now a computer player, which can help if you cannot find four participants. The strategy is clearly not state-of-the-art, but it is loosely based on Monte-Carlo sampling and does not play too badly.

You can connect a computer player with
```bash
java -cp target/jass-2.1.3.jar com.leflat.jass.client.ArtificialClient <server_host> <game_id> [<name>]
```
Note that the computer player name is optional.

## How to run on Windows
The game uses Java 11. Unfortunately, Oracle abandoned the JRE
starting from version 11. You will need to install the
[full JDK](https://www.oracle.com/java/technologies/javase-jdk14-downloads.html#license-lightbox).

### Classic UI
![Jass client screenshot](doc/screenjass.jpg)

### Modern UI
![Modern UI screenshot](doc/modern_ui.png)
![Modern UI screenshot](doc/modern_ui.png)

## Development

- Compile and test: `mvn package`
- Compile without tests: `mvn -Dmaven.test.skip=true package`
- Update dependencies: `mvn versions:use-latest-releases`
- Create new release: `mvn release:prepare` and `mvn release:perform`
44 changes: 39 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?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/xsd/maven-4.0.0.xsd">
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.leflat</groupId>
Expand All @@ -12,8 +13,8 @@

<scm>
<developerConnection>scm:git:[email protected]:jberclaz/jass.git</developerConnection>
<tag>jass-2.2.1</tag>
</scm>
<tag>jass-2.2.1</tag>
</scm>

<distributionManagement>
<repository>
Expand Down Expand Up @@ -68,14 +69,17 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>11</release>
<release>17</release>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<argLine>-XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>

<plugin>
Expand Down Expand Up @@ -125,7 +129,37 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.intellij:forms_rt</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.17.1</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>

</plugins>
Expand Down

0 comments on commit bccd54b

Please sign in to comment.