You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brian Ewins <Br...@i-documentsystems.com> on 2003/02/13 17:20:44 UTC

Sun download code

The attached code can screenscrape the downloads for most of the 
downloads from Sun for all the products listed below. The code is only 
intended to do the screenscrape itself, things like unpacking the right 
jar from the downloaded zip, moving it into maven's local repo, etc are 
best left to jelly (similar to the stuff I posted previously).

A couple of the jars I was aked to try for can't be done with this code 
- JCE and JSSE are available through the Sun Download Centre, 
registration required etc. The structure of those two downloads are 
completely different,  and while they could be done, need a bunch more 
work.  I don't need these as I use the Sun 1.4 JDK, maybe someone else 
would like to tackle this?

Usage:
    Sundance kid = new Sundance();
    // see URLs below for the various packages
    
kid.setDownloadURL("http://java.sun.com/cgi-bin/download3.cgi?config-file=jts1_0.config&platform=zip&button=Continue");
    kid.requestLicense();
    System.out.println(kid.getLicense());
    // user interaction goes here
    kid.acceptLicense();
    kid.download("C:\\test-jts.zip");

If you don't do the steps in the correct order, you'll get an 
IllegalStateException, in particular notice you'll get one if you try to 
call acceptLicense() without calling getLicense() to grab the license 
text first.

I need to wrap this up as a plugin or something, and tidy up error 
handling. Open to suggestions, comments on the code etc. Be vicious. I 
know this scraping approach isn't very 'neat' (compared to using jtidy, 
nekohtml, etc and working with the DOM) but first time I tried this, 
Neko was giving me back empty docs and I didn't want to play around with 
it too long. Also the html produced by download3.cgi is atrocious, not 
sure how well that would be handled.

I do have unit test code for most of the parser stuff, but I'm not sure 
how you'd test the 'real' download bits without doing real downloads, 
which would be a pain when rebuilding maven.

-Baz

 EJB, various releases:
http://java.sun.com/Download5?config-file=ejb-2_1-pfd-class.config&platform=zip&type=api&button=Continue
http://java.sun.com/Download5?config-file=ejb-1_1-pfd-class.config&platform=zip&type=pfd-class&button=Continue
(the EJB 2.0 download gets a server error. Don't know why, it looks the 
same as the rest)

JAF 1.1:
http://java.sun.com/webapps/download/Display?BundleId=7037&button=Continue

Javamail 1.3:
http://java.sun.com/webapps/download/Display?BundleId=7036&button=Continue
javamail 1.2:
http://java.sun.com/Download4?config-file=JavaMail-1_2.config&platform=zip&button=continue
Javamail 1.1.3
http://java.sun.com/Download3?config-file=javamail1_1_3.config&platform=zip&button=Continue

JDBC optional packages
http://java.sun.com/webapps/download/Display?BundleId=7287&button=Continue

JMS, various
http://java.sun.com/Download5?config-file=jms-1_1-fr-apidocs.config&type=fr-apidocs&platform=zip&button=continue
http://java.sun.com/Download5?config-file=jms-1_0_2b.config&platform=zip&button=continue

JNDI 1.2.1 Class Libraries
http://java.sun.com/webapps/download/Display?BundleId=7306&button=Continue
LDAP Service Provider, 1.2.4
http://java.sun.com/webapps/download/Display?BundleId=7307&button=Continue
DNS Service Provider, 1.2
http://java.sun.com/webapps/download/Display?BundleId=7302&button=Continue
NIS Service Provider, 1.2.1
http://java.sun.com/webapps/download/Display?BundleId=7308&button=Continue
RMI Registry Service Provider, 1.2.1
http://java.sun.com/webapps/download/Display?BundleId=7309&button=Continue
File System Service Provider, 1.2 Beta 3
http://java.sun.com/webapps/download/Display?BundleId=7304&button=Continue
COS Naming Service Provider, 1.2.1
http://java.sun.com/webapps/download/Display?BundleId=7301&button=Continue
DSML v1 Service Provider, 1.2
http://java.sun.com/webapps/download/Display?BundleId=7303&button=Continue
JNDI Demo Browser (source and binaries)
http://java.sun.com/webapps/download/Display?BundleId=7305&button=Continue

JTA
http://java.sun.com/webapps/download/Display?BundleId=7262&button=Continue

JTS
http://java.sun.com/cgi-bin/download3.cgi?config-file=jts1_0.config&platform=zip&button=Continue

XML Apis (summer pack)
http://java.sun.com/Download5?config-file=java_xml_pack-summer02_01.config&platform=zip&button=continue



Privacy and Confidentiality Notice

