maven - Use the latest snapshot of dependency? -


update: simplifying question - have module mod1 used dependency in module mod2. make sure mod2 utilizes latest version snapshot of mod1. how can achieve in maven?

================

i have 2 modules 1 module used dependency in module. how can make sure latest snapshot of mod1 gets utilized in mod2? both modules mentioned in parent pom following -

<modules>    <module>mod1</module>    <module>mod2</module> </modules>  

i have release version of mod1 on remote maven repo (version 1.0). now, in build when there code chanage in mod1, gets built 1.1-snapshot (not deployed on remote repo). how can make sure mod2 utilizes (latest) snapshot version? if mod1 source changed new version 1.1-snapshot needs utilized in mod2 , if mod1 did not have source change existing latest version of 1.1 need utilized in mod2. suggest how use latest snapshot/release here? tried following in pom.xml mod2 -

<dependency>    <groupid>com.test</groupid>    <artifactid>mod2</artifactid>    <version>latest</version> </dependency> 

however, resolves release version 1.0 , never resolves 1.1-snapshot, in local repo. how can make sure latest snapshot gets utilized? appreciate suggestion.

the version -snapshot includes notion of "latest".

so our release cycle needs this:

before start, have: mod1 version 1.0-snapshot, mod2 version 1.1-snapshot , depends on mod1:1.0-snapshot

now want release. so, remove -snapshot everywhere, build & deploy.

after deployment, bump versions:

mod1 version 1.1-snapshot, mod2 version 1.2-snapshot , depends on mod1:1.1-snapshot

you never have situation snapshot version of mod2 depends on release version of mod1.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -