You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Craig Kelley <ck...@HotPOP.com> on 2000/12/05 19:08:33 UTC

[submit] optional task for Poet ptjavac compiler/enhancer

Attached is an optional task that is a subclass (with too much cut and
paste ;-) of the Javac task to run the Poet ptjavac external compiler to
compile Java code and enhance it for use with the Poet object oriented
database (OODB).

To use the task you must have Poet (of course) with the appropriate Poet
jars included in your classpath, and the ptjavac compiler executable in
your path. Since ptjavac actually uses the Sun compiler classes in some
way, you also have to have the appropriate JDK jars in your classpath.

The usage is pretty much like the Sun javac compiler with a couple of
extra arguments to tell Poet where its configuration file is and what to
do with the schema.

-- Craig


Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Peter Donald <do...@apache.org>.
At 11:41  5/12/00 -0800, Jon Stevens wrote:
>on 12/5/2000 10:08 AM, "Craig Kelley" <ck...@HotPOP.com> wrote:
>
>> Attached is an optional task that is a subclass (with too much cut and
>> paste ;-) of the Javac task to run the Poet ptjavac external compiler to
>> compile Java code and enhance it for use with the Poet object oriented
>> database (OODB).
>> 
>> To use the task you must have Poet (of course) with the appropriate Poet
>> jars included in your classpath, and the ptjavac compiler executable in
>> your path. Since ptjavac actually uses the Sun compiler classes in some
>> way, you also have to have the appropriate JDK jars in your classpath.
>> 
>> The usage is pretty much like the Sun javac compiler with a couple of
>> extra arguments to tell Poet where its configuration file is and what to
>> do with the schema.
>> 
>> -- Craig
>
>I have a question: 
>
>Why are people submitting every task under the Sun to be included with Ant?
>What is wrong with simply including your Poet task with Poet and leaving it
>at that?

Initially it was because Ant 1.1 didn't play nice and was slightly painful
to load other tasks. It was kept up so as not to change policy till Ant2
thou. I think in Ant2 there will only be a smallish set of core tasks and
the rest will mainly be provided in appropriate place. ie junit will be got
in junit.jar etc.


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Peter Donald <do...@apache.org>.
At 12:48  6/12/00 -0800, James Duncan Davidson wrote:
>> Ant has become that successful that people are going wild and add
>> tasks for everything. This is great.
>
>It is great. However, there are two bad influences at work here -- 1)
>Everybody has a neat way to further extend the relatively simple yet power
>concept of mapping the XML data files into tasks and 2) people see this
>simple thing as something that can be further abstracted out into something
>more. As to the first, XML is just a data format for Ant -- it's not
>supposed to be core to Ant -- in fact, the first 2 versions of Ant which
>predated release to Apache ran on properties. To the second -- if there are
>ideas that people want to leverage in other ways, great -- but I really
>don't want to see Ant morph into the be-all/end-all. The pursuit of this
>kind of thing is what Stefano and others have called at various times the
>"Flexibility Syndrome" -- too much flexibility will *kill* your codebase,
>even if it is "cool".

"Flexibility Syndrome" is not about the number of tasks that exists but it
is introducing "joints" where they are not useful. Perl and make are prime
examples of this - Perl developers generally have a motto "If you can't do
it 15 different ways then your language is lacking ;)". If you seperate
each different concern and apply the 80/20 rule and do not add overlapping
features then you can generally avoide the problem. There are some cases
where this is not the case ... thou these are extremely rare (and I don't
think Ant falls into that hole).

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


RE: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Erik Meade <em...@objectmentor.com>.
> Once Ant2 is there, I'd expect it to include a bare minimum of tasks,
> my vote would go for "if you don't need it to build an Ant
> distribution, it's not core".
> 
> Stefan

Not that my vote counts but, plus one

Erik Meade


Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by James Duncan Davidson <du...@x180.net>.
On 12/6/00 1:16 AM, "Stefan Bodewig" <bo...@apache.org> wrote:

>> It was never intended that all tasks end up in Ant core.
> 
> We agree on that - I'm sure that you know that, just wanted to clarify
> that once again.
> 
> My point was that currently you don't have too many choices if you
> want to distribute a task that is useful for many people.

Yep yep. No argument there.. I was just painting a bit of history for folks
that might not have context. Intent of course does not match reality. :)

