Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
darwin_mysql_junit:
image: mysql:8.0
image: mysql:8.4
environment:
- MYSQL_USER=test
- MYSQL_PASSWORD=test
Expand Down
47 changes: 19 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring.version>5.3.21</spring.version>
<spring.version>5.3.39</spring.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit-platform.version>5.7.0</junit-platform.version>
<junit-platform.version>5.12.1</junit-platform.version>
<jupiter-surefire.version>1.3.2</jupiter-surefire.version>
<maven.toolchains.version>3.2.0</maven.toolchains.version>

<java.compileVersion>8</java.compileVersion>
<maven.compiler.version>3.10.1</maven.compiler.version>
<lombok.version>1.18.24</lombok.version>
<maven.compiler.version>3.14.1</maven.compiler.version>
<lombok.version>1.18.44</lombok.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -96,7 +96,7 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
<version>1.3.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -128,7 +128,7 @@
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
<version>2.3.34</version>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -160,13 +160,13 @@
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.5</version>
<version>4.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.29</version>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -178,25 +178,25 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.220</version>
<version>2.4.240</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<version>2.0.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>2.0.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>2.17.2</version>
<version>2.24.3</version>
<type>pom</type>
<scope>test</scope>
</dependency>
Expand All @@ -208,7 +208,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.14.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
Expand All @@ -233,7 +233,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.5.4</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
Expand Down Expand Up @@ -262,7 +262,7 @@
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>3.1.4</version>
<executions>
<execution>
<id>default-deploy</id>
Expand All @@ -276,7 +276,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.1</version>
<configuration>
<localCheckout>true</localCheckout>
<pushChanges>false</pushChanges>
Expand Down Expand Up @@ -306,7 +306,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
<configuration>
<forceCreation>true</forceCreation>
<encoding>UTF-8</encoding>
Expand All @@ -318,15 +318,6 @@
<goal>jar</goal>
</goals>
</execution>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<configuration> <!-- add this to disable checking -->
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/one/edee/darwin/Darwin.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
@CommonsLog
public class Darwin implements InitializingBean, ApplicationContextAware {
public static final String DARWIN_COMPONENT_NAME = "darwin";
public static final String DARWIN_COMPONENT_VERSION = "1.0";
public static final String DARWIN_COMPONENT_VERSION = "1.1";

@Getter @Setter private String dataSourceName = "dataSource";
@Getter @Setter private String transactionManagerName = "transactionManager";
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/darwin/sql/h2/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ create table DARWIN
(
component VARCHAR(255) not null,
modified TIMESTAMP not null,
version VARCHAR(20) null
version VARCHAR(20) null,
constraint CNUN_DARWIN_COMPONENT unique (component)
);

create table DARWIN_LOCK
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/META-INF/darwin/sql/h2/guess_1.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SELECT CASE
WHEN COUNT(*) > 0 THEN 1
ELSE 1 / 0
END
FROM INFORMATION_SCHEMA.INDEXES
WHERE TABLE_NAME = 'DARWIN'
AND COLUMN_NAME = 'COMPONENT'
AND NON_UNIQUE = FALSE;
1 change: 1 addition & 0 deletions src/main/resources/META-INF/darwin/sql/h2/patch_1.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE UNIQUE INDEX IX_DARWIN_COMPONENT ON DARWIN (component);
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/darwin/sql/mysql/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ create table DARWIN
modified datetime not null,
version varchar(20) null,
constraint CNPK_DARWIN primary key (id),
index IX_DARWIN_COMPONENT (component)
unique index IX_DARWIN_COMPONENT (component)
) engine=InnoDB;

create table DARWIN_LOCK
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/META-INF/darwin/sql/mysql/guess_1.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT COUNT(*)
FROM information_schema.statistics
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'DARWIN'
AND INDEX_NAME = 'IX_DARWIN_COMPONENT'
AND NON_UNIQUE = 0;
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/darwin/sql/mysql/patch_1.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE DARWIN
DROP INDEX IX_DARWIN_COMPONENT,
ADD UNIQUE INDEX IX_DARWIN_COMPONENT (component);
Loading