Skip to content
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

Allow skipping version manipulation to avoid getting the version mangled #314

Open
ikus060 opened this issue Dec 14, 2020 · 6 comments
Open

Comments

@ikus060
Copy link

ikus060 commented Dec 14, 2020

The current implementation in Utils. convert a "java" version into a "debian" version. Trying to handle alhpa, beta, release. But It doesn't cover all the scenario and we should have an option to completely skip the version mangling an keep the version of the package.

e.g.: I'm using this version 3.7.1~dev24+g1b4b40e and it get transformed into 3.7.1~dev24+g1b4~b40e.

A simple option to skip the version mangling should be added to let the users manage it own version semantic.

@ikus060
Copy link
Author

ikus060 commented Dec 14, 2020

Manage to work around this by using a different property to inject that is not mangled by jdeb.

I'm using [[revision]] that is already injected in the build to define the version.

@ikus060 ikus060 closed this as completed Dec 14, 2020
@ebourg
Copy link
Collaborator

ebourg commented Dec 14, 2020

The mangling is clearly wrong in this case, the end of the +g1b4b40e suffix was parsed as a beta version and a ~ was inserted before the last b. I'm not sure to see how this could be avoided.

@ebourg ebourg reopened this Dec 14, 2020
@ebourg ebourg added the bug label Dec 14, 2020
@tcurdt
Copy link
Owner

tcurdt commented Feb 10, 2021

We should have a testcase that covers all those conversions. Maybe it would be good to start with a table of how conversions should look like.

@tcurdt tcurdt added this to the 1.9 milestone Feb 10, 2021
@tcurdt tcurdt modified the milestones: 1.9, 1.10 Jun 5, 2021
@tcurdt tcurdt removed this from the 1.12 milestone Mar 2, 2024
@inglepriyanka148867
Copy link

To allow skipping version manipulation and avoid mangling the version during the build process in Maven, you can use the maven.buildNumber.skip property. This property instructs Maven to skip the default version manipulation, such as appending a timestamp or SCM revision, during the build.

Here's how you can configure it in your Maven pom.xml file:

<maven.buildNumber.skip>true</maven.buildNumber.skip>

By setting maven.buildNumber.skip to true, Maven will skip the default version manipulation behavior. This means that the version specified in your element will be used as is, without any additional modifications.

Make sure to place this configuration in the section of your pom.xml file. This property provides flexibility in controlling version manipulation behavior, allowing you to maintain full control over the versioning process in your Maven projects.

@tcurdt
Copy link
Owner

tcurdt commented Apr 16, 2024

@inglepriyanka148867 Please don't use AI to comment. Again - this is not about the maven build number.

@inglepriyanka148867
Copy link

inglepriyanka148867 commented Apr 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants