I have a my-api which depends on A-api.
And my client will dependent on A-api explictly , so I may propable need to declare this dependency as provided.
Rather than declare a hard-coded version dependeny on A-api at my my-api's pom, I want a lowest version, since A-api's team will garanteer that its Api will be compatable with the former one
my-api's pom:
<dependency>
<groupId>org.mygroup</groupId>
<artifactId>A-api</artifactId>
<version>a-at-least-version</version><!--I only want a lowest version that i need-->
<scope>provided</scope><!--Should I declare it as provided? -->
</dependency>
my client will use our two api like:
<!--Notice, my client will explicitly declare dependency on A-api, and this may be higher than what my-api dependent on. This api will update more frequently than my-api-->
<dependency>
<groupId>org.mygroup</groupId>
<artifactId>A-api</artifactId>
<version>may-be-a-newer-version</version>
</dependency>
<!--My client will also dependent on my-api with a statble version-->
<dependency>
<groupId>org.mygroup</groupId>
<artifactId>my-api</artifactId>
<version>one-version</version>
</dependency>