07-21-2007 03:07 PM
09-16-2007 03:16 AM
Remove all .classpath issues in Eclipse for good
Make the source tree reflect the java package organization
Default: one jar per java package; build others as-needed.
All build output can be configured to go outside the source tree
Make Javadoc build better docs & overall indices w/o special tweaking
I.m.p.r.o.v.e build speed
Allow builds to occur directly from read-only source archive
This could be done by reorganizing the code within Ant so that all the java
code is in a single project. Essentially, I think this is just the next logical
step along a path begun when we got rid of recursive ant calls in our
build; we're letting javac do its job in sorting out dependencies rather
than hard-coding them ourselves (in 2 places). I dont' know how easy
or hard that is to do in Maven II compared to Ant.
Does somebody care to jump in here?
There are always funny corner-cases when it comes to building
non-trivial programs so I thought it might be nice to think about
it collectively. The one real technical issue I can see up-front with
this is the following:
Package org.alfreco.foobar has classes a, b, c, and d.
Classes a & b are in project ab, and go into ab.jar, while
classes c & d are in project cd, and go into cd.jar. Due
to some security/classloader/bundling reason, ab.jar and
cd.jar must reside in different locations.
There are probably a bunch of other issues I'm not considering at all, so
if you can think of anything big offhand, it would be nice to hear about.
My guess is that the pros strongly outweigh the cons, but that could
certainly change if someone thinks of a show-stopper.
09-16-2007 03:58 AM
The inter-project dependencies are a needless pain in the neck
for developers. It ends up forcing certain things to live in
places because of when they're built, rather than what would
be the ideal logical organization. In at few cases, it forces
us to do lazy-init within spring…etc. Cruft like this only gets worse
over time, so I'd like us to fix now while it's still relatively easy.
This is a developer's perspective, not a user's… but that matters too!
It's not just about the packaging. Structuring things so that one big
javac can see everything at once means perfect build dependencies
with 0 effort forever.
Otherwise we're right back to:class X needs to be built before Y, but it needs class P
which must be put in location Q but then that generates a circular
dependency that Ant can handle but Eclipse can't… unless you
sprinkle lazy inits here and there in various spring config files…
and then muck around with .classpath files used by the continuous
builds done by IDEs such as Eclipse… and… and….
Ugh. The picture I'm painting isn't that bad yet, but it's always there,
gnawing, gnawing, gnawing….
Regarding your concern about many jar files, you can actually
compose jars, so there can actually be *fewer* of them in the
final product regardless of the intermediate jars you choose to
create (or not). If we go the many-smaller-jars route in the
final product, then the way of handling compatability is via
a major/minor numbering scheme. Tried and true. The existence
proof: UNIX libs (kudos to Sun for getting it right).
Check out One-JAR:
http://www.ibm.com/developerworks/library/j-onejar/index.html?ca=drs-j4904
As far as I'm concerned, everything is on the table.> Make the source tree reflect the java package organizationIt depends on the underlying capabilities of that harness.
This is independent of the build harness correct?
For example, the way we're using Ant currently, source code
that belongs to the same package cannot live in the same directory,
due to build dependency issues. That's not a fundamental problem
with Ant, but rather with our current use of Ant. It's my understanding
that Maven II lets you do things at a higher level than Ant, but sometimes
that can mean loss of lower-level control.
For example, some tools force you to build things a certain way,
and if your goals and their model are badly matched, the tool gets
in the way). I'm not saying that's the case with Maven II,
but I don't know for sure that it's not either… yet.
Being able to build from a read-only source is great.
It adds a lot of flexibility to the system in terms of
permissions, media types, etc. It's also just cleaner
(e.g.: we'll be able to get rid of a lot of svn:ignore tags).
As for build speed, one javac is faster than n, and only ever builds
exactly what's out of date. When you have n projects, you've got
to be a lot more careful, and even then people tend to throw in a
"clean" operation because they get scared. As soon as you do that,
you're rebuilding way more than you really need to; if you fail to
do that when things are slightly wrong in the dependencies
(which is easy to do), then you waste time in a different way…
which is no fun either.
Essentially, as soon as you break things up into multiple projects,
you take ownership of hand-crafting dependencies rather than just
letting the compiler do its job. It's bad for exactly the same reasons
recursive make is bad.
How these compiled classes are *packaged* however, is a totally
orthogonal issue, so long as the build framework supports multiple
artifacts per project. In Maven I, that was an issue, but I don't
know what the deal is with Maven II. Some stuff needs to go
into server/lib while other stuff needs to be in common/lib,
so this actually is a hard requirement. I don't want to be forced
into a different project / javac invocation just because the build
framework thinks it knows better and refuses to generate multiple
artifacts in one project. If that's the case with Maven II, it's a
non-starter in my view.
Again, this isn't something we've had a chance to discuss a lot
internally, so I'm not summarizing a collectively held viewpoint,
nor am I even expressing misgivings regarding Maven II.
For all I know right now, I'd love it. That said, this is at least
part of the checklist I'll use when I get around to forming my
own opinion on the topic. I'm sure there will be other stuff
too, such as learning curve, interop with tools, how others
in the community & engineering feel about it all, and so forth.
Well, you asked for my opinion, and all you got was my meta-opinion!
I hope to do better than that soon.
Cheers,
-Jon
04-07-2008 02:37 PM
06-06-2012 04:24 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.