You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Daniel Krisher (JIRA)" <ji...@codehaus.org> on 2005/08/16 15:39:57 UTC

[jira] Commented: (MNG-735) Assembly plugin to support 'directory' archive type

    [ http://jira.codehaus.org/browse/MNG-735?page=comments#action_44546 ] 

Daniel Krisher commented on MNG-735:
------------------------------------

This patch is somewhat invalidated due to MNG-483 (sorry, I should have checked JIRA more carefully first...):

I wrote this with the intention of using it as a development-time tool (i.e. generate the assembly structure for immediate use, but not installation/deployment), so an assembly of this format would NOT be an artifact.  I'm not sure of the best approach to implement this behavior, I can think of two that immediately come to mind:

  1.  Implement a seperate goal to generate the (un-archived) directory that does not export the assembly as an artifact.  This might be good because you would probably not want to generate any other specified assembly archive formats when using the 'directory' type, however this would basically be a one-line change from the AssemblyMojo.java from MNG-483, duplicated code == bad.

  2.  Somehow specify that this archive is not an artifact (e.g. an xml declaration associated with assembly.formats), e.g.:
       <assembly>
         <id>bin</id>
         <artifactFormats>
           <format>tar</format>
        </artifactFormats>
         <developmentFormats>
           <format>directory</format>
         </developmentFormats>
       ...


I am not overly happy with either approach...
      

Also, MNG-723 was brought to my attention (the assembly:unpack goal), and I just wanted to mention that this is not the same thing as what this patch does.  MNG-723 unpacks the pom dependencies to a work directory (jars/zips).  This patch copies all of the dependancies (and other files specified in the assembly xml) to a specified directory.  Those dependencies can be copied in their native formats, or unpacked, the idea is simply to provide a non-archived version of the assembly, using the same structure that would appear if it were archived.  This format should be able to coexist with the unpack goal.





>From Maven-Users:
----------------------------------
Hi Daniel,

FYI, I have assembly patches sitting in Jira, and awaiting publication
to svn:

1) MNG-723: Adds an 'unpack' goal that unpacks all project dependencies
(jars and zips) into the working directory.
2) MNG-483: Attaches all assemblies as project artifacts, so that they
get installed automatically during 'install'.  (Your subsequent patch
will have implications here)

-------------------------------------------

Hmm, I would definitely not want an un-archived assembly directory to be installed/deployed to a repository, this was really just intended as a development-time tool.  I am still very new to Maven, so I'm not quite sure of the best approach here.  I will take another look.  Maybe my patch should be implemented as a seperate goal, I don't like 'special cases' where this would be the only assembly archive type that wasn't an artifact...

> Assembly plugin to support 'directory' archive type
> ---------------------------------------------------
>
>          Key: MNG-735
>          URL: http://jira.codehaus.org/browse/MNG-735
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-plugins
>     Reporter: Daniel Krisher
>     Priority: Minor
>  Attachments: AssemblyMojo.java.diff, DirectoryArchiver.java
>
>
> Add the ability for the assembly plugin to create an assembly on the native file system (i.e. a directory) that is not an archive (zip/jar/tar/etc).  
> The assembly plugin supports configuration of a directory structure containing pom dependencies and other files based on the specified assembly xml definition.  Presently this is used to create various types of archives.   
> Using the assembly plugin is the only way I have found to create the correct directory structure for an application I am developing however I would like to do this without actually archiving the components (i.e. create the file structure but don't tar/zip/etc it).  Building (and compressing) the archive takes a significant amount of time, and more often than not, we don't ever use the archive (except to extract the contents to the filesystem, run the application for testing, and never use it again), at least during development.  
> I propose adding a 'directory' archive type that simply copies the xml specified files/dependencies to a specified path.  This archive type might be specified in the assembly xml file, or alternatively,  via a runtime parameter (profile/property) overriding the archive type(s) specified in the assembly xml, for use during development.
> I am currently working on a solution as this will be useful for our application that is built with m2, I will submit a patch as soon as I have something workable.

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


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