You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roar Lauritzsen (JIRA)" <ji...@codehaus.org> on 2006/06/15 09:53:41 UTC

[jira] Created: (MNG-2374) Option to "mvn clean" task not to follow soft links

Option to "mvn clean" task not to follow soft links
---------------------------------------------------

         Key: MNG-2374
         URL: http://jira.codehaus.org/browse/MNG-2374
     Project: Maven 2
        Type: New Feature

 Environment: UNIX
    Reporter: Roar Lauritzsen
    Priority: Minor


Our project builds an executable into our "install" subproject under "install/target". To do a test-run of this executable, I usually symlink a directory containing about 1 million test-data files into the directory tree below "target". I much prefer symlinking this test-data directory instead of copying it, because of the time it takes to copy.

However, if I inadvertently do "mvn clean" without removing this link, maven will follow the symlink and recursively remove my whole input document directory.

An option to "mvn clean", like "dontFollowSymlinks", could do the trick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MCLEAN-10) Option to "mvn clean" task not to follow soft links

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCLEAN-10?page=all ]

Joakim Erdfelt closed MCLEAN-10.
--------------------------------

    Resolution: Fixed

Work has already been done.
file-management 1.0 has followSymlinks implemented.

http://svn.apache.org/viewvc/maven/shared/tags/file-management-1.0/src/main/java/org/apache/maven/shared/model/fileset/util/FileSetManager.java?view=markup

I tested the <followSymlinks>false</followSymlinks> functionality on my local linux machine by linking in some content from ~/tmp/ into a sample projects ${basedir}/target/foo  works as advertised.

> Option to "mvn clean" task not to follow soft links
> ---------------------------------------------------
>
>                 Key: MCLEAN-10
>                 URL: http://jira.codehaus.org/browse/MCLEAN-10
>             Project: Maven 2.x Clean Plugin
>          Issue Type: New Feature
>         Environment: UNIX
>            Reporter: Roar Lauritzsen
>            Priority: Minor
>
> Our project builds an executable into our "install" subproject under "install/target". To do a test-run of this executable, I usually symlink a directory containing about 1 million test-data files into the directory tree below "target". I much prefer symlinking this test-data directory instead of copying it, because of the time it takes to copy.
> However, if I inadvertently do "mvn clean" without removing this link, maven will follow the symlink and recursively remove my whole input document directory.
> An option to "mvn clean", like "dontFollowSymlinks", could do the trick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MCLEAN-10) Option to "mvn clean" task not to follow soft links

Posted by "Joakim Erdfelt (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCLEAN-10?page=comments#action_73817 ] 
            
Joakim Erdfelt commented on MCLEAN-10:
--------------------------------------

file-management 1.1-SNAPSHOT definately has this implemented and wired up.

> Option to "mvn clean" task not to follow soft links
> ---------------------------------------------------
>
>                 Key: MCLEAN-10
>                 URL: http://jira.codehaus.org/browse/MCLEAN-10
>             Project: Maven 2.x Clean Plugin
>          Issue Type: New Feature
>         Environment: UNIX
>            Reporter: Roar Lauritzsen
>            Priority: Minor
>
> Our project builds an executable into our "install" subproject under "install/target". To do a test-run of this executable, I usually symlink a directory containing about 1 million test-data files into the directory tree below "target". I much prefer symlinking this test-data directory instead of copying it, because of the time it takes to copy.
> However, if I inadvertently do "mvn clean" without removing this link, maven will follow the symlink and recursively remove my whole input document directory.
> An option to "mvn clean", like "dontFollowSymlinks", could do the trick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MCLEAN-10) Option to "mvn clean" task not to follow soft links

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCLEAN-10?page=comments#action_68002 ] 

John Casey commented on MCLEAN-10:
----------------------------------

this option is currently available via the file-management API, which the clean plugin uses as of release 2.1, though I'm not sure whether it's wired up.

Need to experiment by configuring:

<followSymlinks>false</followSymlinks>

> Option to "mvn clean" task not to follow soft links
> ---------------------------------------------------
>
>          Key: MCLEAN-10
>          URL: http://jira.codehaus.org/browse/MCLEAN-10
>      Project: Maven 2.x Clean Plugin
>         Type: New Feature

>  Environment: UNIX
>     Reporter: Roar Lauritzsen
>     Priority: Minor

>
>
> Our project builds an executable into our "install" subproject under "install/target". To do a test-run of this executable, I usually symlink a directory containing about 1 million test-data files into the directory tree below "target". I much prefer symlinking this test-data directory instead of copying it, because of the time it takes to copy.
> However, if I inadvertently do "mvn clean" without removing this link, maven will follow the symlink and recursively remove my whole input document directory.
> An option to "mvn clean", like "dontFollowSymlinks", could do the trick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MCLEAN-10) Option to "mvn clean" task not to follow soft links

Posted by "Roar Lauritzsen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MCLEAN-10?page=comments#action_74089 ] 
            
Roar Lauritzsen commented on MCLEAN-10:
---------------------------------------

This seems like the way to do it:

<project>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <fileset>
            <directory>target</directory>
            <followSymlinks>false</followSymlinks>
          </fileset>
        </configuration>
      </plugin>


> Option to "mvn clean" task not to follow soft links
> ---------------------------------------------------
>
>                 Key: MCLEAN-10
>                 URL: http://jira.codehaus.org/browse/MCLEAN-10
>             Project: Maven 2.x Clean Plugin
>          Issue Type: New Feature
>         Environment: UNIX
>            Reporter: Roar Lauritzsen
>            Priority: Minor
>
> Our project builds an executable into our "install" subproject under "install/target". To do a test-run of this executable, I usually symlink a directory containing about 1 million test-data files into the directory tree below "target". I much prefer symlinking this test-data directory instead of copying it, because of the time it takes to copy.
> However, if I inadvertently do "mvn clean" without removing this link, maven will follow the symlink and recursively remove my whole input document directory.
> An option to "mvn clean", like "dontFollowSymlinks", could do the trick

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira