Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 964035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:45:51+00:00 2026-05-16T01:45:51+00:00

In a pom.xml, when specifying a dependency version, what is the difference between LATEST

  • 0

In a pom.xml, when specifying a dependency version, what is the difference between LATEST and [0,) ?
In my opinion they should be equivalent, but for some dependencies, LATEST does not match any version, whereas [0,) does.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:45:52+00:00Added an answer on May 16, 2026 at 1:45 am

    In my opinion they should be equivalent, but for some dependencies, LATEST does not match any version, whereas [0,) does.

    In theory, LATEST is the latest released or snapshot version (see Rich Seller’s excellent answer on the special RELEASE and LATEST versions) so I would indeed expect the same behavior as with the [0,) range. Out of curiosity, can you provide an example where LATEST doesn’t match?

    That being said, I don’t recommend using the LATEST nor RELEASE special versions as they make your build more fragile and harm the build reproducibility (you don’t really want your build to suddenly start to fail because of some uncontrolled update). Admittedly, they’re considered as a bad idea and references have been removed from the documentation (except from an untranslated part of the German version of the Definitive Guide)
    and they are no longer supported in Maven 3.x.

    You are thus strongly invited to not use them at all (bad practice, deprecated, not supported in the next version).

    And I somehow consider the same applies to version ranges (in general), I don’t recommend them either as I wrote many times in previous answers or comments. See for example:

    • Managing maven dependancies – New Versions and Non-Repo libraries
    • Maven automatic SNAPSHOT update
    • Debugging Maven’s “The artifact has no valid ranges”

    Follow-up after comment

    Here’s an example (among many):

    <dependency> 
      <groupId>aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>[0,)</version>
    </dependency>
    

    -> matches version 1.5.3 Whereas:

    <dependency> 
      <groupId>aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>LATEST</version>
    </dependency>
    

    -> cannot be resolved

    I’m not 100% but I don’t think this artifact is providing the right maven-metadata.xml for this feature to work. I think metadata should include <release> and <latest> elements like for maven plugins (see for example this maven-metadata.xml). But I wouldn’t spend too much time on this for the aforementioned reasons, just forget this LATEST stuff.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

pom.xml <dependencies> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <!-- JUnit testing framework --> <dependency> <groupId>junit</groupId>
In my Maven pom.xml I have the following dependencies: <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>3.3.2.GA</version> </dependency>
i need Atmosphere 0.8.4 in my pom.xml <dependency> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-runtime</artifactId> <version>0.8.4</version> <type>bundle</type> </dependency> but
I have a maven dependency in my pom.xml as such: <dependency> <groupId>com.foo</groupId> <artifactId>Bar</artifactId> <version>1.2.3</version>
This is my pom.xml (fragment of it): ... <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>[3.0,)</version> </dependency> ...
I had a some config in pom.xml and now i have updated the version
I have following as dependencies in pom.xml file, <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> </dependency> <dependency>
I have the following dependency in my pom.xml <dependency> <groupId>aGroup</groupId> <artifactId>anArtifact</artifactId> <version>aVersion</version> </dependency> I
This is my pom.xml (part of it): [...] <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> <version>${jersey.version}</version> </dependency> <dependency>
I have project A which a pom.xml dependency of: <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> <version>1.2</version> </dependency>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.