Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Netbeans & Ant Help

50 views
Skip to first unread message

NoS...@aol.com

unread,
May 30, 2009, 10:50:59 AM5/30/09
to
I have installed Netbeans 6.1 and would like to run ant - but - I can't
find ant.exe anywhere. I have read that Netbeans includes ant.

How can I run ant or do I have to download and install it separately?
Thanks!

John B. Matthews

unread,
May 30, 2009, 12:22:09 PM5/30/09
to
In article <ioh225hurmvgvotab...@4ax.com>, NoS...@aol.com
wrote:

My NetBeans 6.1 came with ant version 1.7.1, as shown in Options ->
Miscellaneous -> Ant -> Ant Home.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Roedy Green

unread,
May 30, 2009, 1:01:04 PM5/30/09
to
On Sat, 30 May 2009 10:50:59 -0400, NoS...@aol.com wrote, quoted or
indirectly quoted someone who said :

>I have installed Netbeans 6.1 and would like to run ant - but - I can't
>find ant.exe anywhere. I have read that Netbeans includes ant.

If you need ant separately, see http://mindprod.com/jgloss/ant.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Everybody�s worried about stopping terrorism. Well, there�s a really easy way: stop participating in it."
~ Noam Chomsky

NoS...@aol.com

unread,
May 30, 2009, 1:47:03 PM5/30/09
to
Thanks for the reply. It came with mine too!! For some reason (just being
a dummy I suppose) I looked for it on the JAVA directory tree instead of
the NetBeans tree.

No to see if I can learn to use it. Thanks again.

John B. Matthews

unread,
May 30, 2009, 5:18:53 PM5/30/09
to
In article <vur225lf0g4s2gtk5...@4ax.com>, NoS...@aol.com
wrote:

> On Sat, 30 May 2009 12:22:09 -0400, "John B. Matthews"
> <nos...@nospam.invalid> wrote:
>
> >In article <ioh225hurmvgvotab...@4ax.com>, NoS...@aol.com
> >wrote:
> >
> >> I have installed Netbeans 6.1 and would like to run ant - but - I
> >> can't find ant.exe anywhere. I have read that Netbeans includes
> >> ant.
> >>
> >> How can I run ant or do I have to download and install it
> >> separately? Thanks!
> >
> >My NetBeans 6.1 came with ant version 1.7.1, as shown in Options ->
> >Miscellaneous -> Ant -> Ant Home.

> Thanks for the reply. It came with mine too!! For some reason (just

> being a dummy I suppose) I looked for it on the JAVA directory tree
> instead of the NetBeans tree.

Excellent!

> Now to see if I can learn to use it. Thanks again.

Start with the one created by NetBeans for a new project. The file
build.xml will be almost empty except for comments. Add a target that
overrides one of the empty stubs, and it'll be executed in the normal
course of operations. For example:

<project name="SomeDemo" default="default" basedir=".">
<import file="nbproject/build-impl.xml"/>
<target name="-post-compile">
<echo>build.dir: ${build.dir}</echo>
<length mode="all" property="build.size">
<fileset dir="${build.dir}">
<include name="**/*"/>
</fileset>
</length>
<echo>build.size: ${build.size}</echo>
</target>
</project>

