:-(  oh man... did ya have to?

I don't really intend to have an english discussion on this, I would rather discuss in Java. I'm approximately 3-5 days away from having this done...

The code goes and grabs a version of a jar based on 4 XML descriptors (don't take these as gospel, they are changing as I go).

repository.xml - i.e. repository-name= "iBiblio Maven repository" - tells who the mirrors are, masters are and where directory.xml files can be found (iBiblio for instance might note the FTP and HTTP versions)
directory.xml - Tells what packages are there (i.e. packagename="jakarta-poi") and where their packagedirectory xml file is.
packagedir.xml (i.e. jakarta-poi-dir.xml) = what versions are on this server and where the jar descriptor is
jardescriptor.xml = similar to module.xml + url to the actual jar.


Eventually I'll have an alternative to the jardescriptor.xml which just lets you put it in the jar. I'll also allow you to have MYBigFatDistro.zip with the jardescriptor.xml inside it.

Installation will be handled via:
1. Copy the file and hand edit
2. Commandline tool
3. Wizard (if Nicola Ken is in the mood)

where is this? I have code to parse repository.xml and get directory.xml. I have code to parse directory.xml and get the packagedir.xml (jakarta-poi-dir) in this case.

I'm working on code which will parse packagedir.xml and grab the actual jardescriptor.xml (which will actually be named jakarta-poi-1.6-dev.xml or something).

Once that's done I'll code the grab of the actual jar file.

Goals:

1. Directory structure independance
2. Hierachial authority (support mirrors and "official distribution" points)
3. ease of administration. A admin should just type something like "installjar jarname.jar -repository path/to/repository.xml" in the case of a cooperative package.. Obviously for those who do not participate, they'll have to specify things like the version/etc.
4. Protocol independance
5. Ant/Maven/Centipede integration. I don't really need cooperation from Ant to do this for ant. I'll need cooperation from the other two projects to do it for them. though they might inherit it from ant... (ant and command line will be my focus)
6. support for mutlipe versioning schemes. I put explicit support for the X.x.y-zzz-n scheme and support others textually (though we won't support things like "grab latest minor version" or "grab latest release" if it isn't in this scheme)
7. depenency resolution.
8. Initial Simplicity


Examples of things I won't be resolving this week:

1. command line installation utilities (for respository administration)
2. local repository management / ant tasks / maven plugins
3. FTP/SSH/etc protocol handlers (http only for now)
4. DTD / namespaces (will be jardir: namespace probably next week or so)
5. Distribution / signed jar code.
6. bells and whistles (license policy / MD5 checks /etc)
7. mirror resolution /etc... 8. non-linear dependency resolution (meaning Avalon -> Cocoon, etc)
9. descriptor versioning (want to get at least something functional before I version things off)
In other words...this week is just for basics...


Its unlikely that I'll be the one doing #6. Thats why there are other people in the world.

Method

Test-first.  (of course)

I'm not particularly open to english based feedback at this stage. Once I get my initial code which goes and grabs the jar (at least) then maybe. I'd prefer feedback in java/diff -u format.

If repository@ or ruper or whomever is interested in this code or working with me...fine. It will be most useful if widely adopted, but I guess what I'm trying to say is that I don't have time to fight or argue about it.

Now you know my secret project.

-Andy

Nick Chalko wrote:

I'll start the discussion with what John Toohey said.

In both html and xml format

   * list of available versions,
   * their MD5's,
   * dependencies,
   * perhpas a code for licenses



<jardir:repository>
  <jardir:repository-name>andy-local</jardir:repository-name>
  <jardir:repository-prettyname>
        Andy's Local Repository
  </jardir:repository-prettyname>
  <jardir:servername>localhost</jardir:servername>
  <jardir:serverport>8080</jardir:serverport>
  <jardir:class>primary</jardir:class> <!-- primary, mirror, vendor -->
  <jardir:directory-url>http://localhost:8080/directory.xml</jardir:directory-url>
<!-- if mirror:
  <jardir:master>http://path.to.repository.xml</jardir:master>
-->
<!-- optional
  <jardir:license-policy>
   <jardir:exclusive></jardir:exclusive> ONLY these licenses are allowed
   <jardir:disallow></jardir:disallow>   All licenses are allowed except..
  </jardir:license-policy>
-->
<!-- optional
  <jardir:mirrors>
   <jardir:mirror>
       <jardir:mirror-url>
         http://localhost:8081/repository.xml
       </jardir:mirror-url>
       <jardir:countries>
         <jardir:country>us</jardir:country>
         <jardir:country>ca</jardir:country>
       </jardir:countries>
   </jardir:mirror>
   <jardir:mirror>...</jardir:mirror>
  </jardir:mirrors>
-->
</jardir:repository>
<jardir:packagedir>
   <jardir:versions>
     <jardir:version>
       <jardir:major>1</jardir:major>
       <jardir:minor>9</jardir:minor>
       <jardir:trivial>0</jardir:trivial>
       <jardir:type>dev</jardir:type>
       <!-- <jardir:level>1</jardir:level> optional -->
       <!-- <jardir:alternate>1.9-alpha-1</jardir:alternate> optional -->
       <jardir:jar-urls>
          <jardir:jar-url>
             http://localhost:8080/jakarta-poi-1.9.xml
          </jardir:jar-url>
  <!-- example
          <jardir:jar-url>
             http://localhost:8081/jakarta-poi/1.9.xml
          </jardir:jar-url>
  --> 
       </jardir:jar-urls>
     </jardir:version>
<!-- example
     <jardir:version>
       <jardir:major>1</jardir:major>
       <jardir:minor>9</jardir:minor>
       <jardir:trivial>0</jardir:trivial>
       <jardir:type>dev</jardir:type>
       <jardir:jar-urls>
          <jardir:jar-url>
             http://localhost:8080/jakarta-poi-1.9.xml
          </jardir:jar-url>
       </jardir:jar-urls>
     </jardir:version>
-->
   </jardir:versions>
</jardir:packagedir>
<jardir:jar>
 <jardir:jardir-version>1.0</jardir:jardir-version>
 <jardir:package>
  <jardir:jarname>jakarta-poi-1.9-dev.jar</jarname>
  <jardir:package-name>jakarta-poi</jardir:package-name>
  <jardir:vendor>apache</jardir:vendor>
  <jardir:vendor-prettyname>
       Apache Software Foundation
  </jardir:vendor-prettyname>
  <jardir:license>
    <jardir:license-name>ASL</jardir:license-name>
    <jardir:license-version>1.1</jardir:license-version>
  </jardir:license>
  <jardir:prettyname>Apache Jakarta POI</jardir:prettyname>
  <jardir:description>
      Apache Jakarta POI project provides a pure Java implementation of the 
      OLE 2 Compound Document Format (read/write).  It also provides pure
      Java implementations of Excel (read/write), Word (early read capability),
      and OLE2CDF Property sets.  
  </jardir:description>
  <jardir:site>http://jakarta.apache.org/poi</jardir:site>
  <jardir:authorative-repository>
         http://jakarta.apache.org/builds/jakarta-poi/repository.xml
  </jardir:authorative-repository>
  <jardir:version>
    <jardir:major>1</jardir:major>
    <jardir:minor>9</jardir:minor>
    <jardir:trivial>0</jardir:trivial>
    <jardir:type>dev</jardir:type>
    <!-- <jardir:level>1</jardir:level> optional -->
    <!-- <jardir:alternate>1.9-alpha-1</jardir:alternate> optional -->
  </jardir:version>
<!-- optional
  <jardir:compatible-versions>
     <!-- embed a verson set -->
  </jardir:compatible-versions>
-->
  <jardir:depends> <!-- depends is optional -->
   <jardir:required> <!-- if depends then you must have required or --> 
     <jardir:packages> <!-- optional, you can have both but do not need both -->
       <jardir:package>
         <jardir:package-name>xerces</jardir:package-name>
         <jardir:vendor>apache</jardir:vendor> <!-- optional -->
         <jardir:license>
            <jardir:license-name>ASL</jardir:license-name>
            <jardir:license-version>1.1</jardir:license-version>
         </jardir:license>
         <jardir:versions>
           <jardir:version>
             <jardir:major>1</jardir:major>
             <jardir:minor>0</jardir:minor>
             <jardir:trivial>0</jardir:trivial>
             <jardir:type>dev</jardir:type>
             <!-- <jardir:level>1</jardir:level> optional -->
             <!-- <jardir:alternate>1.9-alpha-1</jardir:alternate> optional -->
           </jardir:version>
         <jardir:versions>
       </jardir:package> 
     </jardir:packages>
   </jardir:required>
<!--   
   <jardir:optional>
     <jardir:packages>
         ... would have the same stuff as required
     </jardir:packages>
   </jardir:optional> 
 -->
  </jardir:depends>
 </jardir:package>
</jardir:jar>
<jardir:directory>
  <jardir:repository-name>andy-local</jardir:repository-name>
  <jardir:repository-url>
      http://localhost:8080/repository.xml
  </jardir:repository-url>
  <jardir:packages>
    <jardir:package>
      <jardir:package-name>jakarta-poi</jardir:package-name>
      <jardir:package-dir>
          http://localhost:8080/jakarta-poi-dir.xml
      </jardir:package-dir>
    </jardir:package>
  </jardir:packages>
</jardir:directory>

Reply via email to