Skip to content

Commit

Permalink
pom simplified
Browse files Browse the repository at this point in the history
root pom not longer depending on anything; using dependencyManagement; migrato to javax.NonNull consistently
  • Loading branch information
xamde committed Oct 29, 2023
1 parent 7e77205 commit 087bd8e
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 130 deletions.
5 changes: 4 additions & 1 deletion app-rest-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@
<groupId>com.calpano.graphinout</groupId>
<artifactId>engine</artifactId>
<version>1.0-SNAPSHOT</version>

</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- test -->
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.io.File;
import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -23,6 +22,8 @@
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;

import javax.annotation.Nonnull;

@Slf4j

@SpringBootTest
Expand Down Expand Up @@ -59,7 +60,7 @@ public SaveOutputSink saveOutputSink() {
private static class MockLoadInputSource implements LoadInputSource {

@Override
public IOResource<InputSource> load(@NotNull String sessionID, Type type) throws IOException {
public IOResource<InputSource> load(@Nonnull String sessionID, Type type) throws IOException {
FilesMultiInputSource dataAndMapping =
new FilesMultiInputSource() //
// TODO use constants for 'data' and 'mapping'
Expand All @@ -75,7 +76,7 @@ private static class MockSaveOutputSink implements SaveOutputSink {

@Override
public String save(
@NotNull IOResource<OutputSink> outputSink, @NotNull String sessionId, Type type)
@Nonnull IOResource<OutputSink> outputSink, @Nonnull String sessionId, Type type)
throws IOException {
if (outputSink.getResource() instanceof InMemoryOutputSink data) {
log.info(data.toString());
Expand Down
24 changes: 8 additions & 16 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,19 @@
<artifactId>base</artifactId>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId>
</dependency>
<dependency><groupId>com.github.spotbugs</groupId><artifactId>spotbugs-annotations</artifactId></dependency>
<!-- test -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency><groupId>io.github.classgraph</groupId><artifactId>classgraph</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><scope>test</scope></dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.calpano.graphinout.base.output;

import com.calpano.graphinout.base.graphml.*;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.util.*;
Expand Down Expand Up @@ -168,7 +168,7 @@ private void investigatingTheExistenceOfTheNode(GraphmlEdge edge) throws Illegal
}
}

private void investigatingTheExistenceOfThePort(@NotNull GraphmlEdge edge) throws IllegalStateException {
private void investigatingTheExistenceOfThePort(@Nonnull GraphmlEdge edge) throws IllegalStateException {
for (String portName : Arrays.asList(edge.getSourcePortId(), edge.getTargetPortId())) {
if (portName != null) if (!existingPortNames.contains(portName)) {
nonExistingPortNames.computeIfAbsent(portName, key -> new ArrayList<>()) //
Expand All @@ -177,7 +177,7 @@ private void investigatingTheExistenceOfThePort(@NotNull GraphmlEdge edge) throw
}
}

private void investigatingTheExistenceOfThePort(@NotNull GraphmlHyperEdge hyperEdge) throws IllegalStateException {
private void investigatingTheExistenceOfThePort(@Nonnull GraphmlHyperEdge hyperEdge) throws IllegalStateException {
for (GraphmlEndpoint endpoint : hyperEdge.getEndpoints()) {
if (endpoint.getPort() != null) if (!existingPortNames.contains(endpoint.getPort())) {
nonExistingPortNames.computeIfAbsent(endpoint.getPort(), key -> new ArrayList<>()) //
Expand Down
4 changes: 3 additions & 1 deletion engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</dependency>
<dependency>
<groupId>com.calpano.graphinout</groupId>
Expand Down Expand Up @@ -45,6 +44,9 @@
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- test -->
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency>
<groupId>com.calpano.graphinout</groupId>
<artifactId>base</artifactId>
Expand Down
110 changes: 15 additions & 95 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
<slf4j-version>1.7.36</slf4j-version>
<logback-classic-version>1.2.11</logback-classic-version>
<junit-jupiter.version>5.9.0</junit-jupiter.version>
<mockito-all-version>1.10.19</mockito-all-version>
<mockito-core-version>5.1.1</mockito-core-version>
<mockito-core-version>5.6.0</mockito-core-version>
<mockito-junit-jupiter-version>5.1.1</mockito-junit-jupiter-version>
<lombok-version>1.18.24</lombok-version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
Expand All @@ -41,68 +40,20 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.calpano.graphinout</groupId>
<artifactId>base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${fasterxml-jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${fasterxml-jackson.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok-version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito-all-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-junit-jupiter-version}</version>
<scope>test</scope>
</dependency>
<dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>${logback-classic-version}</version></dependency>
<dependency><groupId>com.calpano.graphinout</groupId><artifactId>base</artifactId><version>1.0-SNAPSHOT</version></dependency>
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${fasterxml-jackson.version}</version></dependency>
<dependency><groupId>com.fasterxml.jackson.datatype</groupId><artifactId>jackson-datatype-jsr310</artifactId><version>${fasterxml-jackson.version}</version></dependency>
<dependency><groupId>com.google.code.findbugs</groupId><artifactId>jsr305</artifactId><version>3.0.2</version></dependency>
<dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>2.11.0</version></dependency>
<dependency><groupId>io.github.classgraph</groupId><artifactId>classgraph</artifactId><version>4.8.157</version></dependency>
<dependency><groupId>io.github.classgraph</groupId><artifactId>classgraph</artifactId><version>4.8.157</version><scope>test</scope></dependency>
<dependency><groupId>com.github.spotbugs</groupId><artifactId>spotbugs-annotations</artifactId><version>4.7.3</version></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>${junit-jupiter.version}</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><version>${mockito-core-version}</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>${mockito-junit-jupiter-version}</version><scope>test</scope></dependency>
<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${lombok-version}</version><scope>provided</scope></dependency>
<dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>${slf4j-version}</version></dependency>
</dependencies>
</dependencyManagement>
<build>
Expand Down Expand Up @@ -166,35 +117,4 @@

</plugins>
</build>


<dependencies>
<!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.154</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
6 changes: 4 additions & 2 deletions reader-graphml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.154</version>
</dependency>
<!-- test -->
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import com.calpano.graphinout.base.input.SingleInputSource;
import com.calpano.graphinout.base.reader.ContentError;
import org.apache.commons.io.IOUtils;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;

import javax.annotation.Nonnull;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
Expand Down Expand Up @@ -41,7 +41,7 @@ private static Stream<String> getAllGraphmlFiles() {
return ReaderTests.getAllTestResourceFilePaths().filter(path -> path.endsWith(".graphml"));
}

protected Map<String, Long> expectedErrors(@NotNull String resourceName) {
protected Map<String, Long> expectedErrors(@Nonnull String resourceName) {
Map<String, Long> errorLongMap = new HashMap<>();
switch (resourceName) {

Expand Down
9 changes: 6 additions & 3 deletions reader-jgrapht/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<dependency>
<groupId>com.calpano.graphinout</groupId>
<artifactId>base</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -37,6 +36,11 @@
</exclusions>
</dependency>

<!-- test -->
<dependency><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>io.github.classgraph</groupId><artifactId>classgraph</artifactId><scope>test</scope></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency>
<groupId>com.calpano.graphinout</groupId>
<artifactId>base</artifactId>
Expand All @@ -48,10 +52,9 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<scope>test</scope>
</dependency>

</dependencies>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeName;
import lombok.Data;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.PROPERTY, property = "refer")
@JsonSubTypes({ //
Expand All @@ -21,7 +22,7 @@ public class Link {
public String linkLabel;


public int compareTo(@NotNull Link o) {
public int compareTo(@Nonnull Link o) {
return this.getClass().getName().compareTo(o.getClass().getName()) ;
}

Expand Down
6 changes: 4 additions & 2 deletions reader-tgf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- test -->
<dependency>
<groupId>com.calpano.graphinout</groupId>
<artifactId>base</artifactId>
Expand All @@ -37,6 +37,8 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><scope>test</scope></dependency>
<dependency><groupId>io.github.classgraph</groupId><artifactId>classgraph</artifactId><scope>test</scope></dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
Expand All @@ -48,4 +50,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>

0 comments on commit 087bd8e

Please sign in to comment.