Re: WO Framework build ant woes
Re: WO Framework build ant woes
- Subject: Re: WO Framework build ant woes
- From: Chuck Hill <email@hidden>
- Date: Thu, 10 Jul 2008 11:06:43 -0700
On Jul 10, 2008, at 8:31 AM, Florijan Stamenkovic wrote:
Hi all,
I am building a framework (pure WO, no wonder), and trying to get
the projects that depend on it to bundle it, as described in the
"Embedding WOFrameworks" wiki entry.
So, a few questions, about the framework project:
1. The "build" target does not depend on the "compile" target, so,
does the standard build depend on Eclipse's incremental compiling?
Yes, I think so. I always add my own compile task:
2. If the above is true, what exactly is the purpose of the
"compile" target, what does WOCompile do differently?
It should do the same thing, but from the command line.
3. The "compile" target in the framework failed because I didn't
have the Frameworks folder in my users's Library. After creating the
Frameworks folder, which I guessed to be the quickest solution, the
<wocompile srcdir="Sources" destdir="bin"> task failed with a
NullPointerException. Any suggestions?
I use this:
<!-- Distribution WOProject compilation -->
<target name="compile" depends="setProps">
<wocompile destdir="bin"
debug="${wocompile.debug.flag}"
optimize="${wocompile.optimize.flag}"
deprecation="on">
<src refid="${project.source.path}"/>
<classpath refid="project.classpath"/>
</wocompile>
</target>
Plus some steps to set up <src refid="${project.source.path}"/> and
<classpath refid="project.classpath"/>
4. Can I modify the "compileAndBuild" so that it works like the
"build" (ditch "compile"), in short, why should I use
"compileAndBuild" when using the ant from another project ant
(embedding the framework)? I guess that is kind of the same as the
question nr. 2.
Embedding does not use the Ant form another project (AFAIK).
Also, another question regarding the embedding process described on
the wiki... It uses a third "project" to do all the bundling and
stuff. I'm trying to avoid that by modifying the ant build of the
app project directly. I use ant occasionally, but am far from an
expert, can anyone tell me if I am doing something very evil? What I
do is this:
In the init.build target:
<!-- Framework build -->
<ant dir="../Framework" antfile="build.xml"
target="compileAndBuild"></ant>
In the build.woapp target:
<!-- Framework inclusion -->
<frameworks root="../Framework/dist" embed="true">
<include name="*.framework"/>
</frameworks>
In the compile target, under classpath:
<!-- Framework stuff-->
<fileset dir="../Framework/dist">
<include name="**/*.jar" />
</fileset>
I don't handle it there as I am usually building multiple application
for packaging and deployment. I don't see anything evil with the
approach.
Also, what do you think of making the embedding process a part of
the standard builds? I guess that two properties (one containing the
framework project names to embed, and a flag indicating if they
should be embedded) could be used to do what I do above, but without
referencing the framework names in the ant itself, only in the
props... Uhm, would that be even possible?
I'd wait until Mike finishes his classpath changes before doing any
work on this. Things may change greatly.
Chuck
--
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