Compare commits

...

41 Commits

Author SHA1 Message Date
112e520785
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 15:24:36 +03:00
977b4bec14
[maven-release-plugin] prepare release v.3.0.3
Some checks failed
continuous-integration/drone/tag Build is failing
2024-06-24 15:24:36 +03:00
49906cf6ca
update dependency version
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 15:23:39 +03:00
6d5895f926
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 15:11:25 +03:00
d23e13d232
[maven-release-plugin] prepare release v.3.0.3
Some checks reported errors
continuous-integration/drone/tag Build was killed
2024-06-24 15:11:25 +03:00
2f69eae725
update dependency version 2024-06-24 15:10:59 +03:00
a46ecf66ba
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 15:06:53 +03:00
c774f38449
[maven-release-plugin] prepare release v.3.0.3
Some checks failed
continuous-integration/drone/tag Build is failing
2024-06-24 15:06:53 +03:00
760828af20
update dependency version
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 15:05:51 +03:00
c2b9e4ab93
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-24 14:51:24 +03:00
e6725c0de9
[maven-release-plugin] prepare release v.3.0.3
Some checks failed
continuous-integration/drone/tag Build is failing
2024-06-24 14:51:24 +03:00
2eaf8afc51
update dependency version 2024-06-24 14:50:59 +03:00
0f8071f1ee
update cicd
All checks were successful
continuous-integration/drone/push Build is passing
2023-12-03 09:51:22 +03:00
61ce3bb5b8
[maven-release-plugin] prepare for next development iteration
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-16 16:37:35 +03:00
ca2e2e6c0d
[maven-release-plugin] prepare release v.3.0.2 2023-05-16 16:37:34 +03:00
68aef7bce4
Переход на jakarta 2023-05-16 16:37:20 +03:00
5188c4871e
[maven-release-plugin] prepare for next development iteration
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-16 16:33:31 +03:00
b5535cc922
[maven-release-plugin] prepare release v.3.0.1 2023-05-16 16:33:31 +03:00
68b5de6eee
Переход на jakarta 2023-05-16 16:33:12 +03:00
5e19e12237
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-16 16:31:29 +03:00
167a7659d2
[maven-release-plugin] prepare release v.3.0.0 2023-05-16 16:31:28 +03:00
d33621afcc
Переход на jakarta 2023-05-16 16:30:54 +03:00
72f111f97f
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-20 23:30:41 +03:00
47bfd71bf4
[maven-release-plugin] prepare release v.2.7.2 2023-02-20 23:30:41 +03:00
7c60e55845
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-20 19:29:37 +03:00
d6c8668379
[maven-release-plugin] prepare release v.2.7.1 2023-02-20 19:29:36 +03:00
e4a54fda20
Добавил возможность создавать enum 2023-02-20 19:29:18 +03:00
493dfb3627
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-18 10:32:27 +03:00
9c115800d1
[maven-release-plugin] prepare release v.2.6.0 2023-02-18 10:32:26 +03:00
feaecf7a15
Добавил новый контейнер ContextKey 2023-02-18 10:31:59 +03:00
9ba77a2f04
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-13 22:37:24 +03:00
fa914f949d
[maven-release-plugin] prepare release v.2.5.0 2023-02-13 22:37:23 +03:00
e5152c059d
Добавил новые методы проверки в Checker и Inspector 2023-02-13 22:36:52 +03:00
5a06d32523
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 15:20:42 +03:00
e96a63afa9
[maven-release-plugin] prepare release v.2.4.1 2023-01-23 15:20:41 +03:00
d2eec8dced
Исправил версии 2023-01-23 15:19:50 +03:00
919bb5ae1b
[maven-release-plugin] prepare for next development iteration
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 15:04:44 +03:00
8e9c62f808
[maven-release-plugin] prepare release v.2.4.0 2023-01-23 15:04:44 +03:00
d5ba8a484f
Исправил версии 2023-01-23 15:04:04 +03:00
87648cdc10
Добавил maven-release-plugin 2023-01-23 15:01:51 +03:00
d05855c2be
next-version
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-23 14:49:06 +03:00
14 changed files with 392 additions and 97 deletions

View File

