Skip to content

Commit 25f91b5

Browse files
committed
update for Maven
1 parent dbd3006 commit 25f91b5

File tree

11 files changed

+266
-5
lines changed

11 files changed

+266
-5
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn clean
6+
7+
echo "clean ok"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn compile
6+
7+
echo "compile ok"

egg_9_sc_fan_in/client/mvn-go.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
./mvn-clean.sh
6+
./mvn-compile.sh
7+
rm -f pid.txt
8+
./mvn-run.sh

egg_9_sc_fan_in/client/mvn-run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn exec:exec
6+
7+
echo "run complete"

egg_9_sc_fan_in/client/pom.xml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>net.codetojoy</groupId>
8+
<artifactId>client</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<name>client</name>
12+
<url>https://github.com/codetojoy/easter_eggs_for_java_loom</url>
13+
14+
<properties>
15+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16+
<maven.compiler.source>19</maven.compiler.source>
17+
<maven.compiler.target>19</maven.compiler.target>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>junit</groupId>
23+
<artifactId>junit</artifactId>
24+
<version>4.11</version>
25+
<scope>test</scope>
26+
</dependency>
27+
</dependencies>
28+
29+
<build>
30+
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
31+
<plugins>
32+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
33+
<plugin>
34+
<artifactId>maven-clean-plugin</artifactId>
35+
<version>3.1.0</version>
36+
</plugin>
37+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
38+
<plugin>
39+
<artifactId>maven-resources-plugin</artifactId>
40+
<version>3.0.2</version>
41+
</plugin>
42+
<plugin>
43+
<artifactId>maven-compiler-plugin</artifactId>
44+
<version>3.10.1</version>
45+
<configuration>
46+
<compilerArgs>
47+
<arg>--enable-preview</arg>
48+
<arg>--add-modules=jdk.incubator.concurrent</arg>
49+
</compilerArgs>
50+
</configuration>
51+
</plugin>
52+
<plugin>
53+
<artifactId>maven-surefire-plugin</artifactId>
54+
<version>2.22.1</version>
55+
</plugin>
56+
<plugin>
57+
<artifactId>maven-jar-plugin</artifactId>
58+
<version>3.0.2</version>
59+
</plugin>
60+
<plugin>
61+
<artifactId>maven-install-plugin</artifactId>
62+
<version>2.5.2</version>
63+
</plugin>
64+
<plugin>
65+
<artifactId>maven-deploy-plugin</artifactId>
66+
<version>2.8.2</version>
67+
</plugin>
68+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
69+
<plugin>
70+
<artifactId>maven-site-plugin</artifactId>
71+
<version>3.7.1</version>
72+
</plugin>
73+
<plugin>
74+
<artifactId>maven-project-info-reports-plugin</artifactId>
75+
<version>3.0.0</version>
76+
</plugin>
77+
78+
<plugin>
79+
<groupId>org.codehaus.mojo</groupId>
80+
<artifactId>exec-maven-plugin</artifactId>
81+
<version>3.1.0</version>
82+
<configuration>
83+
<executable>${java.home}/bin/java</executable>
84+
<arguments>
85+
<argument>--add-modules=jdk.incubator.concurrent</argument>
86+
<argument>--enable-preview</argument>
87+
<argument>--class-path</argument>
88+
<classpath/>
89+
<argument>net.codetojoy.Runner</argument>
90+
</arguments>
91+
</configuration>
92+
</plugin>
93+
94+
</plugins>
95+
</pluginManagement>
96+
</build>
97+
</project>

egg_9_sc_fan_in/server/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ Summary:
88
- parse messages such as `delay: 1000`, then sleep for duration specified
99
* NOTE: this is highly contrived and NOT production-ready
1010

11-
To Build:
12-
---------
11+
Build Notes:
12+
------------
1313

14-
* tested with [this JDK](../../JDK.version.md)
14+
* tested with [this jdk](../JDK.version.md)
15+
* tested with [this version](../Maven.version.md) of Maven
1516
* Gradle does not yet support JDK 19 preview (as of NOV 2022). Check [here](https://docs.gradle.org/current/userguide/compatibility.html)
16-
* unknown if Maven can be used ¯\_(ツ)_
17+
18+
To Build (using Maven):
19+
---------------------
20+
21+
* `./mvn-go.sh` will clean, compile, exec
22+
23+
To Build (using Bash):
24+
----------------------
1725

1826
useful commands:
1927

@@ -22,4 +30,5 @@ useful commands:
2230
* `./clean.sh`
2331
* `./compile.sh`
2432
* `./run.sh`
25-
* note `./go.sh` does: clean, compile, run
33+
* note `./go.sh` is useful for clean-compile-run cycle
34+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn clean
6+
7+
echo "clean ok"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn compile
6+
7+
echo "compile ok"

egg_9_sc_fan_in/server/mvn-go.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
./mvn-clean.sh
6+
./mvn-compile.sh
7+
rm -f pid.txt
8+
./mvn-run.sh

egg_9_sc_fan_in/server/mvn-run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn exec:exec
6+
7+
echo "run complete"

0 commit comments

Comments
 (0)