Добавил плагин для загрузки в мавенцентрал и провел небольшой рефакторинг
This commit is contained in:
parent
7af6c39b03
commit
d3c29c4275
100
pom.xml
100
pom.xml
@ -8,6 +8,18 @@
|
||||
<artifactId>autoresponder</artifactId>
|
||||
<version>1.8-RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Abstract Autoresponder</name>
|
||||
<description>Abstract implementation for processing text requests.</description>
|
||||
<url>https://github.com/uPagge/autoresponder</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD License</name>
|
||||
<url>https://github.com/uPagge/autoresponder/blob/master/LICENSE</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@ -22,9 +34,17 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<slf4j.ver>1.7.26</slf4j.ver>
|
||||
<junit.ver>4.12</junit.ver>
|
||||
<lombok.ver>1.18.6</lombok.ver>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -43,10 +63,88 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.6</version>
|
||||
<version>${lombok.ver}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/uPagge/autoresponder.git</connection>
|
||||
<url>https://github.com/uPagge/autoresponder</url>
|
||||
<developerConnection>scm:git:https://github.com/uPagge/autoresponder.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.7</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.7</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>uPagge</id>
|
||||
|
@ -52,4 +52,5 @@ public abstract class Unit<U extends Unit> {
|
||||
this.priority = Optional.ofNullable(priority).orElse(10);
|
||||
this.nextUnits = nextUnits;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.sadtech.autoresponder.repository;
|
||||
|
||||
import lombok.NonNull;
|
||||
import org.sadtech.autoresponder.entity.Unit;
|
||||
import org.sadtech.autoresponder.entity.UnitPointer;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -23,7 +24,7 @@ public interface UnitPointerRepository {
|
||||
|
||||
/**
|
||||
* @param entityId Идентификатор пользователя
|
||||
* @return Объект с последним обработанным {@link org.sadtech.autoresponder.entity.Unit} для пользователя
|
||||
* @return Объект с последним обработанным {@link Unit} для пользователя
|
||||
*/
|
||||
Optional<UnitPointer> findByEntityId(@NonNull Long entityId);
|
||||
|
||||
|
@ -42,4 +42,5 @@ public class UnitPointerRepositoryMap implements UnitPointerRepository {
|
||||
public Optional<UnitPointer> findByEntityId(@NonNull Long entityId) {
|
||||
return Optional.ofNullable(unitPointerMap.get(entityId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,5 +27,4 @@ public interface UnitPointerService {
|
||||
|
||||
void edit(@NonNull Long entityId, Unit unit);
|
||||
|
||||
|
||||
}
|
||||
|
@ -37,4 +37,5 @@ public class UnitPointerServiceImpl implements UnitPointerService {
|
||||
public boolean check(@NonNull Long entityId) {
|
||||
return unitPointerRepository.findByEntityId(entityId).isPresent();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,5 +13,7 @@ import java.lang.annotation.Target;
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Description {
|
||||
|
||||
String value() default "";
|
||||
|
||||
}
|
||||
|
@ -12,4 +12,5 @@ final class Message {
|
||||
private Message() {
|
||||
throw new IllegalStateException(UTILITY_CLASS);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user