Skip to content

Commit 6a854f5

Browse files
publishing sources and javadocs
1 parent 7bf9f39 commit 6a854f5

File tree

8 files changed

+73
-14
lines changed

8 files changed

+73
-14
lines changed

.github/workflows/Release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Publish package
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: mvn --batch-mode deploy
39+
run: mvn --batch-mode -Ppublish deploy
4040

4141
- name: Get Maven project version
4242
env:

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<parent>
77
<groupId>io.memoria</groupId>
88
<artifactId>atom</artifactId>
9-
<version>24.7.2</version>
9+
<version>24.8.0</version>
1010
</parent>
1111

1212
<groupId>io.memoria.atom</groupId>
1313
<artifactId>core</artifactId>
14-
<version>24.7.2</version>
14+
<version>24.8.0</version>
1515
<packaging>jar</packaging>
1616
<name>${project.groupId}.${project.artifactId}</name>
1717
<description>Core Module</description>

eventsourcing/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<parent>
77
<groupId>io.memoria</groupId>
88
<artifactId>atom</artifactId>
9-
<version>24.7.2</version>
9+
<version>24.8.0</version>
1010
</parent>
1111

1212
<groupId>io.memoria.atom</groupId>
1313
<artifactId>eventsourcing</artifactId>
14-
<version>24.7.2</version>
14+
<version>24.8.0</version>
1515
<packaging>jar</packaging>
1616
<name>${project.groupId}.${project.artifactId}</name>
1717
<description>eventsourcing Module</description>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<parent>
88
<groupId>io.memoria</groupId>
99
<artifactId>jbom</artifactId>
10-
<version>24.3.0</version>
10+
<version>24.4.0</version>
1111
</parent>
1212

1313
<!--suppress MavenRedundantGroupId -->
1414
<groupId>io.memoria</groupId>
1515
<artifactId>atom</artifactId>
16-
<version>24.7.2</version>
16+
<version>24.8.0</version>
1717
<packaging>pom</packaging>
1818

1919
<!-- Metadata -->

xjackson/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<parent>
77
<groupId>io.memoria</groupId>
88
<artifactId>atom</artifactId>
9-
<version>24.7.2</version>
9+
<version>24.8.0</version>
1010
</parent>
1111

1212
<groupId>io.memoria.atom</groupId>
1313
<artifactId>xjackson</artifactId>
14-
<version>24.7.2</version>
14+
<version>24.8.0</version>
1515
<packaging>jar</packaging>
1616
<name>${project.groupId}.${project.artifactId}</name>
1717
<description>text Module</description>

xjackson/src/test/java/io/memoria/atom/jackson/JacksonJsonTest.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
package io.memoria.atom.jackson;
22

33
import io.memoria.atom.core.text.TextException;
4+
import org.assertj.core.api.Assertions;
45
import org.junit.jupiter.api.Test;
56

7+
import java.util.Arrays;
68
import java.util.List;
79

810
import static org.junit.jupiter.api.Assertions.assertEquals;
911

1012
class JacksonJsonTest {
1113
@Test
1214
void serializeEngineer() {
13-
var yamlEngineer = Tests.json.serialize(Resources.BOB_ENGINEER);
15+
var yamlEngineerJson = Tests.json.serialize(Resources.BOB_ENGINEER);
1416
assert Resources.BOB_ENGINEER_JSON != null;
15-
assertEquals(Resources.BOB_ENGINEER_JSON, yamlEngineer);
17+
assertEquals(Resources.BOB_ENGINEER_JSON, yamlEngineerJson);
1618
}
1719

1820
@Test
1921
void serializeManager() {
20-
var yamlEngineer = Tests.json.serialize(Resources.ANNIKA_MANAGER);
22+
var engineerYaml = Tests.json.serialize(Resources.ANNIKA_MANAGER);
2123
assert Resources.ANNIKA_MANAGER_JSON != null;
22-
assertEquals(Resources.ANNIKA_MANAGER_JSON, yamlEngineer);
24+
assertEquals(Resources.ANNIKA_MANAGER_JSON, engineerYaml);
25+
}
26+
27+
@Test
28+
void serializeEmployees() {
29+
var employeesJson = Tests.json.serialize(Resources.EMPLOYEES);
30+
assert Resources.EMPLOYEES_JSON != null;
31+
assertEquals(Resources.EMPLOYEES_JSON, employeesJson);
2332
}
2433

2534
@Test
@@ -51,4 +60,12 @@ void deserializeManager() throws TextException {
5160
assertEquals(Resources.ANNIKA_MANAGER, manager);
5261
assertEquals(List.of(Resources.BOB_ENGINEER, Resources.ALEX_ENGINEER), manager.team());
5362
}
63+
64+
@Test
65+
void deserializeEmployees() throws TextException {
66+
// When
67+
var employees = Tests.json.deserialize(Resources.EMPLOYEES_JSON, Employee[].class);
68+
// Then
69+
Assertions.assertThat(Resources.EMPLOYEES).hasSameElementsAs(Arrays.stream(employees).toList());
70+
}
5471
}

