Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ protected Model createFlattenedPom(File pomFile) throws MojoExecutionException,
}
}

// remove pom.xml properties revision property
String oldVersion = originalPom.getVersion();
if (oldVersion != null && !oldVersion.isEmpty() && oldVersion.startsWith("${") && oldVersion.endsWith("}")) {
getLog().info("find version " + oldVersion + " remove to properties");
flattenedPom.getProperties().remove(oldVersion.substring(2, oldVersion.length() - 1));
}

return flattenedPom;
}

Expand Down Expand Up @@ -922,9 +929,9 @@ protected Model createEffectivePom(
}
}
};

buildingResult = modelBuilderThreadSafetyWorkaround.build(
buildingRequest, customInjector, new DefaultProfileSelector());

} catch (ModelBuildingException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
Expand Down