From 7ab35a825d3c3d405a574f72644341242628ab27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Terje=20S=C3=B8rensen?= Date: Thu, 4 Apr 2024 17:53:53 +0200 Subject: [PATCH] Renamed namespace to be able to deploy with central maven repo --- README.md | 16 +++++++++------- pom.xml | 4 ++-- .../{org => io/github}/filelize/Filelize.java | 2 +- .../github}/filelize/FilelizeType.java | 2 +- .../github}/filelize/FilelizeUtil.java | 2 +- .../{org => io/github}/filelize/Filelizer.java | 6 +++--- .../github}/filelize/FilelizerMultiple.java | 8 ++++---- .../github}/filelize/FilelizerSingle.java | 8 ++++---- .../{org => io/github}/filelize/IFilelizer.java | 2 +- .../java/{org => io/github}/filelize/Id.java | 2 +- .../github}/filelize/file/FileHandler.java | 6 +++--- .../github}/filelize/file/FilesUtil.java | 2 +- .../github}/filelize/path/PathHandler.java | 10 +++++----- .../filelize/FilelizerMultipleFilesTest.java | 2 +- .../filelize/FilelizerSingleFileTest.java | 2 +- .../filelize/FilelizerSomethingElseTest.java | 2 +- .../github}/filelize/SomethingElse.java | 2 +- .../github}/filelize/SomethingMultiple.java | 2 +- .../github}/filelize/SomethingSingle.java | 2 +- .../github}/filelize/file/FileHandlerTest.java | 4 ++-- .../filelize/path/PathHandlerMultipleTest.java | 6 +++--- .../filelize/path/PathHandlerSingleTest.java | 6 +++--- 22 files changed, 50 insertions(+), 48 deletions(-) rename src/main/java/{org => io/github}/filelize/Filelize.java (92%) rename src/main/java/{org => io/github}/filelize/FilelizeType.java (68%) rename src/main/java/{org => io/github}/filelize/FilelizeUtil.java (99%) rename src/main/java/{org => io/github}/filelize/Filelizer.java (94%) rename src/main/java/{org => io/github}/filelize/FilelizerMultiple.java (94%) rename src/main/java/{org => io/github}/filelize/FilelizerSingle.java (94%) rename src/main/java/{org => io/github}/filelize/IFilelizer.java (91%) rename src/main/java/{org => io/github}/filelize/Id.java (89%) rename src/main/java/{org => io/github}/filelize/file/FileHandler.java (94%) rename src/main/java/{org => io/github}/filelize/file/FilesUtil.java (96%) rename src/main/java/{org => io/github}/filelize/path/PathHandler.java (92%) rename src/test/java/{org => io/github}/filelize/FilelizerMultipleFilesTest.java (98%) rename src/test/java/{org => io/github}/filelize/FilelizerSingleFileTest.java (98%) rename src/test/java/{org => io/github}/filelize/FilelizerSomethingElseTest.java (98%) rename src/test/java/{org => io/github}/filelize/SomethingElse.java (92%) rename src/test/java/{org => io/github}/filelize/SomethingMultiple.java (94%) rename src/test/java/{org => io/github}/filelize/SomethingSingle.java (94%) rename src/test/java/{org => io/github}/filelize/file/FileHandlerTest.java (88%) rename src/test/java/{org => io/github}/filelize/path/PathHandlerMultipleTest.java (93%) rename src/test/java/{org => io/github}/filelize/path/PathHandlerSingleTest.java (92%) diff --git a/README.md b/README.md index 51fc4e9..206dad1 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ To integrate Filelize into your project, you have two options: 1. **Using Maven:** Add the following dependency to your pom.xml file and follow the guide for [Working with the Apache Maven registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry) ````xml - org.filelize + io.github.filelize filelize-java - 1.0.0 + 0.9.0 ```` 2. **Manual Build:** Alternatively, you can download this repository and build it locally. @@ -28,10 +28,11 @@ Filelizer filelizer = new Filelizer("src/test/resources/"); ```` ### Saving to a single file -To save an object to a single file, annotate your model class with `@Filelize` and set the `type` parameter to `FilelizeType.SINGLE_FILE`. Additionally, mark the identifying attribute with `@Id`. +To save an object to a single file, annotate your model class with `@Filelize` and set the `type` parameter to `FilelizeType.SINGLE_FILE`. Additionally, mark the identifying attribute with `@Id`. + ````java -import org.filelize.Filelize; -import org.filelize.Id; +import io.github.filelize.Filelize; +import io.github.filelize.Id; @Filelize(name = "something_single", type = FilelizeType.SINGLE_FILE, directory = "something_single") public class Something { @@ -44,9 +45,10 @@ public class Something { ### Saving to multiple files For saving objects to multiple files, follow the same steps as for single-file saving, but set the type parameter to `FilelizeType.MULTIPLE_FILES`. + ````java -import org.filelize.Filelize; -import org.filelize.Id; +import io.github.filelize.Filelize; +import io.github.filelize.Id; @Filelize(name = "my_something", type = FilelizeType.MULTIPLE_FILES, directory = "something_multiple/mydirectory") public class Something { diff --git a/pom.xml b/pom.xml index 6a565bd..9351f99 100644 --- a/pom.xml +++ b/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - org.filelize + io.github.filelize filelize-java - 2.0.0 + 0.9.0 jar filelize-java diff --git a/src/main/java/org/filelize/Filelize.java b/src/main/java/io/github/filelize/Filelize.java similarity index 92% rename from src/main/java/org/filelize/Filelize.java rename to src/main/java/io/github/filelize/Filelize.java index 7132c7a..d80709d 100644 --- a/src/main/java/org/filelize/Filelize.java +++ b/src/main/java/io/github/filelize/Filelize.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/filelize/FilelizeType.java b/src/main/java/io/github/filelize/FilelizeType.java similarity index 68% rename from src/main/java/org/filelize/FilelizeType.java rename to src/main/java/io/github/filelize/FilelizeType.java index 225e927..f681b15 100644 --- a/src/main/java/org/filelize/FilelizeType.java +++ b/src/main/java/io/github/filelize/FilelizeType.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; public enum FilelizeType { SINGLE_FILE, MULTIPLE_FILES diff --git a/src/main/java/org/filelize/FilelizeUtil.java b/src/main/java/io/github/filelize/FilelizeUtil.java similarity index 99% rename from src/main/java/org/filelize/FilelizeUtil.java rename to src/main/java/io/github/filelize/FilelizeUtil.java index cdfae85..094d020 100644 --- a/src/main/java/org/filelize/FilelizeUtil.java +++ b/src/main/java/io/github/filelize/FilelizeUtil.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/filelize/Filelizer.java b/src/main/java/io/github/filelize/Filelizer.java similarity index 94% rename from src/main/java/org/filelize/Filelizer.java rename to src/main/java/io/github/filelize/Filelizer.java index 67c78b4..b9fd78e 100644 --- a/src/main/java/org/filelize/Filelizer.java +++ b/src/main/java/io/github/filelize/Filelizer.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; @@ -7,8 +7,8 @@ import java.util.List; import java.util.Map; -import static org.filelize.FilelizeUtil.getFilelizeType; -import static org.filelize.FilelizeUtil.getFilelizeTypeOfList; +import static io.github.filelize.FilelizeUtil.getFilelizeType; +import static io.github.filelize.FilelizeUtil.getFilelizeTypeOfList; public class Filelizer implements IFilelizer { diff --git a/src/main/java/org/filelize/FilelizerMultiple.java b/src/main/java/io/github/filelize/FilelizerMultiple.java similarity index 94% rename from src/main/java/org/filelize/FilelizerMultiple.java rename to src/main/java/io/github/filelize/FilelizerMultiple.java index 650aa3e..afeaed9 100644 --- a/src/main/java/org/filelize/FilelizerMultiple.java +++ b/src/main/java/io/github/filelize/FilelizerMultiple.java @@ -1,8 +1,8 @@ -package org.filelize; +package io.github.filelize; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.file.FileHandler; -import org.filelize.path.PathHandler; +import io.github.filelize.file.FileHandler; +import io.github.filelize.path.PathHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -12,7 +12,7 @@ import java.util.List; import java.util.Map; -import static org.filelize.FilelizeUtil.*; +import static io.github.filelize.FilelizeUtil.*; public class FilelizerMultiple implements IFilelizer { private final Logger log = LoggerFactory.getLogger(FilelizerMultiple.class); diff --git a/src/main/java/org/filelize/FilelizerSingle.java b/src/main/java/io/github/filelize/FilelizerSingle.java similarity index 94% rename from src/main/java/org/filelize/FilelizerSingle.java rename to src/main/java/io/github/filelize/FilelizerSingle.java index fdc4b0b..b0e96a7 100644 --- a/src/main/java/org/filelize/FilelizerSingle.java +++ b/src/main/java/io/github/filelize/FilelizerSingle.java @@ -1,8 +1,8 @@ -package org.filelize; +package io.github.filelize; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.file.FileHandler; -import org.filelize.path.PathHandler; +import io.github.filelize.file.FileHandler; +import io.github.filelize.path.PathHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -10,7 +10,7 @@ import java.nio.file.NoSuchFileException; import java.util.*; -import static org.filelize.FilelizeUtil.*; +import static io.github.filelize.FilelizeUtil.*; public class FilelizerSingle implements IFilelizer { private final Logger log = LoggerFactory.getLogger(FilelizerSingle.class); diff --git a/src/main/java/org/filelize/IFilelizer.java b/src/main/java/io/github/filelize/IFilelizer.java similarity index 91% rename from src/main/java/org/filelize/IFilelizer.java rename to src/main/java/io/github/filelize/IFilelizer.java index cc0df6f..e7f41b6 100644 --- a/src/main/java/org/filelize/IFilelizer.java +++ b/src/main/java/io/github/filelize/IFilelizer.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/filelize/Id.java b/src/main/java/io/github/filelize/Id.java similarity index 89% rename from src/main/java/org/filelize/Id.java rename to src/main/java/io/github/filelize/Id.java index da17b45..197ccd0 100644 --- a/src/main/java/org/filelize/Id.java +++ b/src/main/java/io/github/filelize/Id.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/filelize/file/FileHandler.java b/src/main/java/io/github/filelize/file/FileHandler.java similarity index 94% rename from src/main/java/org/filelize/file/FileHandler.java rename to src/main/java/io/github/filelize/file/FileHandler.java index 7696037..376adfc 100644 --- a/src/main/java/org/filelize/file/FileHandler.java +++ b/src/main/java/io/github/filelize/file/FileHandler.java @@ -1,4 +1,4 @@ -package org.filelize.file; +package io.github.filelize.file; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonNode; @@ -16,8 +16,8 @@ import java.util.HashMap; import java.util.Map; -import static org.filelize.FilelizeUtil.getFilelizeId; -import static org.filelize.file.FilesUtil.ensureFile; +import static io.github.filelize.FilelizeUtil.getFilelizeId; +import static io.github.filelize.file.FilesUtil.ensureFile; public class FileHandler { diff --git a/src/main/java/org/filelize/file/FilesUtil.java b/src/main/java/io/github/filelize/file/FilesUtil.java similarity index 96% rename from src/main/java/org/filelize/file/FilesUtil.java rename to src/main/java/io/github/filelize/file/FilesUtil.java index 2683a3b..cd94a20 100644 --- a/src/main/java/org/filelize/file/FilesUtil.java +++ b/src/main/java/io/github/filelize/file/FilesUtil.java @@ -1,4 +1,4 @@ -package org.filelize.file; +package io.github.filelize.file; import java.io.File; import java.io.IOException; diff --git a/src/main/java/org/filelize/path/PathHandler.java b/src/main/java/io/github/filelize/path/PathHandler.java similarity index 92% rename from src/main/java/org/filelize/path/PathHandler.java rename to src/main/java/io/github/filelize/path/PathHandler.java index de03191..387188f 100644 --- a/src/main/java/org/filelize/path/PathHandler.java +++ b/src/main/java/io/github/filelize/path/PathHandler.java @@ -1,14 +1,14 @@ -package org.filelize.path; +package io.github.filelize.path; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.FilelizeType; -import org.filelize.FilelizeUtil; -import org.filelize.file.FilesUtil; +import io.github.filelize.file.FilesUtil; +import io.github.filelize.FilelizeType; +import io.github.filelize.FilelizeUtil; import java.util.HashMap; import java.util.Map; -import static org.filelize.FilelizeUtil.*; +import static io.github.filelize.FilelizeUtil.*; public class PathHandler { diff --git a/src/test/java/org/filelize/FilelizerMultipleFilesTest.java b/src/test/java/io/github/filelize/FilelizerMultipleFilesTest.java similarity index 98% rename from src/test/java/org/filelize/FilelizerMultipleFilesTest.java rename to src/test/java/io/github/filelize/FilelizerMultipleFilesTest.java index f2545b9..ecef15b 100644 --- a/src/test/java/org/filelize/FilelizerMultipleFilesTest.java +++ b/src/test/java/io/github/filelize/FilelizerMultipleFilesTest.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import org.junit.Test; diff --git a/src/test/java/org/filelize/FilelizerSingleFileTest.java b/src/test/java/io/github/filelize/FilelizerSingleFileTest.java similarity index 98% rename from src/test/java/org/filelize/FilelizerSingleFileTest.java rename to src/test/java/io/github/filelize/FilelizerSingleFileTest.java index d2972b0..f0c692f 100644 --- a/src/test/java/org/filelize/FilelizerSingleFileTest.java +++ b/src/test/java/io/github/filelize/FilelizerSingleFileTest.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import org.junit.Test; diff --git a/src/test/java/org/filelize/FilelizerSomethingElseTest.java b/src/test/java/io/github/filelize/FilelizerSomethingElseTest.java similarity index 98% rename from src/test/java/org/filelize/FilelizerSomethingElseTest.java rename to src/test/java/io/github/filelize/FilelizerSomethingElseTest.java index f49ec3a..4c723ad 100644 --- a/src/test/java/org/filelize/FilelizerSomethingElseTest.java +++ b/src/test/java/io/github/filelize/FilelizerSomethingElseTest.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; import org.junit.Test; diff --git a/src/test/java/org/filelize/SomethingElse.java b/src/test/java/io/github/filelize/SomethingElse.java similarity index 92% rename from src/test/java/org/filelize/SomethingElse.java rename to src/test/java/io/github/filelize/SomethingElse.java index bd73461..e769b1c 100644 --- a/src/test/java/org/filelize/SomethingElse.java +++ b/src/test/java/io/github/filelize/SomethingElse.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; public class SomethingElse { private String id; diff --git a/src/test/java/org/filelize/SomethingMultiple.java b/src/test/java/io/github/filelize/SomethingMultiple.java similarity index 94% rename from src/test/java/org/filelize/SomethingMultiple.java rename to src/test/java/io/github/filelize/SomethingMultiple.java index ac4f038..ca4d91d 100644 --- a/src/test/java/org/filelize/SomethingMultiple.java +++ b/src/test/java/io/github/filelize/SomethingMultiple.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; @Filelize(name = "something_multiple", type = FilelizeType.MULTIPLE_FILES, directory = "something_multiple/mydirectory") public class SomethingMultiple { diff --git a/src/test/java/org/filelize/SomethingSingle.java b/src/test/java/io/github/filelize/SomethingSingle.java similarity index 94% rename from src/test/java/org/filelize/SomethingSingle.java rename to src/test/java/io/github/filelize/SomethingSingle.java index 7846433..19b7dc3 100644 --- a/src/test/java/org/filelize/SomethingSingle.java +++ b/src/test/java/io/github/filelize/SomethingSingle.java @@ -1,4 +1,4 @@ -package org.filelize; +package io.github.filelize; @Filelize(name = "something_single", type = FilelizeType.SINGLE_FILE, directory = "something_single") public class SomethingSingle { diff --git a/src/test/java/org/filelize/file/FileHandlerTest.java b/src/test/java/io/github/filelize/file/FileHandlerTest.java similarity index 88% rename from src/test/java/org/filelize/file/FileHandlerTest.java rename to src/test/java/io/github/filelize/file/FileHandlerTest.java index 5a63c21..0eb825a 100644 --- a/src/test/java/org/filelize/file/FileHandlerTest.java +++ b/src/test/java/io/github/filelize/file/FileHandlerTest.java @@ -1,7 +1,7 @@ -package org.filelize.file; +package io.github.filelize.file; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.SomethingElse; +import io.github.filelize.SomethingElse; import org.junit.Test; import java.io.IOException; diff --git a/src/test/java/org/filelize/path/PathHandlerMultipleTest.java b/src/test/java/io/github/filelize/path/PathHandlerMultipleTest.java similarity index 93% rename from src/test/java/org/filelize/path/PathHandlerMultipleTest.java rename to src/test/java/io/github/filelize/path/PathHandlerMultipleTest.java index 647500f..9aa52f8 100644 --- a/src/test/java/org/filelize/path/PathHandlerMultipleTest.java +++ b/src/test/java/io/github/filelize/path/PathHandlerMultipleTest.java @@ -1,8 +1,8 @@ -package org.filelize.path; +package io.github.filelize.path; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.FilelizeType; -import org.filelize.SomethingMultiple; +import io.github.filelize.FilelizeType; +import io.github.filelize.SomethingMultiple; import org.junit.Test; import java.util.HashMap; diff --git a/src/test/java/org/filelize/path/PathHandlerSingleTest.java b/src/test/java/io/github/filelize/path/PathHandlerSingleTest.java similarity index 92% rename from src/test/java/org/filelize/path/PathHandlerSingleTest.java rename to src/test/java/io/github/filelize/path/PathHandlerSingleTest.java index fdc7c0b..4dda150 100644 --- a/src/test/java/org/filelize/path/PathHandlerSingleTest.java +++ b/src/test/java/io/github/filelize/path/PathHandlerSingleTest.java @@ -1,8 +1,8 @@ -package org.filelize.path; +package io.github.filelize.path; import com.fasterxml.jackson.databind.ObjectMapper; -import org.filelize.FilelizeType; -import org.filelize.SomethingSingle; +import io.github.filelize.FilelizeType; +import io.github.filelize.SomethingSingle; import org.junit.Test; import java.util.HashMap;