-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flyway-community-db-support-archetype
- Loading branch information
Showing
8 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<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> | ||
<groupId>org.flywaydb</groupId> | ||
<artifactId>flyway-community-db-support-archetype</artifactId> | ||
<version>10.7.2</version> | ||
<packaging>maven-archetype</packaging> | ||
|
||
<name>Archetype - flyway-community-db-support-archetype</name> | ||
<description>An archetype for creating a new Flyway Community Database Support module</description> | ||
<url>https://flywaydb.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.release>17</maven.compiler.release> | ||
</properties> | ||
|
||
<build> | ||
<extensions> | ||
<extension> | ||
<groupId>org.apache.maven.archetype</groupId> | ||
<artifactId>archetype-packaging</artifactId> | ||
<version>3.2.1</version> | ||
</extension> | ||
</extensions> | ||
</build> | ||
</project> |
24 changes: 24 additions & 0 deletions
24
...y-community-db-support-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" | ||
name="${artifactId}"> | ||
|
||
<requiredProperties> | ||
<requiredProperty key="parentVersion"> | ||
<defaultValue>10.7.2</defaultValue> | ||
</requiredProperty> | ||
<requiredProperty key="artifactId"> | ||
<defaultValue>flyway-database-example</defaultValue> | ||
<validationRegex>flyway-database-\w+</validationRegex> | ||
</requiredProperty> | ||
</requiredProperties> | ||
|
||
<fileSets> | ||
<fileSet filtered="true" packaged="true"> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</archetype-descriptor> |
43 changes: 43 additions & 0 deletions
43
flyway-community-db-support-archetype/src/main/resources/archetype-resources/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<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>org.flywaydb</groupId> | ||
<artifactId>flyway-community-db-support</artifactId> | ||
<version>${parentVersion}</version> | ||
</parent> | ||
|
||
<artifactId>${artifactId}</artifactId> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.release>17</maven.compiler.release> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>flyway-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
53 changes: 53 additions & 0 deletions
53
...-resources/src/main/java/org/flywaydb/community/database/example/ExampleDatabaseType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ype-resources/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.flywaydb.community.database.example.ExampleDatabaseType |
2 changes: 2 additions & 0 deletions
2
...upport-archetype/src/test/resources/projects/flyway-database-example/archetype.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
artifactId=flyway-database-example | ||
parentVersion=10.7.2 |
1 change: 1 addition & 0 deletions
1
...mmunity-db-support-archetype/src/test/resources/projects/flyway-database-example/goal.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters