[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Billy Sclater wrote:I mentioned your suggestions to the release manager. He is in the same camp as you guys. He liked Jayesh's idea and said that I could also use mvn clean install -Dmaven.repo.local /USER_HOME/test/.m2--offline. Apparently, there is a plan to switch over to using versions instead of snapshots ...in the future, but not yet!! Thanks for your help!
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Billy Sclater wrote:Hi, I tried the solution of having 2 repos, one in USER_HOME/test, and one in USER_HOME/master.
Billy Sclater wrote:It goes through several ways of having 2 repos, but claims theses techniques are all error prone.
Billy Sclater wrote:
#1 Using a maven switch to point to a diff local repo, or adjusting the settings.xml to do so.
#2 Using 2 diff user accounts.
#3 Using 2 diff VM snapshots.
#4 Using 2 diff repo folders that can be renamed to .m2 when desired.
Which is best?
Billy Sclater wrote:Wow! Thats certainly 'saying it how it is'! Actually, I'm a new starter and learning maven. Having broken jars in the repo and broken code on master has pretty much been the norm since I started at the comapny. I thought this was 'normal' and that 'maven was poor build tool'! From what you guys say, quite the reverse! You all seem to be saying:
#1 Building with maven should be a 2 step process S1:Pull the source code S2:mvn clean install.
#2 Using versions as opposed to snapshots is more stable.
#3 There are ways around broken repos but these are 'hacks'. The proper way to do things is not to have a broken repo in the first place (see #2).
Billy Sclater wrote:I thought this was 'normal' and that 'maven was poor build tool'! From what you guys say, quite the reverse!
Billy Sclater wrote:For now looks like I have no choice but to 'hack'!
The repo is not broken. The code is broken which is a different problem
The problem with the missing version number is that you just can't reference a specific version of the code. If everything is always 0.0.1-SNAPSHOT
Only a working version should be propagated to the repository, and this should be done by the CI server.
Good luck with that!
Billy Sclater wrote: Are you saying that Jenkins can be configured to only allow code that builds successfully (and possibly passes sanity and unit tests) to be propogated to master?
Billy Sclater wrote: As a new guy, and a new dev, I have no authority in the company to enforce these changes, I can only suggest them (feeling slightly inappropriate about it, as I'm sure my more experienced collegaues are probably well aware of these solutions!!);( So if my powers of persuasion don't work, I have a choice between being unable to work with a broken environment, or ... attempting a crude 'hack', and having a chance of getting some work done.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
No. He was saying that Jenkins would provide a way to know the build was broken. It sounds like this is known and "nobody cares." It could be made more visible though. Some teams have a physical sign that the build is broken. Or you could bring it up in meetings.
What do your teammates do? These experienced people "clearly have a solution" that they use to deal with this problem. Asking them helps show there is pain in this area. The first step towards change.
Billy Sclater wrote:Are you saying that Jenkins can be configured to only allow code that builds successfully (and possibly passes sanity and unit tests) to be propogated to master?
Billy Sclater wrote:
Good luck with that!
As a new guy, and a new dev, I have no authority in the company to enforce these changes, I can only suggest them (feeling slightly inappropriate about it, as I'm sure my more experienced collegaues are probably well aware of these solutions!!);( So if my powers of persuasion don't work, I have a choice between being unable to work with a broken environment, or ... attempting a crude 'hack', and having a chance of getting some work done.
Billy Sclater wrote:It sounds like nobody recommends any of the hacks mentioned in this thread! The list above contains 2 of those hacks! But including 'all' in the list above, if you were in my situation, which of the 5 would you choose?
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2