xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane_Curc...@lotus.com
Subject [PROPOSAL-strawman] xml-commons source usage in other projects
Date Wed, 24 Oct 2001 20:31:32 GMT
This is still a little rough, but I was hoping it would make sense to
someone else who might help start making the appropriate Ant code to do
it...  8-)

As a first step towards using xml-commons sources in other xml.apache.org
projects, here's a proposal that optionally uses the sources from
xml-commons in your builds.  Xalan and Crimson have already implemented
somewhat similar schemes but I'd like to go a step further.

Steps to do this might be like (for each project):
- Remove all DOM/SAX/JAXP code from the project's CVS tree
- Checkin a current copy of the xml-commons DOM/SAX/JAXP code into
/project-name/src/external/* directories (yes, this is kind of moving
sources in your repository)
- Modify your build.xml to have a 'copy-commons-src' target between your
init/prepare and compile targets, that works something like:

- Checks a ${use-commons-src} flag that developers or projects can default
to force useage of commons copies or local copies of files.  (This is for
projects that want to explicitly work one way or the other by default)

- Checks if an xml-commons/java/external/build.xml file exists: if so, then
copy the xml-commons copies to project-name/src directory
- If not, and there's a local src/external directory, then copies it to
project-name/src directory
- If the local src/external copy isn't there, then do nothing
Note that each of the copies should use the Ant uptodate functionality to
avoid copying unchanged files; xalan doesn't do this yet.

- your compile target works as normal, compiling stuff from /src into your
build area and .jars

- your distro target then copies the /src tree into the distro, excluding
the src/external directory.

This way, developers who work from checked out copies of xml-blah
repositories can choose to also checkout the always-up-to-date xml-commons
tree as well if they want.  If they don't, they can still work normally
although they might be using the (potentially) older copies in their local
src/external directory.

Users who download distros never know the difference; they will always be
compiling against the copy that was shipped with that distro.

Two other related notes:
-- Yes, a more rigorous solution would ensure that the xml-commons sources
were somehow regularly synced to the various projects, but that sounds like
more work, and not all projects might always want the latest copies.

-- commons-dev folk should sometime soon discuss simply creating a tag and
a release as a convenience for those who might simply want to pickup a
known version of an xml-apis.jar  We should think about taking updated SAX
code first tho.

- Shane


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message