You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nathaniel Harward (JIRA)" <ji...@codehaus.org> on 2008/03/14 04:30:29 UTC
[jira] Created: (MASSEMBLY-298) Includes/Excludes within
are ignored
Includes/Excludes within <unpackOptions> are ignored
----------------------------------------------------
Key: MASSEMBLY-298
URL: http://jira.codehaus.org/browse/MASSEMBLY-298
Project: Maven 2.x Assembly Plugin
Issue Type: Bug
Affects Versions: 2.2-beta-2
Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
Reporter: Nathaniel Harward
Attachments: module-set-assembly-phase.patch
I have the following snippet in my assembly descriptor which does not work:
--snip--
<moduleSet>
<includes>
<include>my:module</include>
</includes>
<binaries>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<exclude>META-INF/**</exclude>
<exclude>**/.do_not_remove</exclude>
</excludes>
</unpackOptions>
<outputFileNameMapping/>
<outputDirectory>/</outputDirectory>
<fileMode>644</fileMode>
<directoryMode>755</directoryMode>
</binaries>
</moduleSet>
--snip--
Debug output shows:
--snip--
[DEBUG] includes:
**/*
[DEBUG] excludes:
none
--snip--
I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Antony Stubbs (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146104#action_146104 ]
Antony Stubbs commented on MASSEMBLY-298:
-----------------------------------------
nono, ah, I don't think I'm making myself clear.
With my POM, the assembly plugin runs - the problem is, with this patch applied, when i ran the assembly plugin using the pom instead of the command line "mvn clean package assembly:directory", the include/exclude fix did not take affect.
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Phillip Merensky (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146100#action_146100 ]
Phillip Merensky commented on MASSEMBLY-298:
--------------------------------------------
Hi Antony.
I do not know if this will help you but maybe http://maven.apache.org/plugins/maven-assembly-plugin/usage.html can point you in a right direction.
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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] Updated: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey updated MASSEMBLY-298:
---------------------------------
Assignee: John Casey
Remaining Estimate: 0 minutes
Original Estimate: 0 minutes
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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] Issue Comment Edited: (MASSEMBLY-298) Includes/Excludes
within are ignored
Posted by "Phillip Merensky (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146100#action_146100 ]
phillme edited comment on MASSEMBLY-298 at 8/26/08 6:28 PM:
---------------------------------------------------------------------
Hi Antony.
I do not know if this will help you but maybe http://maven.apache.org/plugins/maven-assembly-plugin/usage.html can point you in a right direction.
Regards,
Phillip
was (Author: phillme):
Hi Antony.
I do not know if this will help you but maybe http://maven.apache.org/plugins/maven-assembly-plugin/usage.html can point you in a right direction.
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Antony Stubbs (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145291#action_145291 ]
Antony Stubbs commented on MASSEMBLY-298:
-----------------------------------------
To answer my own question: On another note, it also includes empty directories which is undesired. is there an exclusion pattern for empty dirs?
An explicit
<includes>
<include>**/*.*</include>
<includes>
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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] Issue Comment Edited: (MASSEMBLY-298) Includes/Excludes
within are ignored
Posted by "Detelin Yordanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138744#action_138744 ]
detyo edited comment on MASSEMBLY-298 at 6/16/08 8:03 AM:
---------------------------------------------------------------------
No, this is different.
The "unpackOptions" works when nested within a "dependencySet", but does not work if it is just in the "binaries" tag.
Edit: I did not see the patch at first, it seems to fix the problem, do you think you can apply it for the beta-3 release?
was (Author: detyo):
No, this is different.
The "unpackOptions" works when nested within a "dependencySet", but does not work if it is just in the "binaries" tag.
I looked through the code and did not see any actual handling of UnpackOptions at this level.
Maybe simply adding:
UnpackOptions opts = binaries.getUnpackOptions();
if ( binaries.isUnpack() && ( opts != null ) )
{
task.setIncludes( opts.getIncludes() );
task.setExcludes( opts.getExcludes() );
}
to the ModuleSetAssemblyPhase.addModuleArtifact(..) (compare with AddDependencySetsTask.addDependencySet(..))
would do the trick?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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] Issue Comment Edited: (MASSEMBLY-298) Includes/Excludes
within are ignored
Posted by "Detelin Yordanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138744#action_138744 ]
detyo edited comment on MASSEMBLY-298 at 6/16/08 8:11 AM:
---------------------------------------------------------------------
No, this is different.
The "unpackOptions" works when nested within a "dependencySet", but does not work if it is just in the "binaries" tag.
Edit: I did not see the patch at first, it seems to fix the problem (maybe only needs a null check for the unpack opts).
Do you think you can apply it for the beta-3 release?
was (Author: detyo):
No, this is different.
The "unpackOptions" works when nested within a "dependencySet", but does not work if it is just in the "binaries" tag.
Edit: I did not see the patch at first, it seems to fix the problem, do you think you can apply it for the beta-3 release?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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] Work started: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on MASSEMBLY-298 started by John Casey.
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Antony Stubbs (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146097#action_146097 ]
Antony Stubbs commented on MASSEMBLY-298:
-----------------------------------------
Cheers!
Do you think you found the reason why it wasn't working from my POM configuration?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Antony Stubbs (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145113#action_145113 ]
Antony Stubbs commented on MASSEMBLY-298:
-----------------------------------------
+1 - i'm also suffering from this problem. Can we get a beta-3 release with this patch please?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Antony Stubbs (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145120#action_145120 ]
Antony Stubbs commented on MASSEMBLY-298:
-----------------------------------------
fyi, patch works for me except for one bizzare thing:
the exclusions only for work when suing:
mvn clean package assembly:directory
but do not work for:
mvn package
which runs from my pom:
{code}
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>directory</goal>
</goals>
</execution>
</executions>
{code}
On another note, it also includes empty directories which is undesired. is there an exclusion pattern for empty dirs?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Tobias Jungen (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=132927#action_132927 ]
Tobias Jungen commented on MASSEMBLY-298:
-----------------------------------------
This same issue has occurred to me, same version. Any mutation of exclude / include filters (such as **/META-INF/**, META-INF/, META-INF/**) did not resolve the problem. Will attach a test case tomorrow if I get the chance.
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Michael Heß (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136163#action_136163 ]
Michael Heß commented on MASSEMBLY-298:
---------------------------------------
Was this problem not supposed to be fixed since 2.2-beta2?
See http://jira.codehaus.org/browse/MASSEMBLY-195
Maybe we should just reopen 195?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "Detelin Yordanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138744#action_138744 ]
Detelin Yordanov commented on MASSEMBLY-298:
--------------------------------------------
No, this is different.
The "unpackOptions" works when nested within a "dependencySet", but does not work if it is just in the "binaries" tag.
I looked through the code and did not see any actual handling of UnpackOptions at this level.
Maybe simply adding:
UnpackOptions opts = binaries.getUnpackOptions();
if ( binaries.isUnpack() && ( opts != null ) )
{
task.setIncludes( opts.getIncludes() );
task.setExcludes( opts.getExcludes() );
}
to the ModuleSetAssemblyPhase.addModuleArtifact(..) (compare with AddDependencySetsTask.addDependencySet(..))
would do the trick?
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Attachments: module-set-assembly-phase.patch
>
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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: (MASSEMBLY-298) Includes/Excludes within
are ignored
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MASSEMBLY-298.
--------------------------------
Resolution: Fixed
> Includes/Excludes within <unpackOptions> are ignored
> ----------------------------------------------------
>
> Key: MASSEMBLY-298
> URL: http://jira.codehaus.org/browse/MASSEMBLY-298
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-2
> Environment: Maven 2.0.8, Intel Mac 10.5, JDK 5.0
> Reporter: Nathaniel Harward
> Assignee: John Casey
> Fix For: 2.2-beta-3
>
> Attachments: module-set-assembly-phase.patch
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> I have the following snippet in my assembly descriptor which does not work:
> --snip--
> <moduleSet>
> <includes>
> <include>my:module</include>
> </includes>
> <binaries>
> <unpack>true</unpack>
> <unpackOptions>
> <excludes>
> <exclude>META-INF/**</exclude>
> <exclude>**/.do_not_remove</exclude>
> </excludes>
> </unpackOptions>
> <outputFileNameMapping/>
> <outputDirectory>/</outputDirectory>
> <fileMode>644</fileMode>
> <directoryMode>755</directoryMode>
> </binaries>
> </moduleSet>
> --snip--
> Debug output shows:
> --snip--
> [DEBUG] includes:
> **/*
> [DEBUG] excludes:
> none
> --snip--
> I believe the problem is at line 271/272 of ModuleSetAssemblyPhase (in the 2.2-beta-2 revision, anyway) -- it calls "task.setUnpack( binaries.isUnpack() );" but does not set the unpack options (if present), hence they are ignored :(
> Patch is attached, and works just fine in my case above.
--
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