specifying ant.home property

Is it possible to specify the Ant.home property somewhere, perhaps in the
project file (as JDK is, for example), so that a version of Ant different
from the one included with IDEA could be used?

I checked Tracker and did not see this request -- will submit it if I don't
get a positive reply..thanks.


10 comments

Hello Dave!

IDEA always works with shipped ant.jar and optional.jar. You can try to
replace them with jars from other Ant version, although there's absolutely
no guarantee that Ant integration will work with no problems after that.

What do you want to replace Ant? What is the task you cannot perform with
the currently bundled version?

--
Best regards,
Anton Katilin
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0q6t7$s78$1@is.intellij.net...

Is it possible to specify the Ant.home property somewhere, perhaps in the
project file (as JDK is, for example), so that a version of Ant different
from the one included with IDEA could be used?

>

I checked Tracker and did not see this request -- will submit it if I

don't

get a positive reply..thanks.

>
>


0

Hi, Anton! Thanks for your quick reply.

You wrote:

Why do you want to replace Ant? What is the task you cannot perform with

the currently bundled version?

The first and most prominent problem we had was trying to run junit from our
build.xml file. It worked from a cmd shell, but when run from inside IDEA,
it couldn't find the junit task. That seems very odd since IDEA has
built-in support for junit. It was while tracking down that problem that we
discovered that IDEA has its own ant lib directory and that it was missing
junit.jar.

But there are other optional jar files that our own installation of Ant
requires to run our ant scripts:

bsf.jar, js.jar - required for embedded javascript.
netcomponents.jar - required for telnet and ftp tasks.
jakarta-oro-2.0.4.jar - required for perforce interface tasks

Additionally, some development groups like to write their own custom ant
tasks. The easiest way to install these is to jar them up and drop them
into the ANT_HOME/lib directory.

Under our current configuration, any additional jar files required can be
added to our official version of Ant in our source code repository. When
the developers sync up their source code, they get exactly the jar files
they need to run our build. Life would be much simpler if we could also
have IDEA point to that same installation of Ant.

On the other hand, if we have overlooked some (probably obvious) method for
the bundled Ant to locate our additional jar files so that tasks are
recognized, that would satisfy our need.

Thanks,
-Dave

"Anton Katilin" <anton@intellij.com> wrote in message
news:b0r7bi$e1u$1@is.intellij.net...

Hello Dave!

>

IDEA always works with shipped ant.jar and optional.jar. You can try to
replace them with jars from other Ant version, although there's absolutely
no guarantee that Ant integration will work with no problems after that.

>

What do you want to replace Ant? What is the task you cannot perform with
the currently bundled version?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0q6t7$s78$1@is.intellij.net...

Is it possible to specify the Ant.home property somewhere, perhaps in

the

project file (as JDK is, for example), so that a version of Ant

different

from the one included with IDEA could be used?

>

I checked Tracker and did not see this request -- will submit it if I

don't

get a positive reply..thanks.

>
>

>
>


0

I second that and have also recently had trouble with ant and junit. Even tried including another version of junit.jar in IDEA_HOME/lib w/o success. I seem to remember that when building ant from source a long time ago the desired additional jars had to be present in the classpath and would then be "compiled in" with the dist, but I could be wrong about that. Could it be that the provided ant.jar/optional.jar is cached in idea and not refreshed? Seems like it could be a classloader issue.
Another useful task is the one provided with tomcat - catalina-ant.jar that allows one to install, reload and remove a web app into a running tomcat process from within ant for testing purposes.

0

Hello Dave!

As a workaround, could you please try to include all the required jars into
the Additional classpath (in Ant build file properties dialog). Does it
solve the problem?

--
Best regards,
Anton Katilin
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0sfaf$tni$1@is.intellij.net...

Hi, Anton! Thanks for your quick reply.

>

You wrote:

>

Why do you want to replace Ant? What is the task you cannot perform with

the currently bundled version?

>

The first and most prominent problem we had was trying to run junit from

our

build.xml file. It worked from a cmd shell, but when run from inside

IDEA,

it couldn't find the junit task. That seems very odd since IDEA has
built-in support for junit. It was while tracking down that problem that

we

discovered that IDEA has its own ant lib directory and that it was missing
junit.jar.

>