@ -1,11 +1,51 @@
---
kind: pipeline kind: pipeline
type: docker type: docker
name: haiti-framework name: snapshot-publish
trigger:
branch:
- develop
volumes:
- name: m2
host:
path: /drone/volume/m2
steps: steps:
- name: publish
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes:
- name: m2
path: /root/.m2/repository
environment:
MAVEN_SETTINGS:
from_secret: MAVEN_SETTINGS
commands:
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- mvn --settings maven-settings.xml -U -P snapshot clean deploy
image_pull_secrets:
- DOCKER_AUTH
---
kind: pipeline
type: docker
name: release-maven-central
trigger:
ref:
- refs/tags/v.*.*.*
volumes:
- name: m2
host:
path: /drone/volume/m2
steps:
- name: publish maven central - name: publish maven central
image: maven:3.8.6-openjdk-11 image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes: volumes:
- name: m2 - name: m2
path: /root/.m2/repository path: /root/.m2/repository
@ -17,11 +57,19 @@ steps:
GPG_PASSPHRASE: GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE from_secret: GPG_PASSPHRASE
commands: commands:
- apk add gnupg
- echo "$GPG_PRIVATE_KEY" >> gpg.key - echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml - echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
- mvn --settings maven-settings.xml -U -P ossrh,release clean deploy - mvn --settings maven-settings.xml -U -P ossrh,release clean deploy
image_pull_secrets:
- DOCKER_AUTH
---
kind: pipeline
type: docker
name: release-struchkov-nexus
trigger: trigger:
ref: ref:
- refs/tags/v.*.*.* - refs/tags/v.*.*.*
@ -29,4 +77,33 @@ trigger:
volumes: volumes:
- name: m2 - name: m2
host: host:
path: /drone/volume/m2 path: /drone/volume/m2
steps:
- name: publish struchkov nexus
image: hub.docker.struchkov.dev/maven:3.9.5-eclipse-temurin-17-alpine
privileged: true
volumes:
- name: m2
path: /root/.m2/repository
environment:
GPG_PRIVATE_KEY:
from_secret: GPG_PRIVATE_KEY
MAVEN_SETTINGS:
from_secret: MAVEN_SETTINGS
GPG_PASSPHRASE:
from_secret: GPG_PASSPHRASE
commands:
- apk add gnupg
- echo "$GPG_PRIVATE_KEY" >> gpg.key
- echo "$MAVEN_SETTINGS" >> maven-settings.xml
- gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key
- mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy
image_pull_secrets:
- DOCKER_AUTH
---
kind: signature
hmac: b491639a5561dd54943ad6a141fd406aba3c092007cb82eb838b5b3097c4caca
...

86
.gitignore vendored
View File

@ -1,14 +1,3 @@
# Created by .ignore support plugin (hsz.mobi)
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
*.class *.class
*.log *.log
*.ctxt *.ctxt
@ -21,31 +10,68 @@ buildNumber.properties
*.tar.gz *.tar.gz
*.rar *.rar
hs_err_pid* hs_err_pid*
.idea/**/workspace.xml replay_pid*
.idea/**/tasks.xml target/
.idea/**/usage.statistics.xml pom.xml.tag
.idea/**/dictionaries pom.xml.releaseBackup
.idea/**/shelf pom.xml.versionsBackup
.idea/**/contentModel.xml pom.xml.next
.idea/**/dataSources/ release.properties
.idea/**/dataSources.ids dependency-reduced-pom.xml
.idea/**/dataSources.local.xml buildNumber.properties
.idea/**/sqlDataSources.xml .mvn/timing.properties
.idea/**/dynamic.xml .mvn/wrapper/maven-wrapper.jar
.idea/**/uiDesigner.xml .project
.idea/**/dbnavigator.xml .classpath
.idea/**/gradle.xml .idea/
.idea/**/libraries
cmake-build-*/ cmake-build-*/
.idea/**/mongoSettings.xml
*.iws *.iws
out/ out/
.idea_modules/ .idea_modules/
atlassian-ide-plugin.xml atlassian-ide-plugin.xml
.idea/replstate.xml
com_crashlytics_export_strings.xml com_crashlytics_export_strings.xml
crashlytics.properties crashlytics.properties
crashlytics-build.properties crashlytics-build.properties
fabric.properties fabric.properties
.idea/httpRequests *~
.idea/caches/build_file_checksums.ser .fuse_hidden*
.directory
.Trash-*
.nfs*
.gradle
**/build/
!src/**/build/
gradle-app.setting
!gradle-wrapper.jar
!gradle-wrapper.properties
.gradletasknamecache
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msix
*.msm
*.msp
*.lnk
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

