-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add Windows build profile #1011
base: main
Are you sure you want to change the base?
Add Windows build profile #1011
Conversation
Hi @ammachado What doesn't work when you build the current |
Hi @fabapp2, thanks for looking into this. I'm using a Windows VM on my macOS machine, and I'm running the arm64 version of Windows 11 22H2 (
I had to make two small changes to get the project running: RocksDB is not supported on Windows Arm64 (no substitute) and Snappy must be upgraded to work on Windows Amr64: diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/MavenPomCacheProvider.java b/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/MavenPomCacheProvider.java
index 1036ff29..095dbbb6 100644
--- a/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/MavenPomCacheProvider.java
+++ b/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/MavenPomCacheProvider.java
@@ -31,7 +31,7 @@ public class MavenPomCacheProvider {
private final MavenPomCache pomCache;
public MavenPomCacheProvider(Optional<MavenPomCache> mavenPomCacheProvider) {
- this.pomCache = mavenPomCacheProvider.orElseGet(this::rocksdb);
+ this.pomCache = mavenPomCacheProvider.orElseGet(org.openrewrite.maven.cache.InMemoryMavenPomCache::new);
}
@NotNull
diff --git a/pom.xml b/pom.xml
index 17874499..ec6002c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -266,6 +266,12 @@
<artifactId>spring-asciidoctor-backends</artifactId>
<version>${spring-asciidoctor-backends.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.xerial.snappy</groupId>
+ <artifactId>snappy-java</artifactId>
+ <version>1.1.10.5</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies> And this is what I get:
This fixes the problem: diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/config/ConfigRecipeTestHelper.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/config/ConfigRecipeTestHelper.java
index 9dc167e6..1901a597 100644
--- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/config/ConfigRecipeTestHelper.java
+++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/config/ConfigRecipeTestHelper.java
@@ -62,9 +62,9 @@ public class ConfigRecipeTestHelper {
public static Pair<String, String> provideIO(String inputFilePath) throws IOException {
String fileContent = Files.readString(Path.of(inputFilePath));
- String[] k = fileContent.split("expected:.*" + LS);
+ String[] k = fileContent.split("expected:.*" + System.lineSeparator());
- return new ImmutablePair<>(k[0].replaceAll("input:.*" + LS, ""), k[1]);
+ return new ImmutablePair<>(k[0].replaceAll("input:.*" + System.lineSeparator(), ""), k[1]);
} |
Add a new
windows
profile to the maven build to simulate Windows line endings on a Linux/macOS machine.Build the build is still failing, even considering the work done on #958, #965 and #969.
Run
mvn -Pwindows clean install
to verify the failing tests.