Eric Norman created SLING-10069:
-----------------------------------
Summary: The generated features target dir is created in the wrong
place
Key: SLING-10069
URL: https://issues.apache.org/jira/browse/SLING-10069
Project: Sling
Issue Type: Bug
Affects Versions: slingfeature-maven-plugin 1.4.22
Reporter: Eric Norman
Fix For: slingfeature-maven-plugin 1.4.24
After switching to the 1.4.22 release version of the plugin, I noticed that the
change for SLING-10035 appears to be creating a set of empty folders in the
wrong place in my linux environment.
Using a debugger, I see that the targetDir File object is constructed at
AbstractFeatureMojo line 244 with the "child" second argument already resolved
to be an absolute path. This appears to append the absolute child path to the
parent path rather than checking if "child" is relative or absolute to resolve
it.
[https://github.com/apache/sling-slingfeature-maven-plugin/blob/master/src/main/java/org/apache/sling/feature/maven/mojos/AbstractFeatureMojo.java#L244]
Expect the targetDir resolution to properly resolve the path with something
like this:
{code:java}
final File targetDir =
this.project.getBasedir().toPath().resolve(this.project.getBuild().getDirectory()).toFile();
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)