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

Snapshot version isn't expanded when <deb> is specified #386

Open
ebourg opened this issue Oct 15, 2021 · 2 comments
Open

Snapshot version isn't expanded when <deb> is specified #386

ebourg opened this issue Oct 15, 2021 · 2 comments

Comments

@ebourg
Copy link
Collaborator

ebourg commented Oct 15, 2021

Using the Maven plugin and jdeb 1.9, the snapshot version isn't expanded when the name of the file is overriden by specifying the <deb> element in the plugin configuration.

For example with:

          <deb>${build.directory}/foo_${version}_all.deb</deb>
          <snapshotExpand>true</snapshotExpand>

the file generated is foo_1.0-SNAPSHOT_all.deb.

@tcurdt tcurdt added the bug label Oct 18, 2021
@tcurdt tcurdt added this to the 1.11 milestone Feb 21, 2022
@tcurdt tcurdt removed this from the 1.12 milestone Mar 2, 2024
@inglepriyanka148867
Copy link

It seems like you're encountering an issue where the snapshot version is not expanded when is specified in your Maven configuration. This could be due to how the element is configured or how the snapshot version is handled.

Here are a few steps you can take to address this:

  1. Check Configuration: Review the configuration of the element in your Maven pom.xml file. Ensure that the version specified in the element includes the snapshot version placeholder ${project.version}. For example:
    ${project.version}
This ensures that the snapshot version is expanded correctly during the build process.
  1. Check Snapshot Version Handling: Ensure that your Maven project's version is properly configured to include the snapshot version suffix -SNAPSHOT. This suffix is necessary for Maven to recognize the version as a snapshot version. For example:

xml
Copy code
1.0-SNAPSHOT
If your project version is configured correctly, Maven should automatically expand the snapshot version placeholder in the element during the build process.

  1. Update Maven Plugins: Ensure that you're using the latest versions of Maven plugins, especially any plugins related to generating Debian packages (deb).

  2. Debug Output: If the issue persists, enable debug output for Maven (mvn -X) to see more detailed information about the build process. This can help identify any specific issues or errors related to expanding the snapshot version in the element.

@luka-rol
Copy link

luka-rol commented Sep 13, 2024

I believe the format should be:

<deb>[[buildDir]]/[[artifactId]]_[[version]]_all.[[extension]]</deb>

/**
* Defines the pattern of the name of final artifacts. Possible
* substitutions are [[baseDir]] [[buildDir]] [[artifactId]] [[version]]
* [[extension]] and [[groupId]].
*/
@Parameter(defaultValue = "[[buildDir]]/[[artifactId]]_[[version]]_all.[[extension]]")
private String deb;

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