You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Mark Strasser <ms...@mac.com> on 2001/07/04 18:26:36 UTC

Anyone working on ant tasks for Oracle 9i App Svr (formerly Orion)?

Is anyone working on a set of ejbtasks for starting/stopping/deploying to Oracle 9i App Server?  Specifically, this is the new J2EE model Oracle Containers for J2EE (oc4j), it's essentially Orion application server (even still named orion.jar!).

Just wanting to see if anyone has done this yet, otw I'll get cracking.

Also:

As a new ant developer, I was (am) confused by the use of dependencies and use of if/unless attributes to skirt (with much initial pain) around the issue of <if> tasks.  There are many simple things that I want to do in ant, for which I *don't* want to dynamically create a separate build file (for example loading a user's property file if it's there, for which I now have to create a separate task, possibly split up my current task into two sections, and so on).  Granted, I could be missing some better pattern of doing this, but it would make my life much simpler in the long run to have *simplistic* control tasks to just be able to load one property file or another based on a property file w/o the arduous creation of other tasks to do the same exact thing.

Yes, I write an "if" task myself.  But then I would have non-portable build scripts, wouldn't I?

Many regards,
Markus

Alternatives to task [was: Re: Anyone working on ant tasks for Oracle 9i App Svr (formerly Orion)?]

Posted by Craeg K Strong <cs...@arielpartners.com>.
Diane Holt wrote:

>Can't help you out with the Oracle stuff, but as to your "Also" -- I'm not
>against having an <if> task (or a more generalized <condition> task), but
>your example case doesn't really need one. A <property file=...> won't
>complain if the file doesn't exist, so if you want to allow for a user's
>properties file to set the values, or use default values if the user
>doesn't have a properties file, you can just specify both files -- eg:
>  <property file="user.properties"/>
>  <property file="default.properties"/>
>If user.properties exists and contains settings for properties that are
>also in default.properties, the values for those properties will be what
>they're set to in user.properties.
>
>...
>
>>  it would make my life much simpler in
>>the long run to have *simplistic* control tasks to just be able to load
>>one property file or another based on a property file w/o the arduous
>>creation of other tasks to do the same exact thing.
>>
If I understand the problem correctly, you are trying to load different 
sets of properties
each of which really represents (the settings to describe) a context.  A 
particular context might
represent some combination of type-of-release, which-customer, 
which-developer,
which-os-platform, etc.  

We have solved this problem by creating a task that loads properties 
from property
files based on the "path" concept.  You simply define a single property 
that indicates
the set of property files that correspond to your context.  The custom 
task reads this
property and loads in the appropriate property files.  By changing this 
single property,
you can dramatically alter build behavior.  This can be done in an 
"init" or "bootstrap"
target that all other targets depend on.

Some benefits of this approach:
- no mutable properties
- does not require templating
- only one new relatively simple task required

HTH,

--Craeg

-- 
Craeg K. Strong                               | www.arielpartners.com
Ariel Partners LLC		              | cstrong@arielpartners.com 
85 River Street, Ste. 3A                      | Fax:      (781) 647-9690
Waltham, MA 02453                             | Voice:    (781) 647-2425




Re: Anyone working on ant tasks for Oracle 9i App Svr (formerly Orion)?

Posted by Diane Holt <ho...@yahoo.com>.
Can't help you out with the Oracle stuff, but as to your "Also" -- I'm not
against having an <if> task (or a more generalized <condition> task), but
your example case doesn't really need one. A <property file=...> won't
complain if the file doesn't exist, so if you want to allow for a user's
properties file to set the values, or use default values if the user
doesn't have a properties file, you can just specify both files -- eg:
  <property file="user.properties"/>
  <property file="default.properties"/>
If user.properties exists and contains settings for properties that are
also in default.properties, the values for those properties will be what
they're set to in user.properties.

Diane

--- Mark Strasser <ms...@mac.com> wrote:
> Is anyone working on a set of ejbtasks for starting/stopping/deploying
> to Oracle 9i App Server?  Specifically, this is the new J2EE model
> Oracle Containers for J2EE (oc4j), it's essentially Orion application
> server (even still named orion.jar!).
> 
> Just wanting to see if anyone has done this yet, otw I'll get cracking.
> 
> Also:
> 
> As a new ant developer, I was (am) confused by the use of dependencies
> and use of if/unless attributes to skirt (with much initial pain) around
> the issue of <if> tasks.  There are many simple things that I want to do
> in ant, for which I *don't* want to dynamically create a separate build
> file (for example loading a user's property file if it's there, for
> which I now have to create a separate task, possibly split up my current
> task into two sections, and so on).  Granted, I could be missing some
> better pattern of doing this, but it would make my life much simpler in
> the long run to have *simplistic* control tasks to just be able to load
> one property file or another based on a property file w/o the arduous
> creation of other tasks to do the same exact thing.
> 
> Yes, I write an "if" task myself.  But then I would have non-portable
> build scripts, wouldn't I?
> 
> Many regards,
> Markus
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/