You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dloy <da...@ucop.edu> on 2010/12/04 00:17:35 UTC

file exists activation

I'm a new to maven. I've recently tried unsuccessfully to get 
<activation><file><exists> to work unless the absolute file path was given.

I'm running on windows XP, with netbeans IDE 6.8 supposedly using maven 
3.0-SNAPSHOT.

I've tried:
<exists>C:/Documents and Settings/xname/My 
Documents/maven/mrt/storage/store-conf/mrt.local.properties</exists> --- 
works

<exists>${basedir}/mrt.local.properties</exists> --- does NOT work

<exists>./mrt.local.properties</exists> --- does NOT work

<exists>mrt.local.properties</exists> --- does NOT work

Any suggestions for getting <activation><file><exists> to work without 
using an absolute filepath.

Thanks
David


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: file exists activation

Posted by david loy <dl...@ucop.edu>.
I finally got back to this problem and resolved it. The version of maven sent
with NetBeans-6.8 (maven 3.0-SNAPSHOT) was bad. 

After explicitly downloading apache-maven-3.0.2 all of the problems
described earlier have been resolved for both Windows XP and Linux Debian. I
am not aware what version of maven is now included in the most recent
releases of NetBeans.

My thanks to the people replying on this issue.

David Loy
-- 
View this message in context: http://maven.40175.n5.nabble.com/file-exists-activation-tp3292777p3365164.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: file exists activation

Posted by Marshall Schor <ms...@schor.com>.
In our poms we have things like:

<profile>
      <id>process-docbook</id>
      <activation>
        <file><exists>src/docbook</exists></file>
      </activation>
   ... etc

which runs if the project containing the POM has a src/docbook subdirectory.

We're using Maven 3.0 (not snapshot).  This snippet is in a shared parent pom.

Since it works for us and not for you, I'm guessing there's some small detail
that's different, but I don't know what it might be. 
Perhaps you could post some small "test case" scenario for others to try and see
what's going wrong?

-Marshall Schor



On 12/3/2010 6:17 PM, dloy wrote:
> I'm a new to maven. I've recently tried unsuccessfully to get
> <activation><file><exists> to work unless the absolute file path was given.
>
> I'm running on windows XP, with netbeans IDE 6.8 supposedly using maven
> 3.0-SNAPSHOT.
>
> I've tried:
> <exists>C:/Documents and Settings/xname/My
> Documents/maven/mrt/storage/store-conf/mrt.local.properties</exists> --- works
>
> <exists>${basedir}/mrt.local.properties</exists> --- does NOT work
>
> <exists>./mrt.local.properties</exists> --- does NOT work
>
> <exists>mrt.local.properties</exists> --- does NOT work
>
> Any suggestions for getting <activation><file><exists> to work without using
> an absolute filepath.
>
> Thanks
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: file exists activation

Posted by david loy <dl...@ucop.edu>.
I tried both approaches:
C:/Documents and Settings/xname/My
Documents/maven/mrt/storage/pom.xml

This project uses <modules> on child projects and no activation would work
for <file> except <missing> and locally set properties were not recognized.
After spotting #MNG-2363 I figured that the earlier bug was not fixed.

I then used profile in the child project:
 C:/Documents and Settings/xname/My
Documents/maven/mrt/storage/store-conf/pom.xml

Things are a bit better at least <exists> works with an explicit full path
but not using ${basedir} or any relative path I could find. I should note
that <exists>${basedir}</exists> does NOT work - I did further testing and
dumped ${basedir} within the profile using maven-antrun-plugin and the
variable is set but not being recognized in the activation.

ANY suggestion would be appreciated. At this point I'm forced to move back
to ant for my specialized handling.

Thanks
David Loy



C:/Documents and Settings/xname/My
Documents/maven/mrt/storage/store-conf/mrt.local.properties
-- 
View this message in context: http://maven.40175.n5.nabble.com/file-exists-activation-tp3292777p3294266.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: file exists activation

Posted by Hervé BOUTEMY <he...@free.fr>.
where is your pom.xml?
C:/Documents and Settings/xname/My Documents/maven/mrt/storage ?

regards,

Hervé

Le samedi 4 décembre 2010, dloy a écrit :
> I'm a new to maven. I've recently tried unsuccessfully to get
> <activation><file><exists> to work unless the absolute file path was given.
> 
> I'm running on windows XP, with netbeans IDE 6.8 supposedly using maven
> 3.0-SNAPSHOT.
> 
> I've tried:
> <exists>C:/Documents and Settings/xname/My
> Documents/maven/mrt/storage/store-conf/mrt.local.properties</exists> ---
> works
> 
> <exists>${basedir}/mrt.local.properties</exists> --- does NOT work
> 
> <exists>./mrt.local.properties</exists> --- does NOT work
> 
> <exists>mrt.local.properties</exists> --- does NOT work
> 
> Any suggestions for getting <activation><file><exists> to work without
> using an absolute filepath.
> 
> Thanks
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org