View File

@ -1,16 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.haiti</groupId> <groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId> <artifactId>haiti-dependencies</artifactId>
<version>2.3.4</version> <version>3.0.4-SNAPSHOT</version>
</parent> </parent>
<artifactId>haiti-exception</artifactId> <artifactId>haiti-exception</artifactId>
<version>${haiti.exception.ver}</version>
<name>Haiti Exception</name> <name>Haiti Exception</name>
<description>General exceptions for the haiti project</description> <description>General exceptions for the haiti project</description>

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>dev.struchkov.haiti</groupId> <groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId> <artifactId>haiti-dependencies</artifactId>
<version>2.3.4</version> <version>3.0.4-SNAPSHOT</version>
</parent> </parent>
<name>Haiti Utils</name> <name>Haiti Utils</name>
@ -14,7 +12,6 @@
<url>https://github.com/haiti-projects/haiti-framework</url> <url>https://github.com/haiti-projects/haiti-framework</url>
<artifactId>haiti-utils</artifactId> <artifactId>haiti-utils</artifactId>
<version>${haiti.utils.ver}</version>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -92,6 +92,14 @@ public final class Checker {
return EMPTY.equals(s); return EMPTY.equals(s);
} }
public static boolean checkNotBlank(String s) {
return checkNotNull(s) && !s.isBlank();
}
public static boolean checkBlank(String s) {
return checkNull(s) || s.isBlank();
}
public static boolean checkFalse(Boolean b) { public static boolean checkFalse(Boolean b) {
return b != null && !b; return b != null && !b;
} }

View File

