Skip to content

Commit 310619a

Browse files
Deprecating ProjectContext.getBuildFile() (#793)
* Deprecating ProjectContext * updating description text --------- Co-authored-by: Fabian Krüger <[email protected]>
1 parent 3867d19 commit 310619a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContext.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ private Module mapToModule(BuildFile buildFile) {
7272
return new Module(buildFileName, buildFile, projectRootDirectory, modulePath, getProjectResources(), javaRefactoringFactory, basePackageCalculator, javaParser, executionContext);
7373
}
7474

75+
/**
76+
* This is a legacy way of retrieving applications build file.
77+
* This function does not generalise for situations where application is under a multi-module maven structure
78+
* Use {@link #getApplicationModules()} instead of getBuildFile()
79+
* If one would want to retrieve the root build file use:
80+
* {@link #getApplicationModules()} and then call to get root module using: {@link ApplicationModules#getRootModule()}
81+
* */
82+
@Deprecated(forRemoval = true)
7583
public BuildFile getBuildFile() {
7684
return search(new RootBuildFileFilter());
7785
}

0 commit comments

Comments
 (0)