tcurdt / jdeb

This library provides an Ant task and a Maven plugin to create Debian packages from Java builds in a truly cross platform manner.
https://github.com/tcurdt/jdeb
Apache License 2.0
533 stars 324 forks source link

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

Open ikus060 opened 3 years ago

ikus060 commented 3 years ago

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 commented 3 years ago

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.

ebourg commented 3 years ago

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.

tcurdt commented 3 years ago

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.

inglepriyanka148867 commented 6 months ago

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:

true

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 commented 6 months ago

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

inglepriyanka148867 commented 6 months ago

Ok, thanks for the clarification.

On Tue, 16 Apr, 2024, 4:25 pm Torsten Curdt, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/tcurdt/jdeb/issues/314#issuecomment-2058809158, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEK54ZMR3LWAFRJOCJV6KEDY5T7TFAVCNFSM4U2CNQDKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBVHA4DAOJRGU4A . You are receiving this because you were mentioned.Message ID: @.***>