ant for embedding projects
ant for embedding projects
- Subject: ant for embedding projects
- From: Florijan Stamenkovic <email@hidden>
- Date: Sat, 02 Aug 2008 11:27:36 -0400
Hi all,
Not a question...
I've been playing around with modifying the ant described in:
http://wiki.objectstyle.org/confluence/display/WOL/Embedding
+WOFrameworks
Primarily I wanted to get rid of having to declare project
dependencies in build.xml files, coz that's just dirty. So, what I've
done was add this to the build.xml:
<!-- This is optional, it installs the framework projects, normally
into wolocalroot/Library/Frameworks -->
<target name="install.projects">
<subant target="install">
<dirset dir="${projects.root}">
<includesfile name="woproject/ant.frameworks.projects"/>
</dirset>
</subant>
</target>
<!-- in the build.woapp target -->
<frameworks root="${wo.wolocalroot}" embed="${embed.projects}">
<patternset>
<includesfile name="woproject/ant.frameworks.projects" />
</patternset>
</frameworks>
<!-- in the compile target -->
<frameworks root="${wo.wolocalroot}">
<patternset>
<includesfile name="woproject/ant.frameworks.projects" />
</patternset>
</frameworks>
The build, compileAndBuild and install targets add an
"install.projects" dependency, just after the init.xxx dependency.
Additionally two properties are required in the build.properties:
projects.root=../
embed.projects=true
And a file named ant.frameworks.projects in the wobuild folder, that
looks like this:
FrameworkName1
Library/Frameworks/FrameworkName1.framework
Framework2
Library/Frameworks/Framework2.framework
An ugly point is that each framework needs to be added twice to the
file, once just it's name, which will point to the project directory
in Eclipse's workspace in the subant, and once as Library/Frameworks/
xxx.framework, which is used in build.woapp and compile targets. If
anyone knows how filesets can be modified based on an includesfile
(for example the includesfile declares "Name", but we exrapolate
"Name.framework" from it, please let me know.
This (from my tests) seems to be working good, and one does not have
to modify the ant anymore when adding project dependencies, they just
need to be added to the ant.frameworks.projects file.
Also, one might want to add a target which will delete all the
installed frameworks from wolocalroot lib, to clean things up.
Hope this is interesting to someone,
F
_______________________________________________
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