Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
Expand Down Expand Up @@ -103,7 +102,7 @@ void build(BuildProducer<FeatureBuildItem> featureProducer,

Collection<String> dataSourceNames = getDataSourceNames(jdbcDataSourceBuildItems);

List<String> applicationMigrations = discoverApplicationMigrations(getMigrationLocations(dataSourceNames));
Set<String> applicationMigrations = discoverApplicationMigrations(getMigrationLocations(dataSourceNames));
recorder.setApplicationMigrationFiles(applicationMigrations);

Set<Class<?>> javaMigrationClasses = new HashSet<>();
Expand Down Expand Up @@ -196,9 +195,9 @@ private Collection<String> getMigrationLocations(Collection<String> dataSourceNa
return migrationLocations;
}

private List<String> discoverApplicationMigrations(Collection<String> locations) throws IOException, URISyntaxException {
private Set<String> discoverApplicationMigrations(Collection<String> locations) throws IOException, URISyntaxException {
try {
List<String> applicationMigrationResources = new ArrayList<>();
Set<String> applicationMigrationResources = new HashSet<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one @geoand

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, because we do resource discovery at build time we need this to avoid duplicated being passed to Flyway

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this fix make it into 1.5.3?

Copy link
Contributor Author

@geoand geoand Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There won't be a 1.5.3 most likely. It should hopefully be in the upcoming 1.6.0.CR1.

cc @gsmet

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any ETA on 1.6.0.CR1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in a few days

// Locations can be a comma separated list
for (String location : locations) {
// Strip any 'classpath:' protocol prefixes because they are assumed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select count(1) from multiple_flyway_test;