Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle AutoCloseable connexion and database #9

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 17 additions & 17 deletions autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ limitations under the License.
-->
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-parent</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>1.1.2-SNAPSHOT</version>
</parent>

<artifactId>preliquibase-spring-boot-autoconfigure</artifactId>
<packaging>jar</packaging>
<name>Spring Boot AutoConfiguration :: Pre-Liquibase AutoConfiguration</name>

<description>Autoconfiguration for Pre-Liquibase</description>

<dependencies>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
Expand All @@ -39,30 +41,28 @@ limitations under the License.
<artifactId>liquibase-core</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version> <!-- Must be at least 2.22 for Junit 5 -->
<version>2.22.2</version> <!-- Must be at least 2.22 for Junit 5 -->
</plugin>



<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -92,12 +92,12 @@ limitations under the License.
</tag>

<tag><name>param</name></tag>
<tag><name>return</name></tag>
<tag><name>throws</name></tag>
<tag><name>since</name></tag>
<tag><name>version</name></tag>
<tag><name>serialData</name></tag>
<tag><name>see</name></tag>
<tag><name>return</name></tag>
<tag><name>throws</name></tag>
<tag><name>since</name></tag>
<tag><name>version</name></tag>
<tag><name>serialData</name></tag>
<tag><name>see</name></tag>
</tags>
</configuration>
</plugin>
Expand Down
31 changes: 20 additions & 11 deletions example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,32 @@ limitations under the License.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.2</version>
<version>2.7.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-example</artifactId>
<version>1.1.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Spring Boot AutoConfiguration :: Pre-Liquibase Example</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<java.version>1.8</java.version>
</properties>

<dependencyManagement>
zorglube marked this conversation as resolved.
Show resolved Hide resolved
<dependencies>
<dependency>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-parent</artifactId>
<version>1.1.2-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -44,11 +55,10 @@ limitations under the License.
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>

<dependency>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-starter</artifactId>
<version>1.1.2-SNAPSHOT</version> <!-- in a real life application you would not use a SNAPSHOT version here -->
</dependency>

<!-- JDBC drivers - a real life application would probably have
Expand All @@ -71,22 +81,21 @@ limitations under the License.
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
</dependency>
<dependency>
</dependency>
<dependency>
<!-- Embedded db. Used when no DataSource is configured -->
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Skip deploying 'example' (current project) -->
Expand All @@ -105,4 +114,4 @@ limitations under the License.

</plugins>
</build>
</project>
</project>
54 changes: 29 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,56 @@ limitations under the License.
-->
<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" child.project.url.inherit.append.path="false">
<modelVersion>4.0.0</modelVersion>

<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-parent</artifactId>
<version>1.1.2-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
<module>autoconfigure</module>
<module>example</module>
<module>starter</module>
</modules>
<name>Spring Boot AutoConfiguration :: Pre-Liquibase Parent</name>

<name>Spring Boot AutoConfiguration :: Pre-Liquibase Parent</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.scm.id>github.com-lbruun.net</project.scm.id>
<spring.boot.version>2.5.2</spring.boot.version>
<spring.boot.version>2.7.0</spring.boot.version>
</properties>



<url>https://github.com/lbruun/Pre-Liquibase</url>

<description>
Parent for Pre-Liquibase Spring Boot module
</description>
<description>Parent for Pre-Liquibase Spring Boot module</description>

<organization>
<name>lbruun.net</name>
</organization>
<licenses>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
<connection>scm:git:https://github.com/lbruun/Pre-Liquibase.git</connection>
<developerConnection>scm:git:https://github.com/lbruun/Pre-Liquibase.git</developerConnection>
<url>https://github.com/lbruun/Pre-Liquibase</url>
<tag>HEAD</tag>
</scm>
<tag>HEAD</tag>
</scm>


<distributionManagement>
<repository>
<id>ossrh-lbruun</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

</distributionManagement>

<developers>
<developer>
Expand All @@ -88,13 +85,21 @@ limitations under the License.
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-autoconfigure</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-starter</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>



<build>

<pluginManagement>
<plugins>
<plugin>
Expand All @@ -103,7 +108,7 @@ limitations under the License.
</plugin>
</plugins>
</pluginManagement>

<plugins>
<!-- Required for publishing to Maven Central -->
<plugin>
Expand All @@ -123,7 +128,7 @@ limitations under the License.
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.5</version>
<configuration>
<flattenMode>ossrh</flattenMode>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<!-- enable flattening -->
Expand All @@ -144,7 +149,7 @@ limitations under the License.
</execution>
</executions>
</plugin>

<!-- Skip deploying 'parent' (current project) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -157,9 +162,8 @@ limitations under the License.
</plugins>
</build>


<profiles>
<profile>
<profiles>
<profile>
<id>release-to-central</id>
<build>
<plugins>
Expand Down Expand Up @@ -188,7 +192,7 @@ limitations under the License.
</goals>
</execution>
</executions>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down
8 changes: 3 additions & 5 deletions starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@ limitations under the License.
<artifactId>preliquibase-spring-boot-starter</artifactId>
<packaging>jar</packaging>
<name>Spring Boot AutoConfiguration :: Pre-Liquibase Starter</name>

<description>Bootstrapping for Pre-Liquibase</description>


<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
</dependencies>

<build>
Expand Down