Skip to content

Commit

Permalink
Merge pull request #14 from cuioss/feature/module-info
Browse files Browse the repository at this point in the history
#3 Add module-info.java
  • Loading branch information
cuioss committed Aug 11, 2023
2 parents ebca56f + 24915c7 commit fedaf90
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
11 changes: 10 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?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>

<parent>
<groupId>de.cuioss</groupId>
<artifactId>cui-java-parent</artifactId>
<version>0.2.9</version>
<version>0.3.0</version>
<relativePath />
</parent>

<artifactId>cui-java-tools</artifactId>
<name>cui java tools</name>
<version>1.2.0-SNAPSHOT</version>
Expand All @@ -17,17 +20,22 @@
facades/frameworks.
</description>
<packaging>jar</packaging>

<url>https://github.com/cuioss/cui-java-tools/</url>
<scm>
<url>https://github.com/cuioss/cui-java-tools/</url>
<connection>scm:git:https://github.com/cuioss/cui-java-tools.git</connection>
<developerConnection>scm:git:https://github.com/cuioss/cui-java-tools/</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<maven.jar.plugin.automatic.module.name>de.cuioss.java.tools</maven.jar.plugin.automatic.module.name>
</properties>
<issueManagement>
<url>https://github.com/cuioss/cui-java-tools/issues</url>
<system>GitHub Issues</system>
</issueManagement>

<dependencyManagement>
<dependencies>
<!-- owolff: Kept locally, because solely used for module testing -->
Expand All @@ -45,6 +53,7 @@
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/cuioss/tools/io/IOCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @author commons.io:org.apache.commons.io.IOCase
*/
enum IOCase {
public enum IOCase {

/**
* The constant for case-sensitive regardless of operating system.
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module de.cuioss.java.tools {
requires lombok;
requires java.desktop;
requires java.logging;

exports de.cuioss.tools.base;
exports de.cuioss.tools.codec;
exports de.cuioss.tools.collect;
exports de.cuioss.tools.concurrent;
exports de.cuioss.tools.formatting;
exports de.cuioss.tools.formatting.template;
exports de.cuioss.tools.formatting.template.lexer;
exports de.cuioss.tools.formatting.template.token;
exports de.cuioss.tools.io;
exports de.cuioss.tools.lang;
exports de.cuioss.tools.net;
exports de.cuioss.tools.net.ssl;
exports de.cuioss.tools.property;
exports de.cuioss.tools.reflect;
exports de.cuioss.tools.string;
}
11 changes: 4 additions & 7 deletions src/test/java/de/cuioss/tools/io/ClassPathLoaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ class ClassPathLoaderTest {

private static final String EXISTING_CLASSPATH_FILE = FileTypePrefix.CLASSPATH + EXISTING_FILE_PATH;

private static final String EXISTING_CLASSPATH_FILE_WO_SLASH = FileTypePrefix.CLASSPATH
+ EXISTING_FILE_PATH_WO_SLASH;
private static final String EXISTING_CLASSPATH_FILE_WO_SLASH = FileTypePrefix.CLASSPATH + EXISTING_FILE_PATH_WO_SLASH;

private static final String JAR_LOCATED_FILE_NAME = "META-INF/MANIFEST.MF";

private static final String JAR_LOCATED_CLASSPATH_FILE_NAME = FileTypePrefix.CLASSPATH + JAR_LOCATED_FILE_NAME;
private static final String JAR_LOCATED_CLASSPATH_FILE_NAME = FileTypePrefix.CLASSPATH + EXISTING_FILE_PATH_WO_SLASH;

private static final String NOT_EXISTING_FILE = FilenameUtils.normalize("/not/there.cui");

Expand Down Expand Up @@ -66,8 +63,8 @@ void shouldHandleExistingFile() {
@Test
void shouldHandleExistingFileInJar() {
final var loader = new ClassPathLoader(JAR_LOCATED_CLASSPATH_FILE_NAME);
assertTrue(loader.isReadable());
assertNotNull(loader.inputStream());
assertTrue(loader.isReadable(), "file must be readable: " + JAR_LOCATED_CLASSPATH_FILE_NAME);
assertNotNull(loader.inputStream(), "input stream must not be null");
}

@Test
Expand Down

0 comments on commit fedaf90

Please sign in to comment.