But there are other optional jar files that our own installation of Ant
requires to run our ant scripts:

>

bsf.jar, js.jar - required for embedded javascript.
netcomponents.jar - required for telnet and ftp tasks.
jakarta-oro-2.0.4.jar - required for perforce interface tasks

>

Additionally, some development groups like to write their own custom ant
tasks. The easiest way to install these is to jar them up and drop them
into the ANT_HOME/lib directory.

>

Under our current configuration, any additional jar files required can be
added to our official version of Ant in our source code repository. When
the developers sync up their source code, they get exactly the jar files
they need to run our build. Life would be much simpler if we could also
have IDEA point to that same installation of Ant.

>

On the other hand, if we have overlooked some (probably obvious) method

for

the bundled Ant to locate our additional jar files so that tasks are
recognized, that would satisfy our need.

>

Thanks,
-Dave

>

"Anton Katilin" <anton@intellij.com> wrote in message
news:b0r7bi$e1u$1@is.intellij.net...

Hello Dave!

>

IDEA always works with shipped ant.jar and optional.jar. You can try to
replace them with jars from other Ant version, although there's

absolutely

no guarantee that Ant integration will work with no problems after that.

>

What do you want to replace Ant? What is the task you cannot perform

with

the currently bundled version?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0q6t7$s78$1@is.intellij.net...

Is it possible to specify the Ant.home property somewhere, perhaps in

the

project file (as JDK is, for example), so that a version of Ant

different

from the one included with IDEA could be used?

>

I checked Tracker and did not see this request -- will submit it if I

don't

get a positive reply..thanks.

>
>

>
>

>
>


0

