I think that we might have missed the primary issue here .... There are two properties with the same name in the properties file. In regards to the statement "Yes, you can expect that behavior to remain the same", I suspect that this was in terms of one property being able to have an expression of another property. I personally doubt that it was in regard to the load behavior of the property file, in terms of whether "qb.name" gets assigned the value of "Tommy Maddox" or of "Ben Roethlisberger". In any case, "best.qb.ever" will be assigned the final value of "qb.name".
-----Original Message----- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 8:26 AM To: Maven Users List; Ben Anderson Subject: Re: do something before *.properties files load Hi Ben, Yes, you can expect that behaviour to remain the same. maven.src.dir is not what you think it is. You would need to modify pom.build.sourceDirectory, but this is not recommended. Why are you changing sources in different environments? Perhaps you want <sourceModification>s? - Brett On Fri, 19 Nov 2004 08:15:27 -0500, Ben Anderson <[EMAIL PROTECTED]> wrote: > Thanks Brett. I ran some tests specifying expressions in the > project.properties file. It's pretty neat how the properties retain a > reference of some kind instead of resolving at the initial assignment. > For instance: > > qb.name=Tommy Maddox > best.qb.ever=${qb.name} > qb.name=Ben Roethlisberger > > now best.qb.ever is "Ben Roethlisberger". I see this works now - is > this indended (I'm assuming is must be)? Am I safe in relying on > maven to stay this way? > > One more general question. The reason I'm asking is because I'd like > to do the following. Maybe this is way off base and there's a better > way: > > command > -------------- > maven -Denv=qa jar:jar > > maven.xml > ---------------- > <preGoal name="build:start"> <!-- I think this is always called first --> > <j:choose> > <j:when test="${env == 'qa'}"> > <j:set var="basepath" value="~/myproject"/> > ... > > project.properties > ------------------------- > maven.src.dir=${basepath}/src/java > > project.xml > ----------------- > ... > <build> > <sourceDirectory> > this is bogus and will never be used > </sourceDirectory> > > Does this make sense? I think this is the best way to be able to flip > things like maven.src.dir by specifying an environment on the command > line. > > One more.. I can't find the property that equates to this tag > <unitTestSourceDirectory/>. I checked here: > http://maven.apache.org/reference/plugins/test/properties.html > and here: > http://maven.apache.org/reference/user-guide.html#Behavioural_Properti > es > am I just blind or is it not listed? > > Thanks, > Ben > > > > > On Fri, 19 Nov 2004 09:01:48 +1100, Brett Porter > <[EMAIL PROTECTED]> wrote: > > > 1) Can I embed jelly in my build.properties files? > > > > The answer to the question you were trying to ask is yes, but to > > this specific one, no. Jelly is the XML scripting, JEXL is the > > expression language used in Jelly. You can use an expression in > > build.properties, but not embed Jelly - just in case you wanted to > > start doing conditionals :) > > > > eg, > > somedir=${basedir}/src > > otherdir=${maven.build.dir}/other > > > > > 2) Is there a goal that occurs before maven loads the properties > > > file. So I could write a <preGoal name="something"> <j:if>... > > > ... > > > some.arbitrary.property=qaValue > > > ... > > > some.arbitrary.property=prodValue > > > > No, but the first is nicer and works. > > > > - Brett > > > > > > > > Thanks, > > > Ben > > > > > > ------------------------------------------------------------------ > > > --- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments contain information, which may be confidential or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify us by calling 1-800-262-4723 or e-mail to [EMAIL PROTECTED] We appreciate your cooperation. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
