-
Notifications
You must be signed in to change notification settings - Fork 640
-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lineEnding and fileMode used in assembly.xml don't work #127
Comments
can you re-try w/ the latest release? i didn't verify line endings were adjusted but but file permissions were correctly set. |
The issue still occurs with 0.13.4, at least on Windows. Note that the problem already seems to be present in the intermediate tar file created under Here is a minimal project that can be used to reproduce the issue: |
Can you please an assembly mode of |
OK. Switching assembly mode to Updated the test case (and corresponding readme) to reflect this. |
How can you set assembly mode to |
<build>
<assembly>
<mode>tar</mode>
...
</assembly>
....
</build> See also the manual |
lineEnding seems to be working for me in Windows on version 0.13.7. It doesn't work with the following versions. Also with versions 0.13.8 and 0.13.9, in Windows,even if a have a file with unix lined ending it seems to overwrite the end of line character(s) with the Windows style. |
I will try to reproduce this which is not so easy because of lack of a proper Windows development environment. Of course you always can increase the speed by providing some pull request ;-) |
I could reproduce the issue, it's due to a bug in the maven-assemply-plugin 2.5.1 which doesn't do a conversion of file endings if filtering is switched off. The next version of d-m-p (probably 0.14.0) will upgrade to the fixed Maven Assembly Plugin. A current development version 0.14.0-SNAPSHOT has been pushed to Maven central containing this fix. In the meantime the following workaround will do it on Windows:
I updated the referenced example above. |
I can run "docker build" manually on windows and inside my linux vm just fine, but creating an image via this plugin does not work for scripts that must be marked as executable. Adding I'm not sure why you're packaging things in a tar file beforehand, but that seems to be the default behavior at this point and it breaks executable permissions on windows. I can't even get it to use the 'dir' mode at this point. If you want to keep doing this I'd suggest you at least do as Docker has done and assume |
Add pushImageTag functionality
Using version 0.11.2.
I have the following in assembly.xml. In the container I can see the file has indeed been copied to /usr/local/tomcat/bin/start.sh. However, the permissions are:
-rw-r--r-- 1 root root 89 Mar 16 06:04 start.sh
Also, if I open the file (which was originally created on Windows, and therefore had CRLF in it) in Notepad++ I can see that the CRLF have not been replaced with LF.
Environment:
Apache Maven 3.2.2
Java version: 1.8.0_40, vendor: Oracle Corporation
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
The text was updated successfully, but these errors were encountered: