Skip to content

Commit

Permalink
Move Flyway into separate artifact
Browse files Browse the repository at this point in the history
Now it is not part of the ddi and dmf starters - only mgmt (where could be excluded on packaging)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
  • Loading branch information
avgustinmm committed Nov 13, 2024
1 parent 0d40837 commit 626a81a
Show file tree
Hide file tree
Showing 175 changed files with 101 additions and 20 deletions.
5 changes: 5 additions & 0 deletions hawkbit-mgmt/hawkbit-mgmt-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<artifactId>hawkbit-artifact-repository-filesystem</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-jpa-flyway</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-jpa</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions hawkbit-repository/hawkbit-repository-jpa-flyway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# hawkBit JPA Flyway migration

JPA Flyway migrations scrypts
43 changes: 43 additions & 0 deletions hawkbit-repository/hawkbit-repository-jpa-flyway/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Copyright (c) 2015 Bosch Software Innovations GmbH and others
This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>org.eclipse.hawkbit</groupId>
<version>${revision}</version>
<artifactId>hawkbit-repository</artifactId>
</parent>

<artifactId>hawkbit-repository-jpa-flyway</artifactId>
<name>hawkBit :: Repository :: JPA Flyway Migration</name>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>

<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.hawkbit.autoconfigure.repository.jpa.flyway;

import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
* hawkBit Flyway autoconfiguration loading the flyway defaults properties.
*/
@Configuration
@PropertySource("classpath:/hawkbit-jpa-flyway-defaults.properties")
@AutoConfigureBefore(FlywayAutoConfiguration.class) // ensure that property source is loaded before FlywayAutoConfiguration
public class HawkBitFlywayAutoConfiguration {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.hawkbit.autoconfigure.repository.jpa.flyway.HawkBitFlywayAutoConfiguration
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#

# Flyway DDL
spring.flyway.enabled=true
spring.flyway.clean-disabled=true
spring.flyway.sql-migration-suffixes=${spring.jpa.database}.sql
spring.flyway.table=schema_version
### Flyway DDL - END
3 changes: 0 additions & 3 deletions hawkbit-repository/hawkbit-repository-jpa/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions hawkbit-repository/hawkbit-repository-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
<dependency>
<groupId>cz.jirutka.rsql</groupId>
<artifactId>rsql-parser</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ spring.jpa.properties.eclipselink.logging.level=off
# Cluster aware
spring.jpa.properties.eclipselink.query-results-cache=false
spring.jpa.properties.eclipselink.cache.shared.default=false
# Flyway DDL
spring.flyway.enabled=true
spring.flyway.clean-disabled=true
spring.flyway.sql-migration-suffixes=${spring.jpa.database}.sql
spring.flyway.table=schema_version
### JPA / Datasource - END
5 changes: 5 additions & 0 deletions hawkbit-repository/hawkbit-repository-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>hawkbit-repository-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-jpa-flyway</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-security-core</artifactId>
Expand Down
9 changes: 5 additions & 4 deletions hawkbit-repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
<packaging>pom</packaging>

<modules>
<module>hawkbit-repository-jpa</module>
<module>hawkbit-repository-api</module>
<module>hawkbit-repository-test</module>
<module>hawkbit-repository-core</module>
</modules>
<module>hawkbit-repository-jpa</module>
<module>hawkbit-repository-jpa-flyway</module>

</project>
<module>hawkbit-repository-test</module>
</modules>
</project>

0 comments on commit 626a81a

Please sign in to comment.