0

How can I mention the version in pom.xml generic ? . Can I make it to download the latest version of dependency automatically ?

<dependency>
    <groupId>com.here.platform</groupId>
    <artifactId>sdk-bom</artifactId>
    <version>1.5.55</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
PTT
  • 526
  • 7
  • 27

1 Answers1

1

I'm not quite sure what you mean here, if you want to have multiple declarations of this dependency within a single project use dependencyManagement at the projects top level pom. If you simply want to use a variable define a property like so:

<properties>
    <com.here.platform.version>1.5.55</com.here.platform.version>
</properties>

and then:

<dependency>
    <groupId>com.here.platform</groupId>
    <artifactId>sdk-bom</artifactId>
    <version>${com.here.platform.version}</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

Please add more details so we know what you are asking.

MortusUK
  • 117
  • 6
  • can I make it download the latest version automatically ? Something like LATEST – PTT Jun 18 '18 at 14:45
  • 1
    LATEST was dropped in maven 3, read this question https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency/1172805#1172805 – MortusUK Jun 18 '18 at 14:50