OK,
I haven't seen this irc discussion.
I think that for also support full path in resource.directory,
we can add resourceDirectoryFullPath property like this :
<j:set var="resourceDirectoryPresent" value="false"/>
<j:set var="resourceDirectoryFullPathPresent" value="false"/>
<util:available file="${basedir}/${resource.directory}">
<j:set var="resourceDirectoryPresent" value="true"/>
</util:available>
<util:available file="${resource.directory}">
<j:set var="resourceDirectoryFullPathPresent" value="true"/>
</util:available>
<j:if test="${resourceDirectoryPresent == 'true'}">
<!-- YOUR MODIFICATION -->
</j:if>
<j:if test="${resourceDirectoryFullPathPresent== 'true'}">
<!-- OLD CODE -->
</j:if>
What do you think about it?
Emmanuel
-----Message d'origine-----
De: "Alexei Barantsev" <[EMAIL PROTECTED]>
A: "'Turbine Maven Developers List'"
<[EMAIL PROTECTED]>
Date: 29/01/03
Objet: RE: cvs commit: jakarta-turbine-maven/src/conf driver.jelly
I expected this objection. Now as it arose I should provide
explanations.
When you use reactor to build a subproject its working dir is not equal
to its basedir.
An example is included in touchstone
(src/test/touchstone-build/src/reactor-build/resources/) and you may try
it.
I suggested two ways to resolve this issue
1) reactor should chdir to subproject directory, or
2) add ${basedir} in front of relative paths.
I asked this question on IRC and Jason selected the latter alternative:
<alexei> I've found the reason why reactor fails in my examples - that's
relative paths
<alexei> pwd != basedir for reactor'ed subprojects
<alexei> what is Right Thing - to change pwd in reactor or to prepend
basedir everywhere?
<alexei> (latter requires multiple changes I'm afraid)
<jason> yes
<jason> use ${basedir}
<jason> that will become the standard practice
May be I miss something and there is another Really Good Solution?
Best regards,
Alexei
> -----Original Message-----
> From: Emmanuel Venisse [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 12:46 PM
> To: Turbine Maven Developers List
> Subject: Rep:cvs commit: jakarta-turbine-maven/src/conf driver.jelly
>
>
> Hi,
>
> I'm -1.
>
> Sorry, but, I don't like your modification. I prefer that
> maven users define resource directory in project.xml for
> more flexibility.
>
> If we put ${basedir} in front of all resource.directory,
> users can't use another directory in a part of disk without
> use ../../../../ADirectory/subDirectory.
>
> Emmanuel
>
> -----Message d'origine-----
> De: [EMAIL PROTECTED]
> A: [EMAIL PROTECTED]
> Date: 28/01/03
> Objet: cvs commit: jakarta-turbine-maven/src/conf driver.jelly
>
> abarantsev 2003/01/28 09:30:27
>
> Modified: src/conf driver.jelly
> Log:
> Put basedir in front of resource.directory to avoid
> problems with relative paths in reactor
>
> Revision Changes Path
> 1.7 +2 -3 jakarta-turbine-maven/src/conf/driver.jelly
>
> Index: driver.jelly
>
> ===================================================================
> RCS file: /home/cvs/jakarta-turbine-maven/src/conf/driver.jelly,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -r1.6 -r1.7
> --- driver.jelly 9 Jan 2003 15:42:21 -0000 1.6
> +++ driver.jelly 28 Jan 2003 17:30:26 -0000 1.7
> @@ -55,10 +55,9 @@
>
> <define:tag name="copy">
> <j:forEach var="resource" items="${resources}">
> -
> <j:set var="resourceDirectoryPresent" value="false"/>
>
> - <util:available file="${resource.directory}">
> + <util:available
> file="${basedir}/${resource.directory}">
> <j:set var="resourceDirectoryPresent" value="true"/>
> </util:available>
>
> @@ -72,7 +71,7 @@
> </j:otherwise>
> </j:choose>
> <copy todir="${targetDirectory}">
> - <fileset dir="${resource.directory}">
> + <fileset dir="${basedir}/${resource.directory}">
> <j:if test="${resources.includes.isEmpty()}">
> <include name="**/**"/>
> </j:if>
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> ____________________________________________________________
> _________
> Envie de discuter en "live" avec vos amis ? T�l�charger MSN
> Messenger http://www.ifrance.com/_reloc/m la 1�re
> messagerie instantan�e de France
>
>
> ____________________________________________________________
> _________
> Envie de discuter en "live" avec vos amis ? T�l�charger MSN
> Messenger http://www.ifrance.com/_reloc/m la 1�re
> messagerie instantan�e de France
>
>
> ------------------------------------------------------------
> ---------
> 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]
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagn�.
R�glement : http://www.ifrance.com/_reloc/sign.sms
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? T�l�charger MSN Messenger
http://www.ifrance.com/_reloc/m la 1�re messagerie instantan�e de France
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]