maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James C. McPherson" <james.c.mcpher...@gmail.com>
Subject Re: is this expected behaviour?
Date Wed, 05 May 2010 02:21:42 GMT
On  5/05/10 12:16 PM, James C. McPherson wrote:
> On  5/05/10 12:00 PM, Martin Gainty wrote:
>> <!-- i specifically set M2_HOME in the build.xml located in M2_HOME
>> root-->
>> <property name="M2_HOME" value="/opt/local"/>
>>
>> <condition property="maven.home" value="${M2_HOME}">
>> <isset property="M2_HOME"/>
>> </condition>
>>
>> extract-assembly:
>> <delete dir="${maven.home}"/>
>> <mkdir dir="${maven.home}"/>
>>
>> Unable to delete directory /opt/local means
>> 1)the directory does not exist..so create it
>> 2)give yourself delete access to the folder usually chown of the folder
>> gives all perms for the folder to you e.g.
>>
>> cd /opt/local
>> $ chown mgainty .
>>
>> $ ls -al
>> total 0
>> drwxrwxrwx+ 2 mgainty mkpasswd 0 May 5 04:51 .
>> drwxr-xr-x+ 3 mgainty mkpasswd 0 May 5 04:51 ..
>
> Hi Martin,
> thankyou, but that directory already existed - and had a large
> amount of software in it that I've already packaged up. I really
> didn't want any bit of it deleted!
>
> Also, that directory (/opt/local) is actually a separate
> mountpoint - zfs dataset, to be precise.
>
>
> Now that you've pointed me to the relevant build.xml bits,
> I'm surprised that <delete><mkdir> are the process steps
> used to ensure maven.home is created.
>
> Does "mkdir -p" or its OS-specific equivalent not work somewhere?


Sorry to follow-up to myself - I just checked the ant task doco,
and the Mkdir task description says:

==========================
Creates a directory. Also non-existent parent directories are created,
when necessary. Does nothing if the directory already exist.
==========================

I think it's reasonable to remove the

<delete dir="${maven.home}"/>

from the extract-assembly target. Thoughts?


cheers,
James C. McPherson
--
Solaris kernel software engineer, system admin and troubleshooter
               http://www.jmcp.homeunix.com/blog
Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson


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


Mime
View raw message