Return-Path: Delivered-To: apmail-incubator-ivy-user-archive@locus.apache.org Received: (qmail 98086 invoked from network); 13 Dec 2007 17:30:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2007 17:30:55 -0000 Received: (qmail 48760 invoked by uid 500); 13 Dec 2007 17:30:44 -0000 Delivered-To: apmail-incubator-ivy-user-archive@incubator.apache.org Received: (qmail 48662 invoked by uid 500); 13 Dec 2007 17:30:44 -0000 Mailing-List: contact ivy-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@incubator.apache.org Delivered-To: mailing list ivy-user@incubator.apache.org Received: (qmail 48653 invoked by uid 99); 13 Dec 2007 17:30:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 09:30:44 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xavier.hanin@gmail.com designates 72.14.202.177 as permitted sender) Received: from [72.14.202.177] (HELO ro-out-1112.google.com) (72.14.202.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 17:30:21 +0000 Received: by ro-out-1112.google.com with SMTP id o35so966199rog.6 for ; Thu, 13 Dec 2007 09:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=ofhnwWh42ykWhZ3M5Mkd/+SI/MVzhSPKMtX++OckUYU=; b=s6tOr+WfW2EBT7sgv69N/FGi7eU7tziXkA50nGJFVUN2eWuDz++61KdGbBiimlvFfmvjkJ2skFgwylipblFE99XpA6i6aDpHqdpdzhy5kfUYmOTZLSEm2JGIaHHm+/q1HJPCXQ68umx4tgNaRVILa/Jv6NNuX1ya20oAJwgYV50= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=GMfMUKts2kBJy5QOM/SUUUpwLj1nK3Zl+IQZPyVXW3kMljsZ6U31tDTybhWAoJ2gXH7nb1fZY2maQbFjRNe8w4dIIJUzdJlFOaKAgdwG/dm03nW+HgLFUKbl4jsTXkqGwKSA7Ry759mjOyrEqqRzmWyv4axk9KWI9GExdJ3qcq4= Received: by 10.141.133.14 with SMTP id k14mr1260935rvn.127.1197567023359; Thu, 13 Dec 2007 09:30:23 -0800 (PST) Received: by 10.140.225.10 with HTTP; Thu, 13 Dec 2007 09:30:23 -0800 (PST) Message-ID: <635a05060712130930q7456e518l26cb061feca80299@mail.gmail.com> Date: Thu, 13 Dec 2007 18:30:23 +0100 From: "Xavier Hanin" To: ivy-user@incubator.apache.org Subject: Re: IvyDE source artifact not recognised In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10491_1589165.1197567023398" References: <49c77ae40712110211t2527c749qbaaa8cf5dc101365@mail.gmail.com> <2912BA8E-CF4E-4745-8FC2-8A3066693F57@anyware-tech.com> <49c77ae40712111618q5f0bc8b7r6e62c196249622f0@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10491_1589165.1197567023398 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline There are other ways to implement what you want without having to use multiple patterns. You can for instance use a custom attribute on your source artifact, and put this token in your pattern. For instance: ${ivy.conf.dir}/[organisation]/[revision]/[artifact][suffix].[ext] But I agree that making IvyDE more flexible by recognizing artifact name suffix for sources could make things easier to use. Feel free to open a new issue. Xavier On Dec 12, 2007 10:22 AM, Fernandes, Gerard wrote: > > It's fairly common in the Java world to have the pattern: > > artifact.ext for a binary and > artifact-src.ext for it's source. > > All things being equal, IvyDE should be smart enough to pair a binary wit= h > it's source if the only difference between the name is the existence of > "-src" in the source artifacts name. > > As it stands at the moment, IvyDE doesn't do that. It requires that the > source artifact have the EXACT SAME name as the binary artifact with the > only difference being a possibly different extension. > > Therefore, for IvyDE to work, one must perform the following 3 steps: > > (1) "commons-cli-1.1.jar" MUST have the source artifact named as " > commons-cli-1.1-src.[jar/zip]". The original source artifact produced by > the Commons-CLI maven build is named "commons-cli-src-1.1.zip". > > (2) AND, the ivysettings must be set to resolve artifacts of the > pattern > > > }/[organisation]/[revision]/[artifact].[ext]"/> > }/[organisation]/[revision]/[artifact]-src.[ext]"/> > }/[organisation]/[revision]/[artifact]-[revision].[ext]"/> > }/[organisation]/[revision]/[artifact]-[revision]-src.[ext]"/> > > > > (3) AND, the ivy.xml MUST have the source artifact name set to exactl= y > the same as the binary artifact name (Note that this is possible only > because of the above ivysettings which in my opinion is not ideal - you > should not have to add the "-src" bit to ivysettings) > rev=3D"1.1" conf=3D"COMPILE,RUNTIME,TEST->default"> > > ext=3D"zip" conf=3D"COMPILE" /> > > > Ideally, the ivysettings should be: > > > }/[organisation]/[revision]/[artifact].[ext]"/> > }/[organisation]/[revision]/[artifact]-[revision].[ext]"/> > > > And the ivy configuration should look like: > > rev=3D"1.1" conf=3D"COMPILE,RUNTIME,TEST->default"> > > ext=3D"zip" conf=3D"COMPILE" /> > > > But IvyDE will NOT attach the source if so configured. > > Gerard > > -----Original Message----- > From: John Gill [mailto:llignhoj@gmail.com] > Sent: 12 December 2007 00:18 > To: ivy-user@incubator.apache.org > Subject: Re: IvyDE source artifact not recognised > > I think the problem is that is you had a package that had several jars an= d > several source jars, how would ivy know how to match them together? > > The same goes for javadoc zips/jars. > > On Dec 12, 2007 5:05 AM, Nicolas Lalev=E9e > > wrote: > > > > > Le 11 d=E9c. 07 =E0 11:11, John Gill a =E9crit : > > > > > I believe that one of the limitations of ivyDE source linking is > > > that the names must match. You can have a different type/ext like > > > ".src.jar" > > > but > > > that's it. The only way I have ever got it to work is with matching > > > names. > > > > And I think that it is an error to have different names. Because > > having different names means talking about different artifact. > > > > So the ivy.xml have to look like that : > > > conf=3D"COMPILE,RUNTIME,TEST->default"> > > > > > conf=3D"COMPILE" /> > > > > > > Then there is the problem with the real artifact name : commons-cli- > > src-1.1.zip That can be fixed easily with a proper pattern : > > > > > [artifact]-src-[revision].[ext]"/> > > > > Nicolas > > > > > > > > > > > > > On Dec 11, 2007 6:16 PM, Fernandes, Gerard > > > > > > > > > wrote: > > > > > >> > > >> IvyDE doesn't recognise source artifacts with a different name than > > >> the binary artifact. > > >> > > >> E.g., If I have a JAR called commons-cli-1.1.jar and it's source > > >> called commons-cli-src-1.1.zip, an Ivy configuration with the > > >> following will resolve and the sources are downloaded (can be > > >> confirmed by the Ivy report as well as checking the cache) but will > > >> NOT attach sources in > > >> Eclipse: > > >> > >> cli" > > >> rev=3D"1.1" conf=3D"COMPILE,RUNTIME,TEST->default"> > > >> > > >> > >> ext=3D"zip" conf=3D"COMPILE" /> > > >> > > >> > > >> Ivy settings are: > > >> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]. > > >> [ext]"/> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]- > > >> [revision] > > >> .[ext]"/> > > >> > > >> > > >> The only way to make this work is to change Ivy settings to: > > >> > > >> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]. > > >> [ext]"/> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]-src. > > >> [ext]" > > >> /> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]- > > >> [revision] > > >> .[ext]"/> > > >> > >> pattern=3D"${ivy.conf.dir}/[organisation]/[revision]/[artifact]- > > >> [revision] > > >> -src.[ext]"/> > > >> > > >> > > >> And rename > > >> commons-cli-src-1.1.zip > > >> To > > >> commons-cli-1.1-src.zip > > >> > > >> And finally change the Ivy configuration to: > > >> > >> cli" > > >> rev=3D"1.1" conf=3D"COMPILE,RUNTIME,TEST->default"> > > >> > > >> > >> ext=3D"zip" conf=3D"COMPILE" /> > > >> > > >> > > >> > > >> Gerard > > >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > >> - - - > > >> - - - - - - - > > >> > > >> This message is intended only for the personal and confidential use > > >> of the designated recipient(s) named above. If you are not the > > >> intended recipient of this message you are hereby notified that any > > >> review, dissemination, distribution or copying of this message is > > >> strictly prohibited. This communication is for information > > >> purposes only and should not be regarded as an offer to sell or as > > >> a solicitation of an offer to buy any financial product, an > > >> official confirmation of any transaction, or as an official > > >> statement of Lehman Brothers. Email transmission cannot be > > >> guaranteed to be secure or error-free. Therefore, we do not > > >> represent that this information is complete or accurate and it > > >> should not be relied upon as such. > > >> All > > >> information is subject to change without notice. > > >> > > >> > > >> > > >> > > > > > > > > > -- > > > Regards, > > > John Gill > > > > > > > -- > Regards, > John Gill > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - > > This message is intended only for the personal and confidential use of th= e > designated recipient(s) named above. If you are not the intended recipie= nt > of this message you are hereby notified that any review, dissemination, > distribution or copying of this message is strictly prohibited. This > communication is for information purposes only and should not be regarded= as > an offer to sell or as a solicitation of an offer to buy any financial > product, an official confirmation of any transaction, or as an official > statement of Lehman Brothers. Email transmission cannot be guaranteed to= be > secure or error-free. Therefore, we do not represent that this informati= on > is complete or accurate and it should not be relied upon as such. All > information is subject to change without notice. > > > > --=20 Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/ ------=_Part_10491_1589165.1197567023398--