Re: Two questions about latest build system
Re: Two questions about latest build system
- Subject: Re: Two questions about latest build system
- From: Chuck Hill <email@hidden>
- Date: Mon, 24 Nov 2008 12:03:26 -0800
On Nov 23, 2008, at 2:29 PM, Paul Hoadley wrote:
On 24/11/2008, at 8:12 AM, Mike Schrag wrote:
1. I have an application project that depends on a framework
project (actually, more than one). I'm back to using the
incremental build system for development, in which case it seems
like (after running Project > Clean... on everything) it's
sufficient to run Project > Build Project on the application.
Everything else builds, and the application runs. Using Ant to
create a WOA (or WAR) for deployment, though, I seem to need to
run the 'install' target on all the dependencies (and on any of
their dependencies, in the correct order).
Mike was grumbling about this a while ago. He may have something
up his sleeve....
I spent some unquality time with both Maven and Ivy recently and
I'm completely put off by both of them ... I am looking around at
several other options either for drop-in replacments or for
inspiration for a better solution (including the Ruby Gems system,
which seems to "just work" with not much pain, although it is not a
exactly solving the same problem as maven). I pretty steadfastly
maintain that build files are programs and for some reason all of
the Java answers to this problem are a combination of huge XML
files and Java plugin classes, which, IMO, are just a really lousy
way to manage this process. I'm far more intrigued by Ruby's
answers to some of these problems (rake, gems, etc), and buildr is
on my "to review" list as well). So I don't exactly have anything
up my sleeve (yet) but I'm definitely looking at the problem. I
refuse to believe that this problem has to has such a complicated
solution.
Thanks for the info. Don't get me wrong, the new build system is
_great_ even as it stands. I just wanted to make sure that there
wasn't something additional I was missing to completely automate
that last part.
2. This application also depends on two plain-Java JAR projects
in the same workspace. I've got those JARs listed under
"Referenced Libraries", but that doesn't seem to get them copied
into the deployment products. Copying the JARs into Libraries
does, obviously, but then I'll have to remember to update those
copies every time I change their source. Is there a better way
to reference JAR projects?
That I don't have an answer for.
The default build files are written to include all jars in the
Libraries folder for deployment. Having them in the eclipse build
path (currently) is not enough (though if the jars are inside your
project, there's no particular reason we COULDN'T do this in our
custom ant file, i think).
I'm not exactly catching what your problem is,
I can reduce it to this. I have:
1. SomeApplication which is a WebObjects Application project.
2. PlainJavaCode which is a Java JAR project. This has a source
tree rooted at src, and a .jardesc file that I use to build the JAR
when required.
It seems like I need to copy the JAR product from PlainJavaCode into
SomeApplication/Libraries. I thought this wasn't ideal because (a)
it's manual, and (b) I have to remember to do it every time I change
the code in PlainJavaCode. Admittedly, it's pretty stable code, but
I'd only have to forget to update the JAR once to make it a pain.
You could add an Ant builder to either project to call an Ant task to
make this copy. If it is only used in a few applications, I'd just
add it to PlainJavaCode and have it run after the other builders.
That way (a) it is not manual and (b) you don't have to
remember. :-) If it is used in a lot of places, you might want to
consider "pull" rather than "push", but that will slow down the each
build of the application which is not so nice either.
but it sounds to me like you're saying you have another project
that you deploy inside your app as a binary jar built from your
source. I usually recommend just making that a framework of its own.
I thought of that, but I figured it's just plain Java (utility-type)
code, and I might want to use it somewhere non-WO, and non-Mac. I
suppose there's nothing stopping me from making it a framework, and
producing the JAR from that if required for other projects. I may
have just answered my own question.
That is another good option.
Obviously Maven and friends address this problem, though your
mileage may vary.
Yeah, again I was just wondering if I had missed something simpler.
For this part, I think I did. I should convert the PlainJavaCode
project to a framework and just produce the standalone JAR if needed
for some other non-WO use.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden