You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Shelley <ra...@yahoo.com> on 2006/11/06 18:46:16 UTC

Maven Assembly Plugin

We have noticed some odd behavior related to the maven-assembly-plugin...

With the latest 2.2-SNAPSHOT version of the maven-assembly-plugin, the
ability to define multiple "include" dependencySets and to define
dependencies by any combination of groupId, artifactId, type, and classifier
(using wildcards if necessary) should be available.  [Related:
http://jira.codehaus.org/browse/MASSEMBLY-90,
http://jira.codehaus.org/browse/MASSEMBLY-141,
http://jira.codehaus.org/browse/MASSEMBLY-157]

Using the 2.2.-SNAPSHOT version, when we define multiple ZIP file
dependencySet includes and unpack them, it not only includes/expands the
listed included dependencies but also some other [seemingly] unrelated
dependencies.  For instance, all of the zip dependencySets below only
contain static web content (html, js, css files) packaged as assemblies from
both WARs and JARs.  When we package the assembly below, the result includes
not only the content of the dependencySets listed, but also some other
dependencies (it only includes a couple of the "parent" project
dependencies, which don't seem to be similar or related).

<assembly>
   <id>static</id>
   <includeBaseDirectory>false</includeBaseDirectory>
   <formats>
      <format>zip</format>
   </formats>
   <dependencySets>
      <dependencySet>
         <outputFileNameMapping></outputFileNameMapping>
         <includes>
            <include>our.group.id:our.artifact.id.1:zip:static</include>
            <include>our.group.id:our.artifact.id.2:zip:static</include>	           
<include>our.group.id:our.artifact.id.3:zip:static</include>
         </includes>
         <unpack>true</unpack>
      </dependencySet>
   </dependencySets>
</assembly>

However, when we define a single include using wildcards and unpack them, it
creates the zip assembly as expected. It includes the project's three
"-static" zip dependencies (as defined above) and no more.

<assembly>
   <id>static</id>
   <includeBaseDirectory>false</includeBaseDirectory>
   <formats>
      <format>zip</format>
   </formats>
   <dependencySets>
      <dependencySet>
         <outputFileNameMapping></outputFileNameMapping>
         <includes>
            <include>*:zip:static</include>
         </includes>
         <unpack>true</unpack>
      </dependencySet>
   </dependencySets>
</assembly>

I would expect the results of using either of these assembly descriptors to
be the same, but this isn't the case. Is there an explanation for this
behavior, or is this a bug in the way that the assembly filters the
includes/excludes?
-- 
View this message in context: http://www.nabble.com/Maven-Assembly-Plugin-tf2583926s177.html#a7203497
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: Maven Assembly Plugin

Posted by John Casey <ca...@gmail.com>.
Can you please file a new JIRA issue for this? It comes from the fact that I
modified the include/exclude filtering NOT to be transitive for wildcard
patterns, but it is still transitive for normal patterns...it should not be
quite so implicit, I guess.

If you have a test project that you could zip up and attach to the issue,
I'll turn it into an integration test for this case...otherwise, I'll try to
generate a test case that matches your description.

Thanks, and sorry for the confusion.

-john

On 11/6/06, Shelley <ra...@yahoo.com> wrote:
>
>
> We have noticed some odd behavior related to the maven-assembly-plugin...
>
> With the latest 2.2-SNAPSHOT version of the maven-assembly-plugin, the
> ability to define multiple "include" dependencySets and to define
> dependencies by any combination of groupId, artifactId, type, and
> classifier
> (using wildcards if necessary) should be available.  [Related:
> http://jira.codehaus.org/browse/MASSEMBLY-90,
> http://jira.codehaus.org/browse/MASSEMBLY-141,
> http://jira.codehaus.org/browse/MASSEMBLY-157]
>
> Using the 2.2.-SNAPSHOT version, when we define multiple ZIP file
> dependencySet includes and unpack them, it not only includes/expands the
> listed included dependencies but also some other [seemingly] unrelated
> dependencies.  For instance, all of the zip dependencySets below only
> contain static web content (html, js, css files) packaged as assemblies
> from
> both WARs and JARs.  When we package the assembly below, the result
> includes
> not only the content of the dependencySets listed, but also some other
> dependencies (it only includes a couple of the "parent" project
> dependencies, which don't seem to be similar or related).
>
> <assembly>
>    <id>static</id>
>    <includeBaseDirectory>false</includeBaseDirectory>
>    <formats>
>       <format>zip</format>
>    </formats>
>    <dependencySets>
>       <dependencySet>
>          <outputFileNameMapping></outputFileNameMapping>
>          <includes>
>             <include>our.group.id:our.artifact.id.1:zip:static</include>
>             <include>our.group.id:our.artifact.id.2:zip:static</include>
> <include>our.group.id:our.artifact.id.3:zip:static</include>
>          </includes>
>          <unpack>true</unpack>
>       </dependencySet>
>    </dependencySets>
> </assembly>
>
> However, when we define a single include using wildcards and unpack them,
> it
> creates the zip assembly as expected. It includes the project's three
> "-static" zip dependencies (as defined above) and no more.
>
> <assembly>
>    <id>static</id>
>    <includeBaseDirectory>false</includeBaseDirectory>
>    <formats>
>       <format>zip</format>
>    </formats>
>    <dependencySets>
>       <dependencySet>
>          <outputFileNameMapping></outputFileNameMapping>
>          <includes>
>             <include>*:zip:static</include>
>          </includes>
>          <unpack>true</unpack>
>       </dependencySet>
>    </dependencySets>
> </assembly>
>
> I would expect the results of using either of these assembly descriptors
> to
> be the same, but this isn't the case. Is there an explanation for this
> behavior, or is this a bug in the way that the assembly filters the
> includes/excludes?
> --
> View this message in context:
> http://www.nabble.com/Maven-Assembly-Plugin-tf2583926s177.html#a7203497
> 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
>
>