ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jayme Edwards" <an...@execpc.com>
Subject Re: What flavour of scripting?
Date Wed, 01 Mar 2000 01:45:31 GMT
Actually, you could use the xlink for this purpose. With X-link, you can
reference external elements whether they are in that file or not. e.g:

/build.xml

<project name="myProject"
    xlink:title="My Project"
    xlink:type="extended"
    xlink:role="project"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <target name="compileRemote"
        xlink:title="Compile Remote Source"
        xlink:type="locator"
        <!--this file would have <target as the docelem>
        xlink:href="somerelpath/somesubdir/somefile.xml"
        xlink:role="target"/>
    <target name="compileLocal">
        <javac ... etc/>
    </target>
</project>

/somerelpath/somesubdir/somefile.xml

<?xml version="1.0"?>

<target name="compileRemote">
    <javac ... etc/>
</target>

I'm using this in a project running on Tomcat right now with a stylesheet
that can replace the linked elements with the content and/or produce
hyperlinks to the target doc in HTML.

Jayme Edwards
Rockwell Software
Control Studio >>
[ http://www.openautomation.com/controlpak ]

----- Original Message -----
From: David Bullock
To: ant-dev@jakarta.apache.org
Sent: Monday, February 28, 2000 11:46 PM
Subject: Re: What flavour of scripting?


Perhaps jamming it all into one build configuration file is the issue.  XML
is a natural candidate for building a Dependency Markup Language.  But
building a software project is not all dependency management (hence the
'actions' concept of Ant).  The actions to take in response to dependency
triggers could probably be best specified in some kind of scripting
language.  (On the topic of "which scripting language?", JPython has a
natural mapping to Java OO programming, but it is still another language to
learn(!))
What about a build.dml file to specify the dependencies, and another file
(build.jp ?) to describe what to do about the dependencies.  I'm new to
unixland, and haven't ever made my own Makefile, but isn't the idea that you
specify the dependencies (if x.java has changed, then rebuild xyz.jar ...
not to mention the interdependencies between classes, packages etc.)?  The
current task metaphor of Ant seems to promote a more procedural, switching
kind of approach to building a project.  Which is probably not what we want.
Regards,
David.


PS
> In the theory that it is never too late, let's take the opportunity now to
> go back and answer Stefano's question.
I assume this question was along the lines of: What is the best way to add
logic/scripting to Ant?
Stefano's original question was:
----------------begin quote-------
ant is a great tool, but it's based on make design patterns. Read:
targets and tasks.
Now, in Cocoon, I would like to have a target executed if and only if a
particular condition is true.
This condition might well be:
 - a property set (example: do a snapshot or a release distribution)
 - the existance of a class in the classpath (example: a pluggable
module requires JNDI but the JNDI classes are not found)
 - time
 - operating system
Question: how do we do this?
Constrain: I need this done _soon_ in order to build the new Cocoon
distribution and I'm volunteering to write any required changes once we
agree on _how_ a feature like this should be done.
comments?
----------------end quote----------
--
David Bullock
Project Leader
dbullock@lisa.com.au

"It's no use saying 'We are doing our best.'  You
have got to succeed in doing what's necessary."
    ...Winston Churchill


LISAcorp
http://www.lisa.com.au/

Adelaide                  Sydney
--------------------      ------------------------
38 Greenhill Rd           Level 3, 228 Pitt Street
Wayville S.A. 5034        Sydney NSW 2000

PH  +61 8 8272 1555       PH  +61 2 9283 0877
FAX +61 8 8271 1199       FAX +61 2 9283 0866
--------------------      ------------------------



Mime
View raw message