@ -3,7 +3,9 @@ package dev.struchkov.haiti.utils;
import java.util.Collection; import java.util.Collection;
import java.util.function.Supplier; import java.util.function.Supplier;
import static dev.struchkov.haiti.utils.Checker.checkBlank;
import static dev.struchkov.haiti.utils.Checker.checkEmpty; import static dev.struchkov.haiti.utils.Checker.checkEmpty;
import static dev.struchkov.haiti.utils.Checker.checkNotBlank;
import static dev.struchkov.haiti.utils.Checker.checkNotEmpty; import static dev.struchkov.haiti.utils.Checker.checkNotEmpty;
import static dev.struchkov.haiti.utils.Checker.checkNotNull; import static dev.struchkov.haiti.utils.Checker.checkNotNull;
import static dev.struchkov.haiti.utils.Checker.checkNull; import static dev.struchkov.haiti.utils.Checker.checkNull;
@ -106,9 +108,11 @@ public final class Inspector {
* @throws RuntimeException * @throws RuntimeException
*/ */
public static void isNotEmpty(Supplier<? extends RuntimeException> exception, Object... args) { public static void isNotEmpty(Supplier<? extends RuntimeException> exception, Object... args) {
if (checkEmpty(args)) { if (checkEmpty(args)) throw exception.get();
throw exception.get(); }
}
public static void isNotEmpty(String s, Supplier<? extends RuntimeException> exception) {
if (checkEmpty(s)) throw exception.get();
} }
/** /**
@ -121,6 +125,10 @@ public final class Inspector {
if (checkNotEmpty(collection)) throw exception.get(); if (checkNotEmpty(collection)) throw exception.get();
} }
public static void isEmpty(String s, Supplier<? extends RuntimeException> exception) {
if (checkNotEmpty(s)) throw exception.get();
}
/** /**
* Проверка массива на пустоту. Если массив не пустой и не null, то будет выбрашено исключение. * Проверка массива на пустоту. Если массив не пустой и не null, то будет выбрашено исключение.
* *
@ -131,10 +139,19 @@ public final class Inspector {
if (checkNotEmpty(args)) throw exception.get(); if (checkNotEmpty(args)) throw exception.get();
} }
public static void isNotBlank(String s, Supplier<? extends RuntimeException> exception) {
if (checkBlank(s)) throw exception.get();
}
public static void isBlank(String s, Supplier<? extends RuntimeException> exception) {
if (checkNotBlank(s)) throw exception.get();
}
/** /**
* Утилитарный класс. * Утилитарный класс.
*/ */
public static final class Utils { public static final class Utils {
private Utils() { private Utils() {
utilityClass(); utilityClass();
} }

View File

@ -7,7 +7,9 @@ import java.lang.reflect.Method;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.Arrays; import java.util.Arrays;
import java.util.Optional;
import static dev.struchkov.haiti.utils.Checker.checkNotNull;
import static dev.struchkov.haiti.utils.Exceptions.utilityClass; import static dev.struchkov.haiti.utils.Exceptions.utilityClass;
import static dev.struchkov.haiti.utils.Inspector.isNotNull; import static dev.struchkov.haiti.utils.Inspector.isNotNull;
@ -123,8 +125,8 @@ public class ObjectUtils {
public static boolean isGetMethod(String fieldName, Method method) { public static boolean isGetMethod(String fieldName, Method method) {
isNotNull(fieldName); isNotNull(fieldName);
return (method.getName().startsWith("get")) return (method.getName().startsWith("get"))
&& (method.getName().length() == (fieldName.length() + 3)) && (method.getName().length() == (fieldName.length() + 3))
&& method.getName().toLowerCase().endsWith(fieldName.toLowerCase()); && method.getName().toLowerCase().endsWith(fieldName.toLowerCase());
} }
/** /**
@ -137,8 +139,23 @@ public class ObjectUtils {
public static boolean isSetMethod(String fieldName, Method method) { public static boolean isSetMethod(String fieldName, Method method) {
isNotNull(fieldName); isNotNull(fieldName);
return (method.getName().startsWith("set")) return (method.getName().startsWith("set"))
&& (method.getName().length() == (fieldName.length() + 3)) && (method.getName().length() == (fieldName.length() + 3))
&& method.getName().toLowerCase().endsWith(fieldName.toLowerCase()); && method.getName().toLowerCase().endsWith(fieldName.toLowerCase());
}
/**
* Позволяет создать произвольный enum из его значения.
*
* @param name значение из enum
* @param enumClass класс enum
* @param <T> возвращаемый тип енума
* @return преобразованный енум или пустой Optional
*/
public static <T extends Enum<T>> Optional<T> createEnum(String name, Class<T> enumClass) {
if (checkNotNull(name)) {
return Optional.of(Enum.valueOf(enumClass, name));
}
return Optional.empty();
} }
} }

View File

@ -1,6 +1,6 @@
package dev.struchkov.haiti.utils; package dev.struchkov.haiti.utils;
import dev.struchkov.haiti.utils.domain.CompositeUrl; import dev.struchkov.haiti.utils.container.CompositeUrl;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;

View File

@ -1,9 +1,8 @@
package dev.struchkov.haiti.utils; package dev.struchkov.haiti.utils;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static dev.struchkov.haiti.utils.Checker.checkNotNull;
import static dev.struchkov.haiti.utils.Exceptions.utilityClass; import static dev.struchkov.haiti.utils.Exceptions.utilityClass;
/** /**
@ -13,9 +12,9 @@ import static dev.struchkov.haiti.utils.Exceptions.utilityClass;
*/ */
public final class Strings { public final class Strings {
private static final Set<Character> MD_FORBIDDEN_SYMBOLS = Stream.of( private static final Set<Character> MD_FORBIDDEN_SYMBOLS = Set.of(
'\\', '+', '`', '[', ']', '\"', '~', '*', '#', '=', '_', '>', '<' '\\', '+', '`', '[', ']', '\"', '~', '*', '#', '=', '_', '>', '<'
).collect(Collectors.toSet()); );
private Strings() { private Strings() {
utilityClass(); utilityClass();
@ -23,7 +22,6 @@ public final class Strings {
public static final String EMPTY = ""; public static final String EMPTY = "";
public static final String NEW_LINE = System.getProperty("line.separator"); public static final String NEW_LINE = System.getProperty("line.separator");
public static final String TWO_NEW_LINE = NEW_LINE + NEW_LINE;
public static final String ERR_UTILITY_CLASS = "Нельзя создать объект утилитарного класса"; public static final String ERR_UTILITY_CLASS = "Нельзя создать объект утилитарного класса";
public static final String ERR_OPERATION_NOT_SUPPORTED = "Операция не поддерживается"; public static final String ERR_OPERATION_NOT_SUPPORTED = "Операция не поддерживается";
@ -37,7 +35,7 @@ public final class Strings {
* @return Обрезанная до length количества символов строка * @return Обрезанная до length количества символов строка
*/ */
public static String cutoff(String string, int length) { public static String cutoff(String string, int length) {
if (string != null) { if (checkNotNull(string)) {
return string.length() > length ? string.substring(0, length) + "..." : string; return string.length() > length ? string.substring(0, length) + "..." : string;
} }
return null; return null;
@ -50,7 +48,7 @@ public final class Strings {
* @return Строка с экранированными символами * @return Строка с экранированными символами
*/ */
public static String escapeMarkdown(String str) { public static String escapeMarkdown(String str) {
if (str != null) { if (checkNotNull(str)) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.length(); i++) { for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i); char c = str.charAt(i);

View File

@ -1,4 +1,4 @@
package dev.struchkov.haiti.utils.domain; package dev.struchkov.haiti.utils.container;
import java.util.Optional; import java.util.Optional;

View File

@ -0,0 +1,38 @@
package dev.struchkov.haiti.utils.container;
import java.util.Objects;
public interface ContextKey<T> {
String getValue();
Class<T> getType();
static <T> ContextKey<T> of(String value, Class<T> type) {
return new ContextKey<>() {
@Override
public String getValue() {
return value;
}
@Override
public Class<T> getType() {
return type;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ContextKey<?> contextKey = (ContextKey<?>) o;
return Objects.equals(value, contextKey.getValue());
}
@Override
public int hashCode() {
return Objects.hash(value);
}
};
}
}

View File

@ -1,4 +1,6 @@
package dev.struchkov.haiti.utils; package dev.struchkov.haiti.utils.container;
import java.util.Objects;
/** /**
* Адаптированная реализация Pair из пакета javafx.util. Реализация необходима, так как в некоторых сборках JDK этот * Адаптированная реализация Pair из пакета javafx.util. Реализация необходима, так как в некоторых сборках JDK этот
@ -32,4 +34,17 @@ public class Pair<K, V> {
this.value = value; this.value = value;
} }
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pair<?, ?> pair = (Pair<?, ?>) o;
return Objects.equals(key, pair.key);
}
@Override
public int hashCode() {
return Objects.hash(key);
}
} }

View File

@ -1,7 +1,7 @@
module haiti.utils { module haiti.utils {
exports dev.struchkov.haiti.utils; exports dev.struchkov.haiti.utils;
exports dev.struchkov.haiti.utils.concurrent; exports dev.struchkov.haiti.utils.concurrent;
exports dev.struchkov.haiti.utils.domain; exports dev.struchkov.haiti.utils.container;
requires haiti.exception; requires haiti.exception;

177
pom.xml
View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>dev.struchkov.haiti</groupId> <groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-dependencies</artifactId> <artifactId>haiti-dependencies</artifactId>
<version>2.3.4</version> <version>3.0.4-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Haiti Framework</name> <name>Haiti Framework</name>
@ -29,27 +27,31 @@
</modules> </modules>
<properties> <properties>
<java.version>11</java.version> <java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<haiti.ver>2.3.4</haiti.ver> <!-- https://mvnrepository.com/artifact/jakarta.persistence/jakarta.persistence-api -->
<haiti.exception.ver>${haiti.ver}</haiti.exception.ver> <jakarta.persistence.version>3.2.0</jakarta.persistence.version>
<haiti.context.ver>${haiti.ver}</haiti.context.ver> <!-- https://mvnrepository.com/artifact/com.google.auto.service/auto-service -->
<haiti.filter.api.ver>${haiti.ver}</haiti.filter.api.ver> <google.auto.service.version>1.1.1</google.auto.service.version>
<haiti.utils.ver>${haiti.ver}</haiti.utils.ver> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<slf4j.api.version>2.0.13</slf4j.api.version>
<javax.persistence.api.version>2.2</javax.persistence.api.version> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<google.auto.service.version>1.0.1</google.auto.service.version> <plugin.maven.compiler.ver>3.13.0</plugin.maven.compiler.ver>
<slf4j.api.version>2.0.6</slf4j.api.version> <!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
<plugin.nexus.staging.ver>1.7.0</plugin.nexus.staging.ver>
<plugin.maven.compiler.ver>3.10.1</plugin.maven.compiler.ver> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
<plugin.nexus.staging.ver>1.6.13</plugin.nexus.staging.ver> <plugin.maven.source.ver>3.3.1</plugin.maven.source.ver>
<plugin.maven.source.ver>3.2.1</plugin.maven.source.ver> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
<plugin.maven.javadoc.ver>3.4.0</plugin.maven.javadoc.ver> <plugin.maven.javadoc.ver>3.7.0</plugin.maven.javadoc.ver>
<plugin.maven.gpg.ver>3.0.1</plugin.maven.gpg.ver> <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
<plugin.maven.gpg.ver>3.2.4</plugin.maven.gpg.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
<plugin.maven.release.ver>3.1.0</plugin.maven.release.ver>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@ -57,19 +59,20 @@
<dependency> <dependency>
<groupId>dev.struchkov.haiti</groupId> <groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-exception</artifactId> <artifactId>haiti-exception</artifactId>
<version>${haiti.exception.ver}</version> <version>3.0.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>dev.struchkov.haiti</groupId> <groupId>dev.struchkov.haiti</groupId>
<artifactId>haiti-utils</artifactId> <artifactId>haiti-utils</artifactId>
<version>${haiti.utils.ver}</version> <version>3.0.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.persistence</groupId> <groupId>jakarta.persistence</groupId>
<artifactId>javax.persistence-api</artifactId> <artifactId>jakarta.persistence-api</artifactId>
<version>${javax.persistence.api.version}</version> <version>${jakarta.persistence.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.auto.service</groupId> <groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId> <artifactId>auto-service</artifactId>
@ -91,11 +94,6 @@
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>nexus-staging-maven-plugin</artifactId>
<version>${plugin.nexus.staging.ver}</version> <version>${plugin.nexus.staging.ver}</version>
<extensions>true</extensions> <extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -146,10 +144,27 @@
<target>${java.version}</target> <target>${java.version}</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${plugin.maven.release.ver}</version>
<configuration>
<preparationGoals>clean install</preparationGoals>
<tagNameFormat>v.@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
<signTag>true</signTag>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -173,6 +188,11 @@
<plugin> <plugin>
<groupId>org.sonatype.plugins</groupId> <groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -189,21 +209,106 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>release-struchkov-nexus</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<serverId>struchkov-nexus</serverId>
<nexusUrl>https://nexus.struchkov.dev/nexus/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<skipStaging>true</skipStaging>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>snapshot</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<configuration>
<serverId>struchkov-nexus</serverId>
<nexusUrl>https://nexus.struchkov.dev/nexus/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
<scm> <repositories>
<connection>scm:git:https://github.com/haiti-projects/haiti-framework.git</connection> <repository>
<url>https://github.com/haiti-projects/haiti-framework</url> <id>struchkov-nexus-release</id>
<developerConnection>scm:git:https://github.com/haiti-projects/haiti-framework.git</developerConnection> <url>https://nexus.struchkov.dev/repository/maven-releases/</url>
</scm> <releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>struchkov-nexus-snapshot</id>
<url>https://nexus.struchkov.dev/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
<distributionManagement> <distributionManagement>
<repository>
<id>struchkov-nexus-release</id>
<url>https://nexus.struchkov.dev/repository/maven-releases/</url>
</repository>
<snapshotRepository> <snapshotRepository>
<id>ossrh</id> <id>struchkov-nexus-snapshot</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> <url>https://nexus.struchkov.dev/repository/maven-snapshots/</url>
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
<scm>
<connection>scm:git:https://git.struchkov.dev/Haiti/haiti-framework.git</connection>
<url>https://git.struchkov.dev/Haiti/haiti-framework</url>
<developerConnection>scm:git:https://git.struchkov.dev/Haiti/haiti-framework.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers> <developers>
<developer> <developer>
<id>uPagge</id> <id>uPagge</id>