I'm using Anthill Pro and it produces a version.txt file with the version in which it created for the project. I want to use this version number for the <currentVersion> in project.xml.

Seems a useful thing to be able to do, so I guess something must of done it before. :)

Any help would be great?

Mike

<br><br><br>&gt;From: Brett Porter &lt;[EMAIL PROTECTED]&gt;<br>&gt;Reply-To: Brett Porter &lt;[EMAIL PROTECTED]&gt;<br>&gt;To: Maven Users List &lt;[email protected]&gt;<br>&gt;Subject: Re: [M1] Loading version from file<br>&gt;Date: Fri, 29 Jul 2005 02:59:22 +1000<br>&gt;<br>&gt;It's only possible from project.properties.<br>&gt;<br>&gt;But I have to ask... why?<br>&gt;<br>&gt;- Brett<br>&gt;<br>&gt;On 7/29/05, Michael Owen &lt;[EMAIL PROTECTED]&gt; wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; I want to set the &lt;currentVersion&gt; in project.xml in Maven 1.0.2 to load<br>&gt; &gt; from a file. So far I have:<br>&gt; &gt;<br>&gt; &gt; &lt;currentVersion&gt;${currentversion}&lt;/currentVersion&gt;<br>&gt; &gt;<br>&gt; &gt; If I then set currentversion to a value in a property file, it is set for<br>&gt; &gt; pom.currentVersion. What I need is to be able to set the property by loading<br>&gt; &gt; up the value from a file. I thought I could do this by doing this piece of<br>&gt; &gt; jelly script before every goal:<br>&gt; &gt;<br>&gt; &gt; &lt;loadfile property=&quot;currentversion&quot; srcFile=&quot;${versionfile}&quot;<br>&gt; &gt; failonerror=&quot;false&quot;/&gt;<br>&gt; &gt;<br>&gt; &gt; However, this doesn't work because I guess the project.xml file has already<br>&gt; &gt; be loaded up etc. I therefore need to execute this as one of the first<br>&gt; &gt; things Maven does, before loading up project.xml, properties etc. Anybody<br>&gt; &gt; know how to do this, or any other ideas how loading from a file for the<br>&gt; &gt; &lt;currentVersion&gt; property can be achieved?<br>&gt; &gt;<br>&gt; &gt; Many thanks,<br>&gt; &gt;<br>&gt; &gt; Mike<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ---------------------------------------------------------------------<br>&gt; &gt; To unsubscribe, e-mail: [EMAIL PROTECTED]<br>&gt; &gt; For additional commands, e-mail: [EMAIL PROTECTED]<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;---------------------------------------------------------------------<br>&gt;To unsubscribe, e-mail: [EMAIL PROTECTED]<br>&gt;For additional commands, e-mail: [EMAIL PROTECTED]<br>&gt;<br>



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

Reply via email to