1

I'm currently working on automating the build process (more or less) using maven.
I need to create an rpm but in order to do so, I need to retrieve the latest version. As part of the convention, we're using GIT's tags to store the version of the system on the master branch.
Unfortunately, buildNumber-maven-plugin is using git show instead of git describe and I can't find a suitable configuration for it to work.
How should I configure this thing ?

Royi Freifeld
  • 629
  • 2
  • 11
  • 31
  • 1
    Are you forced to use this plugin? Because we use *git-commit-id-plugin* and it works like a charm. It's very easy to configure. – musiKk Feb 23 '15 at 14:13
  • @musiKk does the plugin exports a `${buildNumber}` variable like the buildnumber-maven-plugin? The doc is not very informative... – Royi Freifeld Mar 02 '15 at 19:57
  • Hm, I find the [documentation](https://github.com/ktoso/maven-git-commit-id-plugin) pretty extensive. It supports a number of variables that can be exported to a properties file or applied to other files via Maven's filtering. – musiKk Mar 02 '15 at 20:20
  • @musiKk But then I'll need to read from that properties file. I'd rather use them in the pom just like the `buildNumber` in `buildnumber-maven-plugin` – Royi Freifeld Mar 03 '15 at 14:45
  • Ah, I think I didn't really get your problem so far. I don't think what you want is possible. In any case I didn't want to convince you. It's an alternative I'm happy with but it doesn't seem to work for you. :) – musiKk Mar 03 '15 at 14:49
  • actually that plugin seems like a good solution... I just need it to export the version extracted from `git describe` by this plugin. Buildnumber-maven-plugin provides just that, but uses `git show` instead. – Royi Freifeld Mar 03 '15 at 14:51

1 Answers1

1

Thanks to @musiKk 's suggestion, I used git-commit-id-plugin. I had several problems at first because I didn't configure it properly.
Though the plugin is not mature enough, it's getting the job done.

Royi Freifeld
  • 629
  • 2
  • 11
  • 31