Skip to content

Commit

Permalink
Merge pull request #45 from sciencesakura/refactor_pom
Browse files Browse the repository at this point in the history
Upgrade POI 5.2.3->5.2.5 and others
  • Loading branch information
sciencesakura authored Mar 21, 2024
2 parents 2b7d18c + 32accd7 commit e756955
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 66 deletions.
8 changes: 5 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<dependency>
<groupId>com.ninja-squad</groupId>
<artifactId>DbSetup</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
Expand All @@ -32,8 +31,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -61,6 +59,7 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<propertyExpansion>
Expand All @@ -69,6 +68,7 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
Expand All @@ -79,12 +79,14 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<reportOutputDirectory>${project.basedir}/../docs</reportOutputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
Expand Down
10 changes: 2 additions & 8 deletions kotlin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
<dependency>
<groupId>com.ninja-squad</groupId>
<artifactId>DbSetup-kotlin</artifactId>
<version>2.1.0</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sciencesakura</groupId>
Expand All @@ -39,7 +32,6 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -69,6 +61,7 @@
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
Expand All @@ -79,6 +72,7 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ fun DbSetupBuilder.excel(location: String) {
* @param configure the function used to configure the Excel import
* @throws IllegalArgumentException if the source file was not found
*/
fun DbSetupBuilder.excel(location: String, configure: Import.Builder.() -> Unit) {
fun DbSetupBuilder.excel(
location: String,
configure: Import.Builder.() -> Unit,
) {
val excelBuilder = Import.excel(location)
excelBuilder.configure()
execute(excelBuilder.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

class ExcelTest {

val url = "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"

val username = "sa"
Expand All @@ -43,20 +42,22 @@ class ExcelTest {

@BeforeEach
fun setUp() {
val table_11 = """
val table11 =
"""
create table if not exists table_11 (
id integer primary key,
name varchar(100)
)
""".trimIndent()
val table_12 = """
""".trimIndent()
val table12 =
"""
create table if not exists table_12 (
id integer primary key,
name varchar(100)
)
""".trimIndent()
""".trimIndent()
dbSetup(destination) {
sql(table_11, table_12)
sql(table11, table12)
truncate("table_11", "table_12")
}.launch()
}
Expand Down
Loading

0 comments on commit e756955

Please sign in to comment.