Search code examples
mavennexusmaven-assembly-pluginline-endingsbuild-helper-maven-plugin

Maven: release single file, set line endings


I would like to release single file to Nexus repo (deploy script, sh) and for that purpose I am using

build-helper-maven-plugin:attach-artifact

Unlike Maven Assembly Plugin, it hasn't explicit option to set line ending of the deployed file. How can I solve the task using this or other plugin.

Important: I need file deployed as .sh and not as archive. Otherwise it's possible to switch to Maven Assembly Plugin.


Solution

  • The maven-assembly-plugin has a format dir which is simply a folder structure on the hard drive which you can use to copy the sh script to that folder and convert linenendings and use build-helper-maven-plugin to attach that artifact afterwards.