diff --git a/flyway-community-db-support-archetype/pom.xml b/flyway-community-db-support-archetype/pom.xml new file mode 100644 index 0000000..e3271f0 --- /dev/null +++ b/flyway-community-db-support-archetype/pom.xml @@ -0,0 +1,29 @@ + + + + 4.0.0 + org.flywaydb + flyway-community-db-support-archetype + 10.7.2 + maven-archetype + + Archetype - flyway-community-db-support-archetype + An archetype for creating a new Flyway Community Database Support module + https://flywaydb.org + + + UTF-8 + 17 + + + + + + org.apache.maven.archetype + archetype-packaging + 3.2.1 + + + + diff --git a/flyway-community-db-support-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/flyway-community-db-support-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..e0f35d0 --- /dev/null +++ b/flyway-community-db-support-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,24 @@ + + + + + + 10.7.2 + + + flyway-database-example + flyway-database-\w+ + + + + + + src/main/java + + **/*.java + + + + diff --git a/flyway-community-db-support-archetype/src/main/resources/archetype-resources/pom.xml b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..5b5c17d --- /dev/null +++ b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + + org.flywaydb + flyway-community-db-support + ${parentVersion} + + + ${artifactId} + + + UTF-8 + 17 + + + + + ${project.groupId} + flyway-core + + + + + + + src/main/resources + true + + + + + maven-resources-plugin + + + maven-jar-plugin + + + + diff --git a/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/java/org/flywaydb/community/database/example/ExampleDatabaseType.java b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/java/org/flywaydb/community/database/example/ExampleDatabaseType.java new file mode 100644 index 0000000..8ca26c2 --- /dev/null +++ b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/java/org/flywaydb/community/database/example/ExampleDatabaseType.java @@ -0,0 +1,53 @@ +package org.flywaydb.community.database.example; + +import java.sql.Connection; +import org.flywaydb.core.api.ResourceProvider; +import org.flywaydb.core.api.configuration.Configuration; +import org.flywaydb.core.internal.database.base.BaseDatabaseType; +import org.flywaydb.core.internal.database.base.Database; +import org.flywaydb.core.internal.jdbc.JdbcConnectionFactory; +import org.flywaydb.core.internal.jdbc.StatementInterceptor; +import org.flywaydb.core.internal.parser.Parser; +import org.flywaydb.core.internal.parser.ParsingContext; + +public class ExampleDatabaseType extends BaseDatabaseType { + + @Override + public String getName() { + return null; + } + + @Override + public int getNullType() { + return 0; + } + + @Override + public boolean handlesJDBCUrl(final String url) { + return false; + } + + @Override + public String getDriverClass(final String url, final ClassLoader classLoader) { + return null; + } + + @Override + public boolean handlesDatabaseProductNameAndVersion(final String databaseProductName, + final String databaseProductVersion, + final Connection connection) { + return false; + } + + @Override + public Database createDatabase(final Configuration configuration, final JdbcConnectionFactory jdbcConnectionFactory, + final StatementInterceptor statementInterceptor) { + return null; + } + + @Override + public Parser createParser(final Configuration configuration, final ResourceProvider resourceProvider, + final ParsingContext parsingContext) { + return null; + } +} \ No newline at end of file diff --git a/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin new file mode 100644 index 0000000..b0431cc --- /dev/null +++ b/flyway-community-db-support-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin @@ -0,0 +1 @@ +org.flywaydb.community.database.example.ExampleDatabaseType \ No newline at end of file diff --git a/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/archetype.properties b/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/archetype.properties new file mode 100644 index 0000000..c2303f8 --- /dev/null +++ b/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/archetype.properties @@ -0,0 +1,2 @@ +artifactId=flyway-database-example +parentVersion=10.7.2 \ No newline at end of file diff --git a/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/goal.txt b/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/goal.txt new file mode 100644 index 0000000..4a1a71d --- /dev/null +++ b/flyway-community-db-support-archetype/src/test/resources/projects/flyway-database-example/goal.txt @@ -0,0 +1 @@ +verify \ No newline at end of file diff --git a/pom.xml b/pom.xml index f1a3085..b9eee41 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,7 @@ flyway-database-yugabytedb flyway-database-clickhouse flyway-database-oceanbase + flyway-community-db-support-archetype