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

Mark Struberg commented on MASSEMBLY-775:
-----------------------------------------

There are actual that a {{/}} is interpreted as absolute directory in linux, 
but not on windows. And this is due to us using {{File#isAbsolute()}} in 
{{org.apache.maven.plugins.assembly.archive.task.AddFileSetsTask#getFileSetDirectory}}.

[https://github.com/apache/maven-assembly-plugin/blob/master/src/main/java/org/apache/maven/plugins/assembly/archive/task/AddFileSetsTask.java#L189]

If it is not File#absolute then we pretend to be a subdirectory of the current 
project. But only on Windows! This really really sounds wrong.

Right now those builds are NOT reproducible on a different OS!

So we might really go for checking for paths beginning with a {{"/"}} 
ourselves. Yes, this would be kind of slightly backward incompatible, but it 
would be far superior in terms of compatibility.

I think we could live with the diffferent behaviour if we bump to a new minor 
version, e.g. 3.3.0.

> Emit WARNING instead of ERROR
> -----------------------------
>
>                 Key: MASSEMBLY-775
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-775
>             Project: Maven Assembly Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.5.5
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>
> I have currently a build which creates several tar/tar.gz/zip archives etc.
> {code}
> [INFO] Reading assembly descriptor: src/main/assembly/descriptor-inner-tar.xml
> [INFO] Reading assembly descriptor: src/main/assembly/descriptor.xml
> [INFO] Building tar: C:\...\xyz-X.y.z-SNAPSHOT-dist.tar
> [ERROR] OS=Windows and the assembly descriptor contains a *nix-specific 
> root-relative-reference (starting with slash) /
> [ERROR] OS=Windows and the assembly descriptor contains a *nix-specific 
> root-relative-reference (starting with slash) /
> {code}
> In my opinion the message could be a WARNING instead of an error ? WDYT ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to