>>> Not sure whether POET would care about their developers that want
>>> to use Ant for example - but if one of them steps up and offers an
>>> open source solution to his fellow developers I won't be the one to
>>> reject him.
>> 
>> It's not core though. It shouldn't be.
> 
> What is "not core" in Ant 1.2, in Ant 1.3? Everything that's in
> ...taskdefs/optional, everything that is not in src/main or everything
> that is not in Ant's repository.
> 
> If the answer should not be the first one, we'll end up in discussing
> which of the already present tasks should be core and which should be
> not. Do we really need this right now, when we know the problem will
> be solved in Ant2?

No.. I was simply stating an opinion. Frankly, I don't really care what we
do with 1.2/3 along these lines because it will be taken care of in a
different way with Ant 2.x.

>> It is great. However, there are two bad influences at work here --
>> 1) Everybody has a neat way to further extend the relatively simple
>> yet power concept of mapping the XML data files into tasks and
> 
> How so? Either I haven't seen this or I don't understand it.

You might not have seen it. I'm aware of at least a few efforts that people
have made generalizing the reflection mechanism. Such generalizations are
neat, but after a certain point, they are more academic than useful.
Especially when it means talking about yet another module of indirection and
dependency.

>> 2) people see this simple thing as something that can be further
>> abstracted out into something more.
> 
> If we have a clear separation of Ant's core classes and the frontend,
> it should be quite easy to build several types of "something more" on
> top of Ant - but I sure wouldn't want to put all these additional
> things into Ant. Having a clear separation between Ant's business
> logic and the frontend is another thing we already have agreed upon
> for Ant2.

No argument on principles here.

.duncan

-- 
James Duncan Davidson                                        duncan@x180.net
                                                                  !try; do()


Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Stefan Bodewig <bo...@apache.org>.
James Duncan Davidson <du...@x180.net> wrote:

> On 12/6/00 12:30 AM, "Stefan Bodewig" <bo...@apache.org> wrote:
> 
>> Jon Stevens <jo...@latchkey.com> wrote:
>> 
>>> Why are people submitting every task under the Sun to be included
>>> with Ant?
>>
>> Because they want to use every tool under the sun with Ant and they
>> don't have any influence on their tool developers.
> 
> It was never intended that all tasks end up in Ant core.

We agree on that - I'm sure that you know that, just wanted to clarify
that once again.

My point was that currently you don't have too many choices if you
want to distribute a task that is useful for many people.

> AntEater allows for taskpaths to be set up to further enable
> this... 

As I said later in my mail, Ant2 will be a totally different issue, be
it AntEater or something different - the mechanism of easy tasklibrary
deployment is something we have agreed upon long ago, we are just
hashing out the details right now.

>> Not sure whether POET would care about their developers that want
>> to use Ant for example - but if one of them steps up and offers an
>> open source solution to his fellow developers I won't be the one to
>> reject him.
> 
> It's not core though. It shouldn't be.

What is "not core" in Ant 1.2, in Ant 1.3? Everything that's in
...taskdefs/optional, everything that is not in src/main or everything
that is not in Ant's repository.

If the answer should not be the first one, we'll end up in discussing
which of the already present tasks should be core and which should be
not. Do we really need this right now, when we know the problem will
be solved in Ant2?

>> Ant has become that successful that people are going wild and add
>> tasks for everything. This is great.
> 
> It is great. However, there are two bad influences at work here --
> 1) Everybody has a neat way to further extend the relatively simple
> yet power concept of mapping the XML data files into tasks and

How so? Either I haven't seen this or I don't understand it.

> 2) people see this simple thing as something that can be further
> abstracted out into something more.

If we have a clear separation of Ant's core classes and the frontend,
it should be quite easy to build several types of "something more" on
top of Ant - but I sure wouldn't want to put all these additional
things into Ant. Having a clear separation between Ant's business
logic and the frontend is another thing we already have agreed upon
for Ant2.

Stefan

Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by James Duncan Davidson <du...@x180.net>.
On 12/6/00 12:30 AM, "Stefan Bodewig" <bo...@apache.org> wrote:

> Jon Stevens <jo...@latchkey.com> wrote:
> 
>> Why are people submitting every task under the Sun to be included
>> with Ant?
>
> Because they want to use every tool under the sun with Ant and they
> don't have any influence on their tool developers.

It was never intended that all tasks end up in Ant core. That's what the
whole bit about taskdefs were supposed to do -- make it easy for somebody to
provide tasks from their own site or in a contrib. Of course that thought
wasn't finished in Ant 1.0 -- and never made it.

