import some.pkg; in the source, and that package does not exist locally, it we be looked up in the repository. If it is found, the jar file for the latest version is downloaded, and stored in a cache. Then everything happens as if that jar was on the classpath.
There will be an official repository at http://packages.sf.net/repository/, and it should probably be included at the end of nicec's classpath by default.
~/.nice-repository/ (~ being user.home). What about other platforms (windows)? Is user.home always a good place?
nice.versions in the current directory. It contains lines of the form some.pkg:version. This file should be commited to the source code repository (e.g. CVS) for the project, so that every developer uses the same version, and that upgrades are tracked.
Explicit upgrades should be possible, for instance by edition of the nice.versions file. In addition, there could be a tool that tries to automatically upgrade imported packages to their newest version. After getting the new versions, it would try a compilation then unit testing. If all goes well, then the nice.versions would be automatically updated.
nice.versions file in the entry for the package itself, and default to 0.0 if absent. The suffix would typically be a representation of the UTC date and time, so it grows over time. This allows several versions of a package to continue to evolve in parallel. Changes of the prefix could be done when an API or behaviour change needs to break backward compatibility, and automatic upgrades would not cross those version changes.
Once the jar is created, it needs to be uploaded to a repository. Version a.b.c for package foo.bar would be located at foo/bar/foo.bar-a.b.c.jar inside the repository. It can be =scp='ed manually there. A small publication program can automate this. The question is whether it's worth to include a Java implementation of ssh (jsch is 84K in jar format), or rely on ssh/scp being installed on the system.
Alternatively, it's probably a good idea to promote continuous builds of published packages. It's especially important when packages start to import each other: you need to make sure they can use the latest versions, otherwise it will become difficult to find compatible versions. We have CVS space on package.sf.net, so we could encourage people to put libraries there. This would open the possibility to have discussions for package names, to make sure there is some coherence. Then we can install a single continuous build script, which would be triggered by CVS commits, and rebuild everything that needs to, then publish the resulting packages if they work. This is where the date suffix in versions becomes particularly handy.
| Topic PackageRepository . { Edit | Attach | Ref-By | Printable | Diffs | r1.5 | > | r1.4 | > | r1.3 | More } |
|
Revision r1.5 - 23 Aug 2004 - 18:29 GMT - BrynKeller Parents: WebHome |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |