Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 53058 invoked from network); 31 Mar 2010 21:18:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Mar 2010 21:18:52 -0000 Received: (qmail 40015 invoked by uid 500); 31 Mar 2010 21:18:52 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 39976 invoked by uid 500); 31 Mar 2010 21:18:52 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 39964 invoked by uid 99); 31 Mar 2010 21:18:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 21:18:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 21:18:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C69D9234C4CB for ; Wed, 31 Mar 2010 21:18:27 +0000 (UTC) Message-ID: <1811862614.616091270070307812.JavaMail.jira@brutus.apache.org> Date: Wed, 31 Mar 2010 21:18:27 +0000 (UTC) From: "Maarten Coene (JIRA)" To: notifications@ant.apache.org Subject: [jira] Commented: (IVY-1179) Packager resolver always extracts all files from archives even when the packaging instructions contains include tags In-Reply-To: <1601495640.610241270058488383.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IVY-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852111#action_12852111 ] Maarten Coene commented on IVY-1179: ------------------------------------ Your suggested fix seems ok to me. Please go ahead and attach your patch + junit tests Maarten > Packager resolver always extracts all files from archives even when the packaging instructions contains include tags > -------------------------------------------------------------------------------------------------------------------- > > Key: IVY-1179 > URL: https://issues.apache.org/jira/browse/IVY-1179 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 2.1.0, trunk > Reporter: Stefan De Boey > Priority: Minor > Original Estimate: 2h > Remaining Estimate: 2h > > According to the documentation the packager resolver should unzip/untar only specific files and folders (and not the complete archive) from downloaded resources in case the packager module description specfies include tags. Let's assume we have a module testng (example is taken from the examples in the Packager Resolver documentation) and we have a packager module descriptor (the packaging instructions) packager.xml specifying the following resource: > {code:xml} > > > > {code} > this instructs the package resolver to download the resources from http://testng.org/... and then extract the archive, but only all JAR files in the root of the archive. > in this case only the JAR's in the ZIP file should be extracted from the resource, but that's not the case. at first i didn't notice this, but i was creating the packaging instructions for a project which is in a huge ZIP file and so i only wanted to extract the files that i actually needed, but i noticed that the extraction took way to long. > i then configured the packager resolver to preserve the build directories (where the archive is extracted) for debugging purposes and i noticed that the complete archive was still extracted although the packager.xml file contained the necessary 'include' tags to only inluce 3 JAR's. > when using the preserveBuildDirectories switch on the packager resolver, it's also possible to view the ANT build file packager-output.xml (this one is generated by the packager resolver based on the packaging instructions). this build file is executed by the package resolver to do the extraction process. this is the relevant part of the packager-output.xml file for the above mentioded example for TestNG: > {code:xml} > > > > > > {code} > but this is incorrect and that's why the complete zip is still extracted. the 'fileset' tag should be used to indicate a set of ZIP files that need to be extracted, not to indicate which resources from the archive (specified in the 'src' attribute of the unzip tag) need to be included when extracting. 'patternset' is what we need here instead of 'fileset' > the actual problem is situated in the file src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl on line 420 (in the ivy core project). > {code:xml} > > > > > > > > > > {code} > should be: > {code:xml} > > > > > > > > > > {code} > the same needs to be done for the TAR part in the packages.xsl file. > i already tried this fix and it works. > if that's OK, i'll create a patch for this and provide the necessary unit tests to illustrate the problem and the fix. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.