[ http://jira.codehaus.org/browse/MSOURCES-6?page=all ]

Richard van der Hoff updated MSOURCES-6:
----------------------------------------

    Attachment: maven-source-plugin-2.0.2.patch

This doesn't seem to have been fixed in 2.0.2 after all.

The other patches seemed to be rather overcomplicated; it seems to me to be 
better to add things to the Archiver as you iterate over the resources and 
sources lists, which saves stashing all of their details in a temporary list.

Here (maven-source-plugin-2.0.2.patch) is my attempt at a patch; it will apply 
to both 2.0.2 and current trunk (r490260).

It would be great to see this applied and released; it's a bit of a blocker!

> Sources plugin ignores resource includes/excludes
> -------------------------------------------------
>
>                 Key: MSOURCES-6
>                 URL: http://jira.codehaus.org/browse/MSOURCES-6
>             Project: Maven 2.x Sources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Matthew Beermann
>            Priority: Critical
>             Fix For: 2.0.2
>
>         Attachments: maven-source-plugin-2.0.2.patch, 
> maven-sources-plugin-patches.zip, maven-sources-plugin-patches_v1.1.zip, 
> patch.txt
>
>
> The sources plugin appears to ignore the <includes> and <excludes> filters on 
> <resource> items. I discovered this because I have a project that needs to 
> package certain files that appear in the project root; e.g. 
> <directory>.</directory>, and then I <include> certain files.
> Trouble is, when the source plugin runs, it packages up EVERYTHING - 
> including the stuff in the "target" (output) directory! This leads to a 
> source attachment that's much too large. Worse, if you forget to clean 
> between builds, the size of the source jar will increase exponentially with 
> each build.
> Checking out the source code at 
> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java?view=markup,
>  I think the problem is in the addDirectories() method, which is simply 
> adding resource.getDirectory() and dropping the other information on the 
> floor.

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

        

Reply via email to