Re: Open source ivy files project?
On Thu, Apr 3, 2008 at 10:20 PM, Archie Cobbs [EMAIL PROTECTED] wrote: One last question what purpose does the organization attribute really serve anyway? Is it only to allow for two different organizations to create modules with the same name? Yes, mainly. If so, I wonder if that ability is really needed. Look at the RPM namespace for example. There are lots more RPMs in the world than than there are Java projects, yet a flat namespace works just fine. First I'm not sure of the proportion, if you take into account all privately developed java projects. Second, a flat namespace would involve a change in the structure to store repositories, because some filesystems don't perform very well when you have a very large number of directories in only one directory. That being said, I already wondered if by using the package names convention we couldn't actually get rid of organization. After all, that's what OSGi does. But this is a big change in Ivy, and I'm not sure it's worth it. Xavier For example, when people refer to jakarta-commons-lang or hibernate you generally know what they're talking about. Maybe we should just get rid of it :-) Just a thought. -Archie On Thu, Apr 3, 2008 at 8:39 AM, Archie Cobbs [EMAIL PROTECTED] wrote: Thanks again for the thoughtful comments. I think the right approach for now is to stick with the current model of setting organization as the originator of the code, not the meta-data. However in doing that we should keep this potential packager issue in mind, and if it eventually looks like a new packager attribute is needed (plus all the new associated conflict resolution logic), then we can add that later down the road. So consider this digression closed for now. I think I have enough information to go and work on a new resolver based on these ideas... will report back later... Thanks, -Archie On Thu, Apr 3, 2008 at 12:52 AM, Xavier Hanin [EMAIL PROTECTED] wrote: On Thu, Apr 3, 2008 at 7:13 AM, Adrian Sandor [EMAIL PROTECTED] wrote: Archie Cobbs wrote: Thinking about this more, I think it boils down to this question: do we assume the entity creating software jfoobar is the same as the entity creating the ivy.xml file for jfoobar? In an ideal world, yes I agree: this would be true, and then there is no question who the organization is. However, in the real world, I don't see many projects shipping ivy.xml files in their jfoobar.zip distributions For Ivy to get more popular and usable, there has to be a way for people to just plug play into an existing ivy distribution network of some kind (like the one I'm proposing). Like CPAN is for perl, etc. But for such networks to exist, Ivy has to support 3rd party packaging. Otherwise, there will have to be a one true source of ivy.xml files... and who will that be? I don't see anyone stepping up to the plate at the moment. And for 3rd party packaging to work (see below), we need to be able to separate the producing organization from the packaging organization. So you either have to make organization the packager.. or, add another resolution dimension (packager?) -Archie I see your point, and I have some comments: - The org. and module don't have to be unique *in the whole universe*, but just in each repository; different repositories can have the same module with the same org. but different packagers (and probably different ivy descriptors) - There may be 2 modules with the exact same name but different organizations (creators); if the packager is the same, then how can you distinguish them, other than by the org.? - Anyway, I think it's a good idea to add an optional packager attribute, and perhaps a packaging version (so that you can fix a problem in the descriptor without overwriting it and without changing the module revision), then we should think about how ivy will choose a module when it's available with different packagers This is a tough problem when you have to deal with conflict management in the mean time. That's why I wouldn't put this choice in the tool responsibility, but rather in the user responsibility: when choosing to pick up modules from several repositories, the user has to choose the main trust source, by putting it at first position in the chain for instance. With Ivy namespace support, and per module resolver settings, you really have very good control over the set of repositories you want to use. BTW, I think the worst thing for Ivy would be to have many different repositories hosting the same modules with different metadata. I clearly don't believe in a centralized repository, but I think you'll have mainly two
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java Thu Apr 3 15:49:49 2008 @@ -276,41 +276,6 @@ fileInfo.setLastModified(modtime); } -private void sendBytes(Channel channel, byte[] data, String fileName, String mode) -throws IOException, RemoteScpException { -OutputStream os = channel.getOutputStream(); -InputStream is = new BufferedInputStream( -channel.getInputStream(), SEND_BYTES_BUFFER_LENGTH); - -try { -if (channel.isConnected()) { -channel.start(); -} else { -channel.connect(); -} -} catch (JSchException e1) { -throw (IOException) new IOException(Channel connection problems).initCause(e1); -} - -readResponse(is); - -String cline = C + mode + + data.length + + fileName + \n; - -os.write(cline.getBytes()); -os.flush(); - -readResponse(is); - -os.write(data, 0, data.length); -os.write(0); -os.flush(); - -readResponse(is); - -os.write(E\n.getBytes()); -os.flush(); -} - private void sendFile(Channel channel, String localFile, String remoteName, String mode) throws IOException, RemoteScpException { byte[] buffer = new byte[BUFFER_SIZE]; @@ -480,101 +445,6 @@ os.flush(); } return fileInfo; -} - -/** - * Copy a local file to a remote directory, uses mode 0600 when creating the file on the remote - * side. - * - * @param localFile - *Path and name of local file. - * @param remoteTargetDirectory - *Remote target directory where the file has to end up (optional) - * @param remoteName - *target filename to use - * @throws IOException - * in case of network problems - * @throws
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
It was hardcoded to 0600 in Scp.java before I made this change. To keep it BC, I defaulted it to the same value. As far as I could see, the umask wasn't used. Since this attribute is only used for publishing modules, not for module retrieval, I think we should at least keep publish in the attribute name, but renaming 'mode' to 'permissions' (or something else) is fine for me. Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: dev@ant.apache.org Sent: Friday, April 4, 2008 8:51:18 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java Thu Apr 3 15:49:49 2008 @@ -276,41 +276,6 @@ fileInfo.setLastModified(modtime); } -private void sendBytes(Channel channel, byte[] data, String fileName, String mode) -throws IOException, RemoteScpException { -OutputStream os = channel.getOutputStream(); -InputStream is = new BufferedInputStream( -channel.getInputStream(), SEND_BYTES_BUFFER_LENGTH); - -try { -if (channel.isConnected()) { -channel.start(); -} else { -channel.connect(); -} -} catch (JSchException e1) { -throw (IOException) new IOException(Channel connection problems).initCause(e1); -} - -readResponse(is); - -String cline = C + mode + + data.length + + fileName + \n; - -os.write(cline.getBytes()); -os.flush(); - -readResponse(is); - -os.write(data, 0, data.length); -os.write(0); -os.flush(); - -readResponse(is); - -os.write(E\n.getBytes()); -os.flush(); -} - private void sendFile(Channel channel, String localFile, String
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
On Fri, Apr 4, 2008 at 9:19 AM, Maarten Coene [EMAIL PROTECTED] wrote: It was hardcoded to 0600 in Scp.java before I made this change. To keep it BC, I defaulted it to the same value. OK, I didn't see that, I thought it was using umask according to the discussions on the issue. Sorry about that. As far as I could see, the umask wasn't used. Since this attribute is only used for publishing modules, not for module retrieval, I think we should at least keep publish in the attribute name, but renaming 'mode' to 'permissions' (or something else) is fine for me. Indeed, so I prefer publishPermissions. Xavier Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: dev@ant.apache.org Sent: Friday, April 4, 2008 8:51:18 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java Thu Apr 3 15:49:49 2008 @@ -276,41 +276,6 @@ fileInfo.setLastModified(modtime); } -private void sendBytes(Channel channel, byte[] data, String fileName, String mode) -throws IOException, RemoteScpException { -OutputStream os = channel.getOutputStream(); -InputStream is = new BufferedInputStream( -channel.getInputStream(), SEND_BYTES_BUFFER_LENGTH); - -try { -if (channel.isConnected()) { -channel.start(); -} else { -channel.connect(); -} -} catch (JSchException e1) { -throw (IOException) new IOException(Channel connection problems).initCause(e1); -} - -readResponse(is); - -String cline = C + mode + + data.length + +
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
Btw, in the manual for chmod, they use the mode terminology for this kind of information. Maarten - Original Message From: Maarten Coene [EMAIL PROTECTED] To: Ant Developers List dev@ant.apache.org Sent: Friday, April 4, 2008 9:19:57 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java It was hardcoded to 0600 in Scp.java before I made this change. To keep it BC, I defaulted it to the same value. As far as I could see, the umask wasn't used. Since this attribute is only used for publishing modules, not for module retrieval, I think we should at least keep publish in the attribute name, but renaming 'mode' to 'permissions' (or something else) is fine for me. Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: dev@ant.apache.org Sent: Friday, April 4, 2008 8:51:18 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java Thu Apr 3 15:49:49 2008 @@ -276,41 +276,6 @@ fileInfo.setLastModified(modtime); } -private void sendBytes(Channel channel, byte[] data, String fileName, String mode) -throws IOException, RemoteScpException { -OutputStream os = channel.getOutputStream(); -InputStream is = new BufferedInputStream( -channel.getInputStream(), SEND_BYTES_BUFFER_LENGTH); - -try { -if (channel.isConnected()) { -channel.start(); -} else { -channel.connect(); -} -} catch (JSchException e1) { -throw (IOException) new IOException(Channel connection problems).initCause(e1); -
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
On Fri, Apr 4, 2008 at 9:24 AM, Maarten Coene [EMAIL PROTECTED] wrote: Btw, in the manual for chmod, they use the mode terminology for this kind of information. Maybe it's only me then, but I think mode is too generic in this situation. Moreover we have resolveMode option on the resolve task (introduced recently), and I think we could later end up with the same kind of need on publish, in which case we couldn't use publishMode to avoid the confusion if we keep it for this attribute. What do you think? Xavier Maarten - Original Message From: Maarten Coene [EMAIL PROTECTED] To: Ant Developers List dev@ant.apache.org Sent: Friday, April 4, 2008 9:19:57 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java It was hardcoded to 0600 in Scp.java before I made this change. To keep it BC, I defaulted it to the same value. As far as I could see, the umask wasn't used. Since this attribute is only used for publishing modules, not for module retrieval, I think we should at least keep publish in the attribute name, but renaming 'mode' to 'permissions' (or something else) is fine for me. Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: dev@ant.apache.org Sent: Friday, April 4, 2008 8:51:18 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java Thu Apr 3 15:49:49 2008 @@ -276,41 +276,6 @@ fileInfo.setLastModified(modtime); } -private void sendBytes(Channel channel, byte[] data, String fileName, String
Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository
publishPermissions is fine for me, we can use the chmod mode terminology in the documentation of this attribute. Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: Ant Developers List dev@ant.apache.org Sent: Friday, April 4, 2008 9:45:57 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 9:24 AM, Maarten Coene [EMAIL PROTECTED] wrote: Btw, in the manual for chmod, they use the mode terminology for this kind of information. Maybe it's only me then, but I think mode is too generic in this situation. Moreover we have resolveMode option on the resolve task (introduced recently), and I think we could later end up with the same kind of need on publish, in which case we couldn't use publishMode to avoid the confusion if we keep it for this attribute. What do you think? Xavier Maarten - Original Message From: Maarten Coene [EMAIL PROTECTED] To: Ant Developers List dev@ant.apache.org Sent: Friday, April 4, 2008 9:19:57 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java It was hardcoded to 0600 in Scp.java before I made this change. To keep it BC, I defaulted it to the same value. As far as I could see, the umask wasn't used. Since this attribute is only used for publishing modules, not for module retrieval, I think we should at least keep publish in the attribute name, but renaming 'mode' to 'permissions' (or something else) is fine for me. Maarten - Original Message From: Xavier Hanin [EMAIL PROTECTED] To: dev@ant.apache.org Sent: Friday, April 4, 2008 8:51:18 AM Subject: Re: svn commit: r644541 - in /ant/ivy/core/trunk: CHANGES.txt doc/resolver/ssh.html src/java/org/apache/ivy/plugins/repository/ssh/Scp.java src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java On Fri, Apr 4, 2008 at 12:49 AM, [EMAIL PROTECTED] wrote: Author: maartenc Date: Thu Apr 3 15:49:49 2008 New Revision: 644541 URL: http://svn.apache.org/viewvc?rev=644541view=rev Log: IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) + removal of some unused code Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/doc/resolver/ssh.html ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Thu Apr 3 15:49:49 2008 @@ -69,6 +69,7 @@ - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740) - NEW: Add transitive dependency version and branch override mechanism (IVY-784) +- IMPROVEMENT: make it possible to specify permissions of published files for the SSH resolver (IVY-764) - IMPROVEMENT: Load Ivy version number into some Ant property (IVY-790) - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757) - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727) Modified: ant/ivy/core/trunk/doc/resolver/ssh.html URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/resolver/ssh.html?rev=644541r1=644540r2=644541view=diff == --- ant/ivy/core/trunk/doc/resolver/ssh.html (original) +++ ant/ivy/core/trunk/doc/resolver/ssh.html Thu Apr 3 15:49:49 2008 @@ -56,6 +56,8 @@ tdNo, defaults to host given on the patterns, fail if none is set/td/tr trtdport/tdtdThe port to connect to/td tdNo, defaults to 22/td/tr +trtdpublishMode/tdtdA four digit string (e.g., 0644, see man chmod, man open) specifying the permissions of the published files. span class=since(since 2.0)/span +/tdtdNo, defaults to 0600/td/tr Is it a good idea to give a default value to this attribute? This will break BC, it used to be using the umask, right? I wonder if the default shouldn't be use the umask to preserve BC. WDYT? BTW, I don't like the name publishMode. What do you think of permissions or umask? Xavier /tbody /table h1Child elements/h1 Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/Scp.java URL:
Re: FailureRecorder problems in Gump
On Fri, 04 Apr 2008, Stefan Bodewig [EMAIL PROTECTED] wrote: The strange thing is that even the oldest version of JUnit4TestCaseFacade[3] I can find contains such a constructor. http://junit.cvs.sourceforge.net/junit/junit/junit/framework/JUnit4TestCaseFacade.java?hideattic=0revision=1.2view=markup seems to be the version from JUnit 4.0 'till 4.2, doesn't have a String-arg constructor either. Since most of us are running Ant's tests against JUnit 3 (at least I do when testing locally), we've probably not seen the task break on JUnit4. The root of the problem probably is that FailureRecorder expects the Test instance passed into addFailure to be an instance of the class under test - something that isn't true for JUnit4 wrapped tests in Ant. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FailureRecorder problems in Gump
Hi all, we can finally see[1] why the tests fail in Gump (and this is the only remaining failure on vmgump, BTW) [junit] nested build's System.err: /srv/gump/public/workspace/ant/src/etc/testcases/taskdefs/optional/out/FailedTests.java:9: cannot find symbol [junit] symbol : constructor JUnit4TestCaseFacade(java.lang.String) [junit] location: class junit.framework.JUnit4TestCaseFacade [junit] suite.addTest(new junit.framework.JUnit4TestCaseFacade(test02)); [junit] ^ [junit] /srv/gump/public/workspace/ant/src/etc/testcases/taskdefs/optional/out/FailedTests.java:10: cannot find symbol [junit] symbol : constructor JUnit4TestCaseFacade(java.lang.String) [junit] location: class junit.framework.JUnit4TestCaseFacade [junit] suite.addTest(new junit.framework.JUnit4TestCaseFacade(test03)); [junit] ^ [junit] /srv/gump/public/workspace/ant/src/etc/testcases/taskdefs/optional/out/FailedTests.java:11: cannot find symbol [junit] symbol : constructor JUnit4TestCaseFacade(java.lang.String) [junit] location: class junit.framework.JUnit4TestCaseFacade [junit] suite.addTest(new junit.framework.JUnit4TestCaseFacade(test04)); [junit] ^ [junit] /srv/gump/public/workspace/ant/src/etc/testcases/taskdefs/optional/out/FailedTests.java:12: cannot find symbol [junit] symbol : constructor JUnit4TestCaseFacade(java.lang.String) [junit] location: class junit.framework.JUnit4TestCaseFacade [junit] suite.addTest(new junit.framework.JUnit4TestCaseFacade(test10)); [junit] ^ [junit] 4 errors Looking at the current CVS HEAD of JUnit[2], I don't see a String-arg constructor there, so this explains the problem. The strange thing is that even the oldest version of JUnit4TestCaseFacade[3] I can find contains such a constructor. Any ideas? Stefan [1] http://vmgump.apache.org/gump/public/ant/test-ant/gump_work/build_ant_test-ant.html [2] http://junit.cvs.sourceforge.net/junit/junit/src/main/java/junit/framework/JUnit4TestCaseFacade.java?revision=1.1view=markup [3] http://junit.cvs.sourceforge.net/junit/junit/src/junit/framework/JUnit4TestCaseFacade.java?hideattic=0revision=1.1view=markup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FailureRecorder problems in Gump
On Fri, 04 Apr 2008, Stefan Bodewig [EMAIL PROTECTED] wrote: The root of the problem probably is that FailureRecorder expects the Test instance passed into addFailure to be an instance of the class under test - something that isn't true for JUnit4 wrapped tests in Ant. it also assumes the class under test has a String-arg constructor which isn't necessarily true for JUnit3 type of tests either. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Open source ivy files project?
On Thu, Apr 3, 2008 at 8:39 AM, Archie Cobbs [EMAIL PROTECTED] wrote: I think I have enough information to go and work on a new resolver based on these ideas... will report back later... Here's a very rough first cut at a new builder resolver. Here's the basic idea: it works like URLResolver for the ivy.xml file. For other artifacts, it short-circuits the normal functioning: first, it gets the build.xml file by finding the builder artifact (using normal URLResolver stuff). This build.xml is just an ant file that is expected to do whatever action necessary to build the artifacts and put them in an artifacts/ subdirectory. This build.xml is executed by running ant as a separate process. Then the resolver returns the artifacts found within that artifacts/ subdirectory. It includes code to clean up the work directory when the JVM exits. Some things that may to be improved: 1. Would it be better to invoke ant from within the same JVM? Actually I think not to avoid property pollution, etc. which might make the build process less robust and reproducible. 2. Ivy is not caching the built artifacts for some reason (I think) 3. It would be fancier to define custom XML for the build file and XSLT into a build.xml, but maybe not worth the trouble either. 4. Need to add checksum verification to the build.xml file after it downloads the ZIP file. To try this out: 1. Apply the attached patch to your ivy source tree 2. Run ant roundup 3. You should eventually see the TestNG usage message printed out, proving that it worked I'm sure there are other bugs at least the basic initial test works. Please let me know what you think. Thanks, -Archie -- Archie L. Cobbs Index: src/java/org/apache/ivy/plugins/resolver/builder/BuildRoot.java === --- src/java/org/apache/ivy/plugins/resolver/builder/BuildRoot.java (revision 0) +++ src/java/org/apache/ivy/plugins/resolver/builder/BuildRoot.java (revision 0) @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.ivy.plugins.resolver.builder; + +/** + * Wrapper class for the configurator to set build directory. + */ +public class BuildRoot { +private String dir; + +public String getDir() { +return this.dir; +} + +public void setDir(String dir) { +this.dir = dir; +} +} Property changes on: src/java/org/apache/ivy/plugins/resolver/builder/BuildRoot.java ___ Name: svn:keywords + Id Name: svn:eol-style + native Index: src/java/org/apache/ivy/plugins/resolver/builder/BuiltFileResource.java === --- src/java/org/apache/ivy/plugins/resolver/builder/BuiltFileResource.java (revision 0) +++ src/java/org/apache/ivy/plugins/resolver/builder/BuiltFileResource.java (revision 0) @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.ivy.plugins.resolver.builder; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +import org.apache.ivy.core.IvyPatternHelper; +import org.apache.ivy.core.module.descriptor.Artifact; +import org.apache.ivy.plugins.repository.Resource; + +/** + * Represents an artifact built by a [EMAIL PROTECTED] BuilderResolver}. +