maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Reasonable use of profiles?
Date Tue, 14 Dec 2010 10:34:09 GMT
On 14 December 2010 09:45, fhomasp <thomas.peeters@realdolmen.com> wrote:
>
> Your rant makes sense Stephen and I'm already glad I asked :-)
>
> I honestly have never been in a development environment where rebuilding an
> artifact was a problem.

But did you ever ask why it was OK to rebuild the artifact in those
environments?

Perhaps Joe was working for ABC Ltd, developing software.

ABC Ltd hires some Quality people because customers want a quality
product... they quality people say "Hey you can't keep rebuilding the
artifact for each customer and saying all you did was change the
branding and therefore we don't have to retest"... there are many many
meetings.... eventually it becomes clear that Joe has not got the time
to refactor the build process so that ABC Ltd can release one artifact
and re-use for each customer, and anyway Joe has some
technical/architectural perspective where he believes that this is not
possible for the type of software that ABC Ltd develops.

The Quality people run off in a sulk back to their offices... after a
while they come back and say "OK, you can rebuild the artifact for
each customer, but only if you add additional testing that shows that
there is no risk in rebuilding this artifact as a result of your build
process and the nature of the changes between builds"

Joe does a small amount of work to help devise the tests, and the
Testing people have more work (but less than if they had to test every
build for every customer)...

Everything is going swimmingly...

Joe has a bright idea... he's decides to leave ABC Ltd to form a
start-up DEF Ltd... It's his idea, he knows the architecture, he sets
up things so that the build has low risk building for different
environments (after all the Quality fight in ABC Ltd didn't really
affect him... he just took on board the lesson that you need to add
testing to show that rebuilding is low risk)...

Joe hires Fred to develop software...

Fred sees Joe rebuilding artifacts all the time... Fred sees the
Quality people Joe hired being ok with this... When Fred moves on,
what will he think? How will he feel about rebuilding artifacts?

Fred is missing the context of Joe's experience... he only has the
context of working for a company where rebuilding was OK (because they
had already validated rebuilding for their context before Fred
started)

> But ok, I see the idea of keeping the build.  But
> if everything is the same, except for property files, what's the problem
> with rebuilding?

There may not be any problem... but how can you be sure? Show me the
evidence that for your use case rebuilding is OK... if you have the
evidence then fine... you are in the clear... but in the absence of
evidence that rebuilding is OK then from a quality perspective you
have to assume that it is not ok.

> Ok, the SHA1 and MD5 are indeed different after a rebuild,
> but I never thought that kind of thing to be a source of possible failures.

How do you know that other SCM changes have not crept in? The contents
of that EAR have different checksums too, so now we have to do a diff
on the wars and jars in the ear... oh and the jars in the wars are
also different... so now we have to do a diff of all the .class files
to show that they are the same.... and you have code that references
File.separator and you have optimization turned on in your compiler
and this build was on windows while that build was on linux oooops!
these artifacts behave differently... the one on windows won't work on
linux but the one on linux works on windows except when it launches
the bat file that it writes... eeek!!! if only we had a repeatable
consistant build that we just passed through all the environments, we
would have caught this earlier and either turned off the optimization
in javac, or used System.getProperty("file.separator").

> Although I have to admit that I'm far from a specialst on that matter.
> Perhaps someone or something should 'taint' me ?  Though that sounds more
> awkward than intended ^^
>
> I have yet to find a project where rebuilding an artifact is considered a
> problem.

Correction, you have yet to work on a project where you were aware of
the work that went into showing why rebuilding was OK, or where a
quality team understood the risk

> Usually the idea of the testing is a combination of test
> frameworks applied on the codebase, not the release.  Hence the idea of
> having unit tests as part of the "success vs. fail" of a build.
> Then a lot of project managers would want me to rebuild the artifact on a
> machine with the same kind of environment as the target machine.

Sounds like you've worked for a lot of Fred's

> Which is
> why some of my clients used Hudson, to be able to do just that and choose
> the properties, with a profile.
>
> Quality should always be a "thing", imho.  But at this point I don't really
> see a reason why rebuilding an artifact would break the quality, but of
> course as I said, I'm not a specialist.  I've been a pro developer for 3
> years .

I'm at this for 20 years

>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Reasonable-use-of-profiles-tp3300650p3304312.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message