AntEater allows for taskpaths to be set up to further enable this... The way
it is right now forces all tasks to be in their own jars, but this is
temporary and a way to define tasks also just in your classpath will go in.
The goal with this is smaller, simpler...

> Not sure whether POET would care about their developers that want to
> use Ant for example - but if one of them steps up and offers an open
> source solution to his fellow developers I won't be the one to reject
> him.

It's not core though. It shouldn't be.

>> I just don't get it. Why are we bloating Ant like this?
> 
> This is an intermediate step.
> 
> Ant has become that successful that people are going wild and add
> tasks for everything. This is great.

It is great. However, there are two bad influences at work here -- 1)
Everybody has a neat way to further extend the relatively simple yet power
concept of mapping the XML data files into tasks and 2) people see this
simple thing as something that can be further abstracted out into something
more. As to the first, XML is just a data format for Ant -- it's not
supposed to be core to Ant -- in fact, the first 2 versions of Ant which
predated release to Apache ran on properties. To the second -- if there are
ideas that people want to leverage in other ways, great -- but I really
don't want to see Ant morph into the be-all/end-all. The pursuit of this
kind of thing is what Stefano and others have called at various times the
"Flexibility Syndrome" -- too much flexibility will *kill* your codebase,
even if it is "cool".

Yes, it's clear that somethings are needed. Scripting for example. Allowing
a task to execute scripting is important -- and that's why AntEater as it
stands has a simple clear object model that should be easily reflected into
scripts and modified by them. Yet, there's no special support for scripts in
the core. That's the way it should be.

> Until then I have no problem with including these tasks (and bloating
> Ant if you want to call it that) .

Contrib. Provide build files to build them for people that want them.

-- 
James Duncan Davidson                                        duncan@x180.net
                                                                  !try; do()


Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Stefan Bodewig <bo...@apache.org>.
Jon Stevens <jo...@latchkey.com> wrote:

> Why are people submitting every task under the Sun to be included
> with Ant?

Because they want to use every tool under the sun with Ant and they
don't have any influence on their tool developers. 

Not sure whether POET would care about their developers that want to
use Ant for example - but if one of them steps up and offers an open
source solution to his fellow developers I won't be the one to reject
him.

> I just don't get it. Why are we bloating Ant like this?

This is an intermediate step.

Ant has become that successful that people are going wild and add
tasks for everything. This is great. 

If they are involved in an open source project and their tasks are
tightly coupled to that project they can easily include these tasks in
the given project - that's what you do and that's what the jBoss
people do for example.

Then there are task for third party tools that barely ship as a
project at all - including tasks there would be rather difficult. For
example I have two tasks for JLex and CUP cooking on my box - JLex's
distribution consists of a single source file.

Ant's current architecture is not well suited for adding a bunch of
tasks you need with all your projects - that's what we've realized
months ago and that's what we want to change with the Ant2
architecture.

Once Ant2 is there, I'd expect it to include a bare minimum of tasks,
my vote would go for "if you don't need it to build an Ant
distribution, it's not core". We should have a central repository of
tasks, maybe as a new project at jakarta, and move the remainder of
tasks over there.

Until then I have no problem with including these tasks (and bloating
Ant if you want to call it that) .

Stefan

Re: [submit] optional task for Poet ptjavac compiler/enhancer

Posted by Jon Stevens <jo...@latchkey.com>.
on 12/5/2000 10:08 AM, "Craig Kelley" <ck...@HotPOP.com> wrote:

> Attached is an optional task that is a subclass (with too much cut and
> paste ;-) of the Javac task to run the Poet ptjavac external compiler to
> compile Java code and enhance it for use with the Poet object oriented
> database (OODB).
> 
> To use the task you must have Poet (of course) with the appropriate Poet
> jars included in your classpath, and the ptjavac compiler executable in
> your path. Since ptjavac actually uses the Sun compiler classes in some
> way, you also have to have the appropriate JDK jars in your classpath.
> 
> The usage is pretty much like the Sun javac compiler with a couple of
> extra arguments to tell Poet where its configuration file is and what to
> do with the schema.
> 
> -- Craig

I have a question: 

Why are people submitting every task under the Sun to be included with Ant?
What is wrong with simply including your Poet task with Poet and leaving it
at that?

Turbine and Velocity have a number of Ant tasks that are used to benefit
Turbine and Velocity, but I'm not about to submit them here for inclusion
with Ant because they live just fine within their respective projects.

I just don't get it. Why are we bloating Ant like this?

-jon