Related to this ant.home topic,
I filed a request
(http://www.intellij.net/tracker/idea/viewSCR?publicId=9386) that seems not
to have been broadcasted (I didn't receive any email confirmation): ant.home
is not a pre-defined property of the ant editor.

Jacques
"Anton Katilin" <anton@intellij.com> wrote in message
news:b1377k$845$1@is.intellij.net...

Hello Dave!

>

As a workaround, could you please try to include all the required jars

into

the Additional classpath (in Ant build file properties dialog). Does it
solve the problem?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0sfaf$tni$1@is.intellij.net...

Hi, Anton! Thanks for your quick reply.

>

You wrote:

>

Why do you want to replace Ant? What is the task you cannot perform

with

the currently bundled version?

>

The first and most prominent problem we had was trying to run junit from

our

build.xml file. It worked from a cmd shell, but when run from inside

IDEA,

it couldn't find the junit task. That seems very odd since IDEA has
built-in support for junit. It was while tracking down that problem

that

we

discovered that IDEA has its own ant lib directory and that it was

missing

junit.jar.

>

But there are other optional jar files that our own installation of Ant
requires to run our ant scripts:

>

bsf.jar, js.jar - required for embedded javascript.
netcomponents.jar - required for telnet and ftp tasks.
jakarta-oro-2.0.4.jar - required for perforce interface tasks

>

Additionally, some development groups like to write their own custom ant
tasks. The easiest way to install these is to jar them up and drop them
into the ANT_HOME/lib directory.

>

Under our current configuration, any additional jar files required can

be

added to our official version of Ant in our source code repository.

When

the developers sync up their source code, they get exactly the jar files
they need to run our build. Life would be much simpler if we could also
have IDEA point to that same installation of Ant.

>

On the other hand, if we have overlooked some (probably obvious) method

for

the bundled Ant to locate our additional jar files so that tasks are
recognized, that would satisfy our need.

>

Thanks,
-Dave

>

"Anton Katilin" <anton@intellij.com> wrote in message
news:b0r7bi$e1u$1@is.intellij.net...

Hello Dave!

>

IDEA always works with shipped ant.jar and optional.jar. You can try

to

replace them with jars from other Ant version, although there's

absolutely

no guarantee that Ant integration will work with no problems after

that.

>

What do you want to replace Ant? What is the task you cannot perform

with

the currently bundled version?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>

"Dave Kriewall" <davek@wrq.com> wrote in message
news:b0q6t7$s78$1@is.intellij.net...

Is it possible to specify the Ant.home property somewhere, perhaps

in

the

project file (as JDK is, for example), so that a version of Ant

different

from the one included with IDEA could be used?

>

I checked Tracker and did not see this request -- will submit it if

I

don't

get a positive reply..thanks.

>
>

>
>

>
>

>
>


0

Hi Anton,

Yes, including required jars into that additional classpath works. However,
we are trying to avoid having to do this. Our build system is distributed
to developers via source control. This allows us to centrally control the
version of ant and additional libraries to be used. Your workaround would
require each developer to manually update the Ant classpath or Ant
executable if either ant itself or the set of additional libraries changed.
We just want Idea to access an entry point in our build system.

It seems analogous to being able to choose which JDK to use for a given
project. Ant 1.6 is not far off, and the ability to switch to that version
would be useful. Just as the JDK is on a separate release schedule from
Idea, so is Ant, and therefore should be decoupled. All we need is a way to
specify the Ant.home property, or location of the ant installation
directory. Of course this doesn't mean you should not ship your own tested
version of Ant as you currently do; it just means we would like to be able
to override that hardcoded location.

If you like, I'll submit a tracker request for this.

Thanks for your replies and consideration,
-Dave


WRQ software extends host applications, rapidly integrating them for new
applications or new users.
Rated #1 in customer support. Relied on daily by four out of five Fortune
500 companies.



"Anton Katilin" <anton@intellij.com> wrote in message
news:b1377k$845$1@is.intellij.net...

Hello Dave!

>

As a workaround, could you please try to include all the required jars

into

the Additional classpath (in Ant build file properties dialog). Does it
solve the problem?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>





Attachment(s):
signature_logo.gif
0

Hello Dave!

If you like, I'll submit a tracker request for this.


Yes, could you please submit a request.

--
Best regards,
Anton Katilin
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Dave Kriewall" <davek@wrq.com> wrote in message
news:b147dq$4cn$1@is.intellij.net...

Hi Anton,

>

Yes, including required jars into that additional classpath works.

However,

we are trying to avoid having to do this. Our build system is distributed
to developers via source control. This allows us to centrally control the
version of ant and additional libraries to be used. Your workaround would
require each developer to manually update the Ant classpath or Ant
executable if either ant itself or the set of additional libraries

changed.

We just want Idea to access an entry point in our build system.

>

It seems analogous to being able to choose which JDK to use for a given
project. Ant 1.6 is not far off, and the ability to switch to that

version

would be useful. Just as the JDK is on a separate release schedule from
Idea, so is Ant, and therefore should be decoupled. All we need is a way

to

specify the Ant.home property, or location of the ant installation
directory. Of course this doesn't mean you should not ship your own

tested

version of Ant as you currently do; it just means we would like to be able
to override that hardcoded location.

>

If you like, I'll submit a tracker request for this.

>

Thanks for your replies and consideration,
-Dave

>
>

WRQ software extends host applications, rapidly integrating them for new
applications or new users.
Rated #1 in customer support. Relied on daily by four out of five Fortune
500 companies.

>
>
>

"Anton Katilin" <anton@intellij.com> wrote in message
news:b1377k$845$1@is.intellij.net...

Hello Dave!

>

As a workaround, could you please try to include all the required jars

into

the Additional classpath (in Ant build file properties dialog). Does it
solve the problem?

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>

>
>
>


0

Done - it's Tracker request #9639.
-Dave

"Anton Katilin" <anton@intellij.com> wrote in message
news:b1o74t$qqj$1@is.intellij.net...

Hello Dave!

>

If you like, I'll submit a tracker request for this.

>

Yes, could you please submit a request.

>

--
Best regards,
Anton Katilin
---------------------------------------------------------
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

>
>


0

Anyway, if you really need it (for example, if you have build files that reference ${ant.home}, just open the ant properties window and add it there.

0


"Marcus Brito" <pazu@animegaiden.com.br> wrote in message
news:20481149.1044645211247.JavaMail.jrun@is.intellij.net...

Anyway, if you really need it (for example, if you have build files that

reference ${ant.home}, just open the ant properties window and add it there.

Hi Marcus,

The problem is that I am not able to set ant.home property prior to running
Ant. Executing Ant from within Idea always runs the version of Ant shipped
with Idea with Ant.home set to that lib directory.

There's no problem accessing the property from a build file.

Thanks,
-Dave


0

Please sign in to leave a comment.