File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 21
21
import org .mockito .ArgumentCaptor ;
22
22
import org .mockito .Mockito ;
23
23
import org .springframework .context .ApplicationEventPublisher ;
24
+ import org .springframework .sbm .GitHubIssue ;
24
25
import org .springframework .sbm .build .api .BuildFile ;
25
26
import org .springframework .sbm .build .api .DependenciesChangedEvent ;
26
27
import org .springframework .sbm .build .api .Dependency ;
@@ -2683,4 +2684,25 @@ void upgradeParentVersion() {
2683
2684
assertThat (openRewriteMavenBuildFile .getParentPomDeclaration ()).isNotEmpty ();
2684
2685
assertThat (openRewriteMavenBuildFile .getParentPomDeclaration ().get ().getVersion ()).isEqualTo ("2.5.6" );
2685
2686
}
2687
+
2688
+ @ GitHubIssue ("https://github.com/spring-projects-experimental/spring-boot-migrator/issues/55" )
2689
+ @ Test
2690
+ void parsingPomWithEmptyPropertiesSectionShouldSucceed () {
2691
+ String pomXml = """
2692
+ <?xml version="1.0" encoding="UTF-8"?>
2693
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2694
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2695
+ <modelVersion>4.0.0</modelVersion>
2696
+ <groupId>org.springframework.boot</groupId>
2697
+ <artifactId>spring-boot-starter-parent</artifactId>
2698
+ <version>2.4.12</version>
2699
+ <properties>
2700
+
2701
+ </properties>
2702
+ </project>
2703
+ """ ;
2704
+
2705
+ ProjectContext projectContext = TestProjectContext .buildProjectContext ().withMavenRootBuildFileSource (pomXml ).build ();
2706
+ assertThat (projectContext .getApplicationModules ().getRootModule ().getBuildFile ()).isNotNull ();
2707
+ }
2686
2708
}
You can’t perform that action at this time.
0 commit comments