This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Properties to replace version numbers  RSS feed

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in a team of 2.
in my previous company when using maven every major library had a version number in the parent POM, and these variables were used in every other POM.
My co-worker thinks this is a waste of time.

Can you either help me convince him i am right, or explain why you think I am wrong.

as an example

 
Marshal
Posts: 62846
203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know, but welcome to the Ranch

Are you the same Wendy Gibbons who used to be active a long time ago?
 
Sheriff
Posts: 21602
101
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like this way myself, but I do think it can be a bit overkill. At work we use it mostly for libraries that are prone to regular updates (like the ones we write ourselves), and for sets of libraries like Jackson.

So I'd say this is just personal preference, and there is no right answer.
 
Sheriff
Posts: 4586
288
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As soon as you need more than one dependency entry in your pom for the same library then keeping the version as a property makes sense. Otherwise it comes down to convention and team preference. Do it one way, or do it the other way, but try not to do it both ways.
 
Wendy Gibbons
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Don't know, but welcome to the Ranch

Are you the same Wendy Gibbons who used to be active a long time ago?



yes, but I don't have access to that email anymore, so can't reset the password.
 
Wendy Gibbons
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Cooke wrote:Do it one way, or do it the other way, but try not to do it both ways.



You are right, that is a very good point. I will ponder on that
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!