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_Properties
> 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]

Reply via email to