1

I would like to comment on Tim's answer here (https://stackoverflow.com/a/1172805/1746310) but because of my reputation I can't, I wrote it as an answer, saying that I wanted to comment, but can't because of my reputation. That message then got deleted by ChrisF (https://stackoverflow.com/users/59303/chrisf) saying it's not an answer and I should write a comment... I can't find words for this.

Whatever, this is the plugin I'm talking about: http://mojo.codehaus.org/versions-maven-plugin/ From my understanding use-latest-version will include beta versions, while use-latest-release won't. Because of that I am using use-latest-releases but it keeps updating to beta versions. I tried maven clean after changing my pom.xml back to what it was before, but still when I do run as -> maven install it updates to beta versions. Is my understanding of the used words wrong? What do I have to do to NOT get the beta versions, but the latest release version of the used dependencies?

Community
  • 1
  • 1
Diskutant
  • 267
  • 3
  • 13
  • I suggest you specify the versions you want if you need specific versions. That way it won't use a beta version if you don't ask it to. – Peter Lawrey May 22 '14 at 12:05
  • @peter I want to use that version plugin to always automatically update to the latest release version. If I wanted specific versions I wouldn't need the plugin, or is my understanding so wrong? – Diskutant May 22 '14 at 12:52
  • There is no difference between an "alpha" or "beta" version, they are all just releases. If you want control over the versions, the best solution is to pick you version. – Peter Lawrey May 22 '14 at 13:08
  • So, the "Type" here: http://mvnrepository.com/artifact/org.slf4j/slf4j-api is not related to what versions-maven sees? What's the difference between use-latest-releases (http://mojo.codehaus.org/versions-maven-plugin/use-latest-releases-mojo.html) and use-latest-versions (http://mojo.codehaus.org/versions-maven-plugin/use-latest-versions-mojo.html) then? – Diskutant May 22 '14 at 14:17

1 Answers1

2

I do not know where the Type field in the mvnrepository comes from or how it's populated. I'm also not sure if it's used anywhere in the dependency resolution process, my guess is no. I also do not know the difference between versions and release versions as Maven defines them.

Your question was how to make the versions plugin ignore alpha/beta/release candidates/milestone builds; I can help with that. You may write a rules file as described in this stackoverflow answer. The rules file may contain regular expressions, which should allow you to filter out the versions you don't want.

Community
  • 1
  • 1
user944849
  • 13,003
  • 2
  • 55
  • 76