You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "A. J. David Bosschaert (Jira)" <ji...@apache.org> on 2021/01/19 09:23:00 UTC

[jira] [Comment Edited] (SLING-10069) The generated features target dir is created in the wrong place

    [ https://issues.apache.org/jira/browse/SLING-10069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17267774#comment-17267774 ] 

A. J. David Bosschaert edited comment on SLING-10069 at 1/19/21, 9:22 AM:
--------------------------------------------------------------------------

/cc [~andysch]


was (Author: davidb):
/cc [~ andysch]

> 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
>            Priority: Major
>             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)