You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "James C. McPherson (JIRA)" <ji...@codehaus.org> on 2010/05/05 08:31:12 UTC

[jira] Created: (MNG-4663) Maven's default build.xml deletes install target dir unnecessarily

Maven's default build.xml deletes install target dir unnecessarily
------------------------------------------------------------------

                 Key: MNG-4663
                 URL: http://jira.codehaus.org/browse/MNG-4663
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Bootstrap & Build
    Affects Versions: 3.0-beta-1, 2.2.1
         Environment: OpenSolaris build 135, build 138. Java 1.6. Generic hardware
            Reporter: James C. McPherson


When running ant in the top level of the source distribution, the extract-assembly target uses the ant <delete/> task
to ensure that a directory is created.

This is undocumented in the installation guide and README.txt file, and unnecessary - ant's <Mkdir/> task runs the
equivalent of "mkdir -p" which ensures that the directory is created anyway.


patch against maven-3 trunk (though the issue exists in maven-2.2.1 release also)


blinder:maven-3 $ svn diff build.xml
Index: build.xml
===================================================================
--- build.xml	(revision 941139)
+++ build.xml	(working copy)
@@ -237,7 +237,6 @@
   <target name="extract-assembly" depends="init,maven-assembly" description="extracts the maven assembly into maven.home">
     <echo>Extracting assembly to ${maven.home.dirname} ...</echo>
     <!-- If we are starting from scratch make sure the directory is created -->
-    <delete dir="${maven.home.effective}" />
     <mkdir dir="${maven.home.effective}" />
     <unzip src="${maven.assembly}" dest="${maven.home.dirname}" />
     <chmod perm="+x">



-- 
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: (MNG-4663) Maven's default build.xml deletes install target dir unnecessarily

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4663.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

The cleaning of {{maven.home}} is a desired step before extracting the generated assembly.

Regarding validation of the specified home directory, the script for 2.2.x has already been improved as per MNG-4352, the build script for 3.x now prompts the user if the specified directory already exists.

> Maven's default build.xml deletes install target dir unnecessarily
> ------------------------------------------------------------------
>
>                 Key: MNG-4663
>                 URL: http://jira.codehaus.org/browse/MNG-4663
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 2.2.1, 3.0-beta-1
>         Environment: OpenSolaris build 135, build 138. Java 1.6. Generic hardware
>            Reporter: James C. McPherson
>            Assignee: Benjamin Bentmann
>
> When running ant in the top level of the source distribution, the extract-assembly target uses the ant <delete/> task
> to ensure that a directory is created.
> This is undocumented in the installation guide and README.txt file, and unnecessary - ant's <Mkdir/> task runs the
> equivalent of "mkdir -p" which ensures that the directory is created anyway.
> patch against maven-3 trunk (though the issue exists in maven-2.2.1 release also)
> blinder:maven-3 $ svn diff build.xml
> Index: build.xml
> ===================================================================
> --- build.xml	(revision 941139)
> +++ build.xml	(working copy)
> @@ -237,7 +237,6 @@
>    <target name="extract-assembly" depends="init,maven-assembly" description="extracts the maven assembly into maven.home">
>      <echo>Extracting assembly to ${maven.home.dirname} ...</echo>
>      <!-- If we are starting from scratch make sure the directory is created -->
> -    <delete dir="${maven.home.effective}" />
>      <mkdir dir="${maven.home.effective}" />
>      <unzip src="${maven.assembly}" dest="${maven.home.dirname}" />
>      <chmod perm="+x">

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