-
Notifications
You must be signed in to change notification settings - Fork 302
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
git.commit.message has linefeeds causng invalid Manifest #554
Comments
Hi, thanks for creating an issue for this! In specific you'd need to add the following to the configuration of the git-commit-id-plugin: <replacementProperties>
<replacementProperty>
<!-- input -->
<property>git.commit.message.full</property>
<propertyOutputSuffix>without-line-feed</propertyOutputSuffix>
<token>[\r|\n|\r\n]+</token>
<value>--</value>
<regex>true</regex>
</replacementProperty>
</replacementProperties> With a quick and dirty ant-run test like this: <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<echo>===========================================================================</echo>
<echo>git.commit.message.full: ${git.commit.message.full}</echo>
<echo>git.commit.message.full.without-line-feed: ${git.commit.message.full.without-line-feed}</echo>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin> This yields:
Note that the
Hope that helps. |
Excellent! That's exactly what I was looking for, a way to replace the linefeeds. I'll give it a shot. Thank you |
Cool! let me go ahead and close this issue. If you still struggle to get it to work, please feel free to reopen! |
Yes, using replacement properties worked perfectly. Thank you |
Hi,
I'm using the maven-jar-plugin to put some of the git entries in the Manifest. I have the following in my pom file
I end up with the Manifest looking something like this:
The commit message sometimes has a linefieed and is multiple lines. I think this is causing the problem I'm seeing which is when I try to use the jar, it complains about an invalid Manifest
Is there a way to encode the lines feeds so I don't get this problem?
The text was updated successfully, but these errors were encountered: