[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

specify "." (current dir) as working dir via "-d" in modules?

From: Jeff
Subject: specify "." (current dir) as working dir via "-d" in modules?
Date: Wed, 10 Mar 2004 00:29:54 -0500

Is there any way to set up a module so that it will be checked out into the
current directory rather than a subdirectory of it?

For example, suppose a repository contains the following three projects -- 
"src", "fooweb", and "barweb":

"src" --

"fooweb" --

"barweb" --

suppose further that my ultimate goal is to aggregate one of the two
webmodule projects with the "com" and "org" sub-projects of "src" using
ampersand modules to make Netbeans happy and put WEB-INF in what Netbeans
believes to be the rootdir of a mounted filesystem (it won't recognize it
any other way), and put "com" and "org" in WEB-INF/classes (to keep
Netbeans' web module autodeployment from breaking).

In an ideal universe, the following additions to the "modules" file would to
the trick nicely:

_com -d ./WEB-INF/classes/com src/com
_org -d ./WEB-INF/classes/org src/org
_fooweb -d . fooweb

foonetbeanswebapp &_fooweb &_com &_org

then, from the command prompt:

cd c:\cvs
cvs co foonetbeanswebapp

which would create the following files:
... as well as CVS' own workfiles, of course.

The problem is, it doesn't work. Attempting to run "cvs co
foonetbeanswebapp" produces the following error message:

cvs checkout: existing repository c:\cvs/CVSROOT/Emptydir does not match
cvs checkout: ignoring module _fooweb

Ironically, the _com and _org aliases DO work... and both end up exactly where I want them. It looks like "-d"
doesn't mind "." unless it's sitting there by itself.

Is there any way to make this work? By hacking another one of the files in
CVSROOT or creating a dummy/decoy directory named Emptydir somewhere,
perhaps? By using a special directory name like ROOT (the way Tomcat does)?
By doing it under cygwin so there won't be an issue with forward slashes vs
backward slashes?

I wish it were possible to just let the fooweb module check out into
c:/cvs/foonetbeanswebapp/fooweb... but unfortunately, there's just no good
way to do it. Netbeans won't recognize a web module anywhere besides the
rootdir of a mounted CVS filesystem, and putting the class sourcefiles
anywhere besides WEB-INF/classes breaks Netbeans' whole automated
webapp-deployment subsystem (it's a long-standing design shortcoming of
Netbeans that's apparently scheduled to be fixed by the end of 2004). So
trying to find some way to forcibly merge classfiles from one or more
projects with a web module that itself is another project via ampersand
modules has kind of been a holy quest of mine for the past 3 years or so
[something I work on for a few days whenever I'm about to start a new major
project, seem to come within minutes of solving, then wind up back at square
one again, bashing my head against the wall in rage before giving up and
just dumping the whole web module into a single CVS project for lack of a
better alternative ].

If my idea STILL won't work due to deeper issues with CVS, might it be
somehow possible to hack things further using symlinks (or NTFS junctions)?
Say, checking out "fooweb" into c:\cvs\fooweb, "src/com" into c:\cvs\com,
and "src/org" into c:\cvs\org, then creating NTFS junctions so the imaginary
directory c:\fooweb\WEB-INF\classes\com will point to c:\cvs\com and the
imaginary directory c:\fooweb\WEB-INF\classes\org will point to c:\cvs\org?
Or will CVS crash and burn (or just ignore the change) if I do something
like edit then do a cvs commit from c:\cvs\fooweb (because of
some subtle rule or architectural limit of CVS?)

Thanks :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]