Reload pom contents as needed before finding parent POMs (#1022)
This commit is contained in:
Родитель
93053083d7
Коммит
8ee1ef0bbe
|
@ -19,7 +19,16 @@ export class SelectParentPom implements IProjectCreationStep {
|
|||
}
|
||||
];
|
||||
MavenProjectManager.projects
|
||||
.filter(project => project.artifactId && project.pomPath && pathExistsSync(project.pomPath))
|
||||
.filter(project => project.pomPath && pathExistsSync(project.pomPath))
|
||||
.map(project => {
|
||||
if (!project.artifactId) {
|
||||
// reload pom contents
|
||||
project.parsePom();
|
||||
}
|
||||
|
||||
return project;
|
||||
})
|
||||
.filter(project => project.artifactId && project.groupId)
|
||||
.sort((a, b) => a.pomPath.length - b.pomPath.length)
|
||||
.forEach(project => {
|
||||
items.push({
|
||||
|
|
|
@ -59,7 +59,9 @@ export class MavenProjectManager {
|
|||
}
|
||||
|
||||
public static add(pomPath: string): void {
|
||||
MavenProjectManager.getInstance()._projectMap.set(pomPath, new MavenProject(pomPath));
|
||||
const newProject = new MavenProject(pomPath);
|
||||
newProject.parsePom();
|
||||
MavenProjectManager.getInstance()._projectMap.set(pomPath, newProject);
|
||||
}
|
||||
|
||||
public static remove(pomPath: string): void {
|
||||
|
|
Загрузка…
Ссылка в новой задаче