Hello !
does anbody know if there is a clean way (or standard rules ?) to avoid
implicit javac compilation for external java packages ?
for instance: class a in package A imports class b in pakckage B; if a
developer has changed smthg in a class b and does not recompile it
before compiling the package A, then the A jar file(s) will contain the
B classes as well, which contradicts J2EE ejb-refs in sources.
thanx.
seb.
--- Begin Message ---
Sebastien, Jerome
> pb Jerome and I had w/ our current packaging setup and javac:
>
> one javac side effect: when dependant sources srcs have changed (import
> statements) javac recompiles them.
> it is a pb in the current ant setup where jar files must only contain
> classes in the current directory otherwise this does not match the
> deployment info and deployment fails.
I've been looking in to this problem and I'd like an opinion on
some options for handling this.
> one thing would be to fail the compilation if the number of files output
> by javac is greater than the number of java files in the
> current dir. would help a lot avoiding pbs.
This is not acceptable. This throws away some very useful
features of the language (nested classes, etc).
> re-working the packaging should also help but not completely: still have
> dependencies from tl1 to ems, from gem to tl1 and so on that won't be
> removed.
I'm not sure what you mean by "re-working the packaging." If you
mean moving around artifacts in the pkgs directory, you're right.
This does not actually solve the problem.
Here are some options that I've come up with.
1: Require each jar file to be located in its own source tree.
If each jar file is in its own source tree, we can create
ant files that won't be able to locate source files belonging
to other jar files. This is actually my favorite so far, but
I have no idea what this does to JBuilder.
2: Package local build.xml files only compile (and generate source
if needed). Creation of jar files is handled at a top-level
build.xml file where the contents of _each_ jar file must be
called out.
Day-to-day development can still be done in a specific package
directory by making the package local ant file call back to the
top level ant file to create its jar file (actually, everything
after from the jar point on can be done this way).
We may end up with extra stuff in the classes directory, but
it would not end up in the jar file.
3: Punt and require the developer to pay attention. I'm betting
no-one would like this.
thanks
Tom Tschetter
--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]