Closed diamondq closed 4 years ago
please PR
thank you for PR, released: https://search.maven.org/artifact/com.carrotgarden.maven/flatten-maven-plugin
please confirm v 1.7.x works for you https://github.com/random-maven/flatten-maven-plugin/releases
Seems to be working great. Thanks
A dependency with an
<optional>true</optional>
set, loses this flag when copied over to the flattened pom. This seems like a simple fix in Support.resolveApplyDeclared (ie. dependency.setOptional(artifact.isOptional)); ).EDIT: Turns out that the scenario only occurs if the dependency is NOT present in the local POM's section. For example, within a profile or a parent. If it's in the local POM, the existing code works fine.
Cheers