------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed.  Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.  If you have received it in error, please destroy it and notify us on the telephone number printed above.  If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


Re: Sun download code

Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2003-02-13 at 11:57, Brian Ewins wrote:
> I'll try to persuade a friend to put it on http://www.mkeym.com/ at the 
> weekend (with unit tests etc). I do this stuff in the office[1], 
> firewalled out of existence, and I don't have broadband at home. Failing 
> that, I'll bundle the project up and mail it over to you.
> 
> maven SNAPSHOTS are rapidly becoming a broadband killer-app for 
> me...need to get that sorted out.

I created a snapshot converter that will reach out to the repository and
convert your snaps to the latest timestamped version:

maven convert-snapshots (or convert-snapshots-auto)

This will pop up an interactive console and you can choose which snaps
you want to update and it will rewrite your updated POM. The auto
version just does it. Not pretty, but works. This is what I used to get
rid of the snaps for the release.


> -Baz
> 
> [1] its part of what I'm supposed to be doing, but its not something the 
> company would have on the website.
> 
> Jason van Zyl wrote:
> 
> >On Thu, 2003-02-13 at 11:20, Brian Ewins wrote:
> >  
> >
> >>The attached code can screenscrape the downloads for most of the 
> >>downloads from Sun for all the products listed below. The code is only 
> >>intended to do the screenscrape itself, things like unpacking the right 
> >>jar from the downloaded zip, moving it into maven's local repo, etc are 
> >>best left to jelly (similar to the stuff I posted previously).
> >>
> >>    
> >>
> >
> >Awesome!
> >
> >Geir will get back to me today and hopefully I'll get a contact at Sun
> >and we can come to some sort of agreement.
> >
> >Possibly to get distribution rights for these JARs from the ibiblio
> >repository provided we do the click through thing.
> >
> >Can you put the code on an URL somewhere?
> >
> >  
> >
> 
> 
> 
> Privacy and Confidentiality Notice
> 
> ------------------------------------------------
> 
> The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed.  Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.  If you have received it in error, please destroy it and notify us on the telephone number printed above.  If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-maven-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-maven-dev-help@jakarta.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


Re: Sun download code

Posted by Brian Ewins <Br...@i-documentsystems.com>.
I'll try to persuade a friend to put it on http://www.mkeym.com/ at the 
weekend (with unit tests etc). I do this stuff in the office[1], 
firewalled out of existence, and I don't have broadband at home. Failing 
that, I'll bundle the project up and mail it over to you.

maven SNAPSHOTS are rapidly becoming a broadband killer-app for 
me...need to get that sorted out.

-Baz

[1] its part of what I'm supposed to be doing, but its not something the 
company would have on the website.

Jason van Zyl wrote:

>On Thu, 2003-02-13 at 11:20, Brian Ewins wrote:
>  
>
>>The attached code can screenscrape the downloads for most of the 
>>downloads from Sun for all the products listed below. The code is only 
>>intended to do the screenscrape itself, things like unpacking the right 
>>jar from the downloaded zip, moving it into maven's local repo, etc are 
>>best left to jelly (similar to the stuff I posted previously).
>>
>>    
>>
>
>Awesome!
>
>Geir will get back to me today and hopefully I'll get a contact at Sun
>and we can come to some sort of agreement.
>
>Possibly to get distribution rights for these JARs from the ibiblio
>repository provided we do the click through thing.
>
>Can you put the code on an URL somewhere?
>
>  
>



Privacy and Confidentiality Notice

------------------------------------------------

The information contained in this E-Mail message is intended only for the person or persons to whom it is addressed.  Such information is confidential and privileged and no mistake in transmission is intended to waive or compromise such privilege.  If you have received it in error, please destroy it and notify us on the telephone number printed above.  If you do not receive complete and legible copies, please telephone us immediately. Any opinions expressed herein including attachments are those of the author only. i-documentsystems Ltd. does not accept responsibility for the accuracy or completeness of the information provided or for any changes to this Email, however made, after it was sent. (Please note that it is your responsibility to scan this message for viruses).


Re: Sun download code

Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2003-02-13 at 11:20, Brian Ewins wrote:
> The attached code can screenscrape the downloads for most of the 
> downloads from Sun for all the products listed below. The code is only 
> intended to do the screenscrape itself, things like unpacking the right 
> jar from the downloaded zip, moving it into maven's local repo, etc are 
> best left to jelly (similar to the stuff I posted previously).
> 

Awesome!

Geir will get back to me today and hopefully I'll get a contact at Sun
and we can come to some sort of agreement.

Possibly to get distribution rights for these JARs from the ibiblio
repository provided we do the click through thing.

Can you put the code on an URL somewhere?

-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society