Thanks Michael for the mental aid and please be leniant to my slow reception.
I am working in the area of OO programmer since 91 (and used ant as few as
possible because of the reason you hint at), I read a lot of use and abuse
and it seems to me the term OO is often a bit dilapidated, isn't it. 

Shouldn't we more often think of solving practical problems instead of
getting stuck with fighting for technological concepts an supremacy? A good
example for this seems to me the pattern oriented approach trying to build a
layer in top of technical solutions. In this case I'm thinking about a
pattern called "Dependency injection" also known as "Inversion of control";
this title describes better what we would like to do. 

We are a team of 6 people working - what a surprise - under heavy load.
Everybody needs to be able to run a build as easy as possible, that's why we
wanted to try Maven. But not everybody has time to study Maven thoroughly;
our pom has become a bit bigger and complex, it is under version control,
thus an error or just a typo would affect the whole team. 
If unfamiliar people start to fumble in the pom, which IMU is essentially
the heart of the build process, this seems (a bit exagerated, ok) like a
nurse taking over during a heart surgery while the doctor goes for a coffee. 
However, the team decided to keep the version number as simple as possible
and therefore would like to have it in a clearly dedicated file to focus on
only that action (isn't separation of concerns a highly praised paradigm of
maven?)
I see that reading in values into the pom adds a new layer of complexity and
you may you should not multiply things to much. However, it seems to be
practical to separate basic setup parameters into something like a
configuration file.

Eventually, we would also have the version number being generated by an
algorithm in the versioning system. Of course we could use an ant task to
write that version into the pom file, but I understood that's what you
wanted to bring us away from. How else is an automated build process
stuffing the build number into the maven process? Isn't it the most simple
and robuste way to write it into a - separate - file?

I hope I made our point clear that there might good arguments to allow
values being feeded into the pom from an external source and maybe give some
motivation to make the pom file a bit "semipermeable"

Thanks for the discussion

Markus


Michael McCallum-3 wrote:
> 
> there is no right way to read the version from a file.. the pom is the
> file 
> that contains the version...
> 
> stop thinking like an ant script and start thinking like an OO programmer
> 
> BTW thats not meant to be critical or offensive just to catch your
> attention 
> and make you think...
> 
> On Tuesday 23 October 2007 03:47, baumar wrote:
> t> Hi,
>>
>> What would be the right way to read the version number from a file?
>>
>> We decided that not all users (who maybe don't know maven very well)
>> should
>> check out the delicate pom file .
>> We have a file like version.properties containing
>>
>> tavx.current.version=1.2.3a
>>
>> and defined in the pom
>>
>> <project>
>>      <modelVersion>4.0.0</modelVersion>
>>      <groupId>com.abc.tat.tavx</groupId>
>>      <artifactId>tavx</artifactId>
>>      <name>adapter</name>
>>      <packaging>jar</packaging>
>>      <version>${tavx.current.version}</version>
>> ...
>> <build>
>>     <filters>
>>          <filter>src/resources/version/version.properties</filter>
>>     </filters>
>>
>> but that doesn't work.
>>
>>
>> Thanks for help
>>
>> Markus
> 
> -- 
> Michael McCallum
> Enterprise Engineer
> mailto:[EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/reading-pom.version-from-a-file-tf4670564s177.html#a13358592
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to