xjackson/src/test/java/io/memoria/atom/jackson/Resources.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ public class Resources {
1414
public static final String ANNIKA_MANAGER_JSON;
1515
public static final String DEPARTMENT_JSON;
1616
public static final String NAME_CREATED_JSON;
17+
public static final String EMPLOYEES_JSON;
18+
1719
// Yaml Resources
1820
public static final String BOB_ENGINEER_YAML;
1921
public static final String ANNIKA_MANAGER_YAML;
2022
public static final Engineer BOB_ENGINEER;
2123
public static final Engineer ALEX_ENGINEER;
2224
public static final Manager ANNIKA_MANAGER;
25+
public static final Employee[] EMPLOYEES;
2326

2427
static {
2528
try {
@@ -29,13 +32,14 @@ public class Resources {
2932
ANNIKA_MANAGER_JSON = FileOps.readResource("cases/company/json/Manager.json");
3033
DEPARTMENT_JSON = FileOps.readResource("cases/company/json/Department.json");
3134
NAME_CREATED_JSON = FileOps.readResource("cases/company/json/NameCreated.json");
35+
EMPLOYEES_JSON = FileOps.readResource("cases/company/json/Employees.json");
3236
BOB_ENGINEER_YAML = FileOps.readResource("cases/company/yaml/Engineer.yaml");
3337
ANNIKA_MANAGER_YAML = FileOps.readResource("cases/company/yaml/Manager.yaml");
34-
3538
// Objects
3639
BOB_ENGINEER = new Engineer(Ids.of(0), "bob", LocalDate.of(2000, 1, 1), List.of("fix issue 1", "Fix issue 2"));
3740
ALEX_ENGINEER = new Engineer(Ids.of(1), "alex", LocalDate.of(2000, 1, 1), List.of("fix issue 3", "Fix issue 4"));
3841
ANNIKA_MANAGER = new Manager("Annika", List.of(BOB_ENGINEER, ALEX_ENGINEER));
42+
EMPLOYEES = new Employee[]{BOB_ENGINEER, ANNIKA_MANAGER};
3943
} catch (IOException e) {
4044
throw new RuntimeException(e);
4145
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[
2+
{
3+
"$type":"Engineer",
4+
"id":"0",
5+
"name":"bob",
6+
"birthday":"2000-01-01",
7+
"tasks":[
8+
"fix issue 1",
9+
"Fix issue 2"
10+
]
11+
},
12+
{
13+
"$type":"Manager",
14+
"name":"Annika",
15+
"team":[
16+
{
17+
"$type":"Engineer",
18+
"id":"0",
19+
"name":"bob",
20+
"birthday":"2000-01-01",
21+
"tasks":[
22+
"fix issue 1",
23+
"Fix issue 2"
24+
]
25+
},
26+
{
27+
"$type":"Engineer",
28+
"id":"1",
29+
"name":"alex",
30+
"birthday":"2000-01-01",
31+
"tasks":[
32+
"fix issue 3",
33+
"Fix issue 4"
34+
]
35+
}
36+
]
37+
}
38+
]

0 commit comments

Comments
 (0)