0

I have project A & B at trunk(1.5.0-SNAPSHOT) and branch (1.4.0)

B is having dependency in A So, pom.xml for A:

<dependency>
  <groupId>com.example</groupId>
  <artifactId>project-B</artifactId>
  <version>[1.0,2.0)</version>
<\dependency

When release build is given for A and in my ./m2 both release and snapshot jar is present i.e (B-1.5.0-SNAPSHOT) & (B-1.4.0).

(B-1.5.0-SNAPHOT) is take as a dependency even after disabling snapshot in repository level.

If (B-1.5.0-SNAPSHOT) is not there in ./m2 its is using or downloading from nexus (B-1.4.0) as dependency as expected

Note:Not using Maven release plugin

we are using Atlasssian Bamboo for maven builds so there are cases when these scenario happens. when snapshot (trunk) and release (branch) build goes one after another

So,In my case how can i restrict the snapshots as a dependency if higher version of snapshot is available in my local .m2

0 Answers0