ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51243] New: restrict name resource filtering does not work with maven-ant-tasks artifact:dependencies
Date Mon, 23 May 2011 08:25:23 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51243

             Bug #: 51243
           Summary: restrict name resource filtering does not work with
                    maven-ant-tasks artifact:dependencies
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: wim.symons@gmail.com
    Classification: Unclassified


We have an Ant build file which calls maven-ant-tasks's dependencies to copy a
bunch of dependencies.
Since we need to exclude some of those jars, we used Ant's resource selectors
to restrict the fileset produced by maven-ant-tasks.

A small snippet from our build.xml:

<artifact:pom file="common-core/pom.xml" id="pom.core" />
<target name="deploy-core-jar" depends="package-core-jar">
    <artifact:dependencies scopes="compile,runtime" pomrefid="pom.core"
filesetid="dependencies.core" />
    <copy todir="${clientlib.dir}" flatten="true">
        <restrict>
            <fileset refid="dependencies.core" />
            <rsel:not>
                <rsel:or>
                    <!-- remove maven-ant-tasks and yuicompressor and their
dependencies -->
                    <rsel:name name="**/yui*.jar" />
                    <rsel:name name="**/plexus*.jar" />
                    <rsel:name name="**/maven*.jar" />
                    <rsel:name name="**/wagon*.jar" />
                    <rsel:name name="**/ant*.jar" />
                    <rsel:name name="**/classworlds*.jar" />
                    <rsel:name name="**/backport*.jar" />
                </rsel:or>
            </rsel:not>
        </restrict>
    </copy>
</target>

But when we ran the target, no files at all were copied. After a long time
searching, we stumbled on the fact that it worked when we left out the line

<rsel:name name="**/maven*.jar" />

Our local Maven repository was located in /home/user/maven-repository. As it
seems the pattern given doesn't respect the standard Ant patterns and also
matches the directories in between (as maven* matches maven-repository).

As a workaround, we renamed the directory containing the Maven repository to
something that doesn't match any of the used patterns.

Reported bug at http://jira.codehaus.org/browse/MANTTASKS-219 as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message