[Please don't top-post.]

Andrew Thompson

unread,
May 30, 2009, 9:39:36 PM5/30/09
to
On May 31, 7:18 am, "John B. Matthews" <nos...@nospam.invalid> wrote:
> ...

> Start with the one created by NetBeans for a new project.

Really? I have written a number of build files, from the
simple and short, to the very long. Yet every time I go
to delve into the guts of a NB build file, I see..

>     <import file="nbproject/build-impl.xml"/>

..that import, which leads to an horrendously long and complex
build file that I cannot make head nor tail of*.

For simpler build files which should also be NB compatible,
try some of the examples available on my JWS API examples**
page. They are so simple, even /I/ can understand them!

** <http://pscode.org/jws/api.html>
Look for the .zip in the Download column.

* BTW - is it just me? Can other people understand those
NB build files?

--
Andrew T.
pscode.org

John B. Matthews

unread,
May 30, 2009, 10:03:34 PM5/30/09
to
In article
<1709b45b-c672-4b07...@n21g2000vba.googlegroups.com>,
Andrew Thompson <andrew...@gmail.com> wrote:

> On May 31, 7:18 am, "John B. Matthews" <nos...@nospam.invalid> wrote:
> > ...
> > Start with the one created by NetBeans for a new project.
>
> Really? I have written a number of build files, from the
> simple and short, to the very long. Yet every time I go
> to delve into the guts of a NB build file, I see..
>
> >     <import file="nbproject/build-impl.xml"/>

That's the best part. Just override the (otherwise empty) target you
want to tinker with. That way you leverage the NetBeans implementation
while learning new tasks & types.

> ..that import, which leads to an horrendously long and complex
> build file that I cannot make head nor tail of*.
>
> For simpler build files which should also be NB compatible,
> try some of the examples available on my JWS API examples**
> page. They are so simple, even /I/ can understand them!
>
> ** <http://pscode.org/jws/api.html>
> Look for the .zip in the Download column.

Admirably concise. Here's my stock version of the targets needed for a
NetBeans free-form project (inside the jar):

<http://sites.google.com/site/drjohnbmatthews/manifesto>

> * BTW - is it just me? Can other people understand those
> NB build files?

I understand barely a fraction, but they seem instructive. I confess I
don't care for the lengthy enumeration of visited targets.

Nigel Wade

unread,
Jun 1, 2009, 5:37:28 AM6/1/09
to
Andrew Thompson wrote:

> On May 31, 7:18 am, "John B. Matthews" <nos...@nospam.invalid> wrote:
>> ...
>> Start with the one created by NetBeans for a new project.
>
> Really? I have written a number of build files, from the
> simple and short, to the very long. Yet every time I go
> to delve into the guts of a NB build file, I see..
>
>>     <import file="nbproject/build-impl.xml"/>
>
> ..that import, which leads to an horrendously long and complex
> build file that I cannot make head nor tail of*.

The build files generated by NetBeans are not usually overcomplicated unless
they need to be. The import makes lots of targets available to the build
process, but NetBeans only uses those it needs to.

It does, however, allow you access to many of the features of the NetBeans build
process if you can untangle what is going on. I've made use of this a few
times, for example to add additional targets to the build which can be accessed
from within NetBeans.

>
> For simpler build files which should also be NB compatible,
> try some of the examples available on my JWS API examples**
> page. They are so simple, even /I/ can understand them!
>
> ** <http://pscode.org/jws/api.html>
> Look for the .zip in the Download column.
>
> * BTW - is it just me? Can other people understand those
> NB build files?
>

Barely a fraction, but sometimes that's enough.

--
Nigel Wade

Nobod...@nobodythereeither.bye

unread,
Jun 1, 2009, 8:02:32 AM6/1/09
to
>"Everybody�s worried about stopping terrorism. Well, there�s a really easy way: stop participating in it."

That is EXTREMELY dangerous thinking and clearly totally untrue. From the
bullying that goes on in elementary school against those most unable to
participate to the Hitlers of history to Islamic extremeists of today the
foolishness of the quoted statement is clear. Historically, not
participating, and attemnpting to appease the opressor has led to disaster.
Chamberlin's appeasment very nearly caused the loss of Endland and did
cause the loss of many countries and enslavement and death of its people.

A study of recent middle east history shows very very clearly that if the
Palestinians unilaterally laid down their arms, there would be no more
war. If Israel unilaterally laid down its arms, there would be no more
Israel. and, no - I am not Jewish and I have no Jewish relatives.

Mark Space

unread,
Jun 1, 2009, 11:35:57 AM6/1/09
to
Andrew Thompson wrote:
>
> For simpler build files which should also be NB compatible,
> try some of the examples available on my JWS API examples**
> page. They are so simple, even /I/ can understand them!


There's also the NetBeans tutorials on their website. This is older,
but still relevant to NB 6, I believe:

<http://www.netbeans.org/kb/55/using-netbeans/building.html#16006>

0 new messages