Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 70427 invoked from network); 2 Dec 2010 20:06:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 20:06:52 -0000 Received: (qmail 94458 invoked by uid 500); 2 Dec 2010 20:06:52 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 94434 invoked by uid 500); 2 Dec 2010 20:06: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 94427 invoked by uid 99); 2 Dec 2010 20:06:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 20:06: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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 20:06:49 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oB2K6RNP010963 for ; Thu, 2 Dec 2010 20:06:28 GMT Message-ID: <17778761.80431291320387659.JavaMail.jira@thor> Date: Thu, 2 Dec 2010 15:06:27 -0500 (EST) From: "Gene Smith (JIRA)" To: notifications@ant.apache.org Subject: [jira] Created: (IVY-1252) symlinkmass feature based on symlink feature of ivy:retrieve 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 symlinkmass feature based on symlink feature of ivy:retrieve ------------------------------------------------------------ Key: IVY-1252 URL: https://issues.apache.org/jira/browse/IVY-1252 Project: Ivy Issue Type: New Feature Components: Ant, Core, Documentation Affects Versions: 2.2.0 Environment: UNIX/Linux Reporter: Gene Smith Priority: Minor I have an improvement I have made in a locally built copy of Ivy, to speed up the making of symbolic links when retrieving dependencies. It was written based on: apache-ivy-2.2.0-src.tar.gz It changes existing files, but creates no new files. I have already made and am using the change in our local build system, and want to contribute back so that others can use it. .... The documentation for this feature would be added to: http://ant.apache.org/ivy/history/latest-milestone/use/retrieve.html in the main table: Attribute symlinkmass Description true to create symbolic links in mass, false to copy the artifacts. symlinkmass overrides "symlink" if both are set to "true". symlinkmass will create the same symbolic links "symlink" does, but with a single process call to "sh" with batched "ln" commands passed in as standard input. (works on UNIX/Linux, on other systems you may need to script it) Far large lists of resolved jars, this can be dramatically faster. The destination of the symbolic links depends on the value of the useOrigin attribute The events "StartRetrieveArtifactEvent" and EndRetrieveEvent, are NOT fired by this activity, because it is not clear when they should be called. Required No. Defaults to false .... Non trivial code changes are made in: apache-ivy-2.2.0/src/java/org/apache/ivy/core/retrieve/RetrieveEngine.java branching in the code based on the "symlinkmass" boolean in existing retrieval loop (where fetching of files would normally occur) to collect destination and source paths and after the loop to do the mass fetch import added for java.util.HashMap A non trivial method is added to handle linking of files based on a Map of destinations and sources. Existing methods are untouched. apache-ivy-2.2.0/src/java/org/apache/ivy/util/FileUtil.java a method to do the symlinking based of a Map of the destinations to sources imports added for java.util.Iterator, java.util.LinkedList, java.util.Map, java.util.regex.Pattern Trivial additions are made to pass the control parameter "symlinkmass" apache-ivy-2.2.0/src/java/org/apache/ivy/core/retrieve/RetrieveOptions.java apache-ivy-2.2.0/src/java/org/apache/ivy/ant/IvyRetrieve.java apache-ivy-2.2.0/src/java/org/apache/ivy/Main.java A unit test is added in apache-ivy-2.2.0/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java basically a duplicate of the unit test for "symlink" with a few internal code comments ... Notes on why we want this: The build system I maintain (Ant + Ivy, with Linux scripts for Developer support) was using the "symlink" feature for ivy:retrieve, because over a complete build of our code modules (about 25 separate and growing) the sub-builds make a total of about 3000 dependency links and the file space savings made it complete worth it. The build system is not about speed. It is about modularity, and we use Ivy to link the modules in a dependency tree so that we can swap them out as we . We like Ivy very much for that. Thank you all. But, while speed is a secondary consideration, it is not unimportant... and this improvement cuts about 8 minutes off an 18 minute build. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.