You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jon Stevens <jo...@latchkey.com> on 2000/11/28 05:19:57 UTC

Re: [PROPOSAL] jar distribution system

I have placed the start of cjan.xml up on the jakarta.apache.org site

<http://jakarta.apache.org/cjan/cjan.xml>

It of course isn't complete or final in any way, but it is a start. Now,
someone want to speak up and start to write an Ant Task to deal with it?

I will get you access to the box if you don't already have it and you can
edit the cjan.xml file and put files up in the cjan/files directory.

It is up to all of you to help make this a reality. I'm not going to be the
only one doing all this work.

thanks,

-jon

-- 
twice of not very much is still a lot more than not very much


Re: [PROPOSAL] jar distribution system

Posted by Stefan Bodewig <bo...@apache.org>.
Conor MacNeill <co...@m64.com> wrote:

> I don't think the "available" approach is going to work. It relies
> on the classes being in the classpath, but version conflict is one
> of the problems cjan seeks to address. I think it is going to need a
> repository in which it tracks information about what products and
> (potentially conflicting) versions have been installed.

Well, the "available" approach could use a custom classloader that
contains those jars.

I'm still not sure that having a repository will work out that well,
you'd need two repositories at least, one for things installed for the
whole system and one for the things a user has installed in his/her
private workspace. I'm less concerned with companies - here the system
administrators should be willing to install everything the developers
need - but with universities and similiar organizations.

And then you'd need a way to tell CJAN to add something to the
repository that has allready been there before CJAN came into the
game.

> 1. To what type of user is cjan aimed? Is it 
> a) the CVS developer, 
> b) the source distribution user, 
> c) the binary distribution user

guess it's all of them - unless you want to end up holding required
JARs within CVS or ship them with distributions.

> 2. How pervasive/invasive should cjan become? Can it be a
> requirement for a product to launch?

Too launch or to build? I think Jose Alberto's distinction is
important. But I can imagine you'd require it for both, just not from
the start, let CJAN grow.

> 3. What are the goals - simple automated downloads of support jars
> for a single product - no attempt to worry about managing the
> mismatch of versions across a system. Or should it be a package
> management system which reports, or even tries to resolve, version
> conflicts?

My take would be: all of them, one after the other.

Stefan

RE: [PROPOSAL] jar distribution system

Posted by Conor MacNeill <co...@m64.com>.
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: Thursday, 30 November 2000 21:47
> To: ant-dev@jakarta.apache.org
> Subject: Re: [PROPOSAL] jar distribution system
>
>
> Jon Stevens <jo...@latchkey.com> wrote:
>
> > I have placed the start of cjan.xml up on the jakarta.apache.org
> > site
> >
> > <http://jakarta.apache.org/cjan/cjan.xml>
> >
>
> Just a quick thought:
>
> CJAN (the client side application) needs some way to know whether a
> given dependency is fulfilled on the local system or not. I see two
> options here:
>
> (1) keep track on all JARs that have ever been loaded and installed in
> a CJAN registry.
>
> This forces the user to install every component which might be
> available to CJAN through CJAN - I don't think you can expect this on
> a multi user system, even for single use boxes this seems too strong
> therefore I'd prefer
>

I wonder how extensive this cjan system might be. Should it be a system
for simply downloading the support jars needed for a particular product.
That doesn't really manage the problem, though. Where does it put these
jars? How does it "connect" the product in question to the jars. Can
this be standardized or is it the user's responsibility?

If I think beyond simply downloading the support jars to some form of
package/product management, I think it needs to become more "invasive".
Consider the problem of trying to have Tomcat 4.0 and Ant on a system
(This is just an example). One requires Jaxp 1.0 and the other Jaxp 1.1.
(I have run into some problems using ant with Jaxp1.1 - sealing
exception - whatever that is). The approach to this sort of problem
today is to have a whole load of *HOME environment variables which
"locate" the approriate jars. The build scripts then copy the
approrpiate jars into the lib area where the product's launcher script
dynamically builds the appropriate classpath.

A simplistic approach would be to standardize this system of lib
directories across products and have cjan copy the necessary support
jars into the product's lib directory. A central repository on the local
system of product jars would need to be used, I guess.

Such a simplistic approach seems rather poor, however. Why duplicate
support jars in each product's lib directory? I can concieve of a cjan
product-launcher which would manage a product's classpath. Some form of
classloader which dynamically constructs the classpath using the
installed jars that satisfy the correct product dependencies, and then
launches the Main class? Is that going to be feasible?

I don't think the "available" approach is going to work. It relies on
the classes being in the classpath, but version conflict is one of the
problems cjan seeks to address. I think it is going to need a repository
in which it tracks information about what products and (potentially
conflicting) versions have been installed.

I have some questions which I think it may be interesting to think
about.

1. To what type of user is cjan aimed? Is it a) the CVS developer, b)
the source distribution user, c) the binary distribution user or some
combination of these. I think it make a difference in terms of what we
want cjan to do and what we include in distributions?

2. How pervasive/invasive should cjan become? Can it be a requirement
for a product to launch?

3. What are the goals - simple automated downloads of support jars for a
single product - no attempt to worry about managing the mismatch of
versions across a system. Or should it be a package management system
which reports, or even tries to resolve, version conflicts?

Maybe I am "overthinking" the whole issue - thoughts?

Conor



Re: [PROPOSAL] jar distribution system

Posted by Stefan Bodewig <bo...@apache.org>.
Jon Stevens <jo...@latchkey.com> wrote:

> I have placed the start of cjan.xml up on the jakarta.apache.org
> site
> 
> <http://jakarta.apache.org/cjan/cjan.xml>
> 

Just a quick thought:

CJAN (the client side application) needs some way to know whether a
given dependency is fulfilled on the local system or not. I see two
options here:

(1) keep track on all JARs that have ever been loaded and installed in
a CJAN registry. 

This forces the user to install every component which might be
available to CJAN through CJAN - I don't think you can expect this on
a multi user system, even for single use boxes this seems too strong
therefore I'd prefer

(2) Add some <available> like functionality. The section describing a
product as well as a service (I like Conor's concept) should hold
something like

<product name="Ant" permissionToDistribute="true">
  <version label="1.2" latest="true">
    <provides classname="org.apache.tools.ant.types.FileSet" />
    <depends service="jaxp" version="1.0" required="true"/>
    ...
  </version>
  <version label="1.1" latest="false">
    <provides classname="org.apache.tools.ant.Main" />
    ...
  </version>
</product>

<service name="jaxp">
  <version label="1.0" latest="false">
    <provides classname="javax.xml.parsers.SAXParserFactory" />
    <provider name="xerces" version="1.2"/>
    <provider name="jaxp_reference" version="1.0"/>
  </version>
</service>

Stefan