Build self-contained Windows JAR release

This commit is contained in:
张家训
2026-08-03 15:37:06 +08:00
parent 516989b8e6
commit f0950429a6
4 changed files with 121 additions and 229 deletions
@@ -30,13 +30,14 @@ class BuildPortabilityTest {
}
@Test
void launch4jOnlyBelongsToTheWindowsProfile() throws Exception {
void launch4jRequiresAnExplicitWindowsPackageProfile() throws Exception {
Document pom = parsePom();
Element project = element(pom, "project");
assertFalse(hasPlugin(directChild(project, "build"), "launch4j-maven-plugin"));
Element windowsProfile = profile(project, "windows-package");
assertEquals("Windows", childText(directChild(directChild(windowsProfile, "activation"), "os"), "family"));
Element property = directChild(directChild(windowsProfile, "activation"), "property");
assertEquals("windows.package", childText(property, "name"));
assertTrue(hasPlugin(directChild(windowsProfile, "build"), "launch4j-maven-plugin"));
}