You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shawn Castrianni <Sh...@halliburton.com> on 2008/06/02 23:29:36 UTC
shared ant installation
I am trying to produce a sandbox with ant and some master build scripts such that all my developers can point to the network share for ant. I am hoping to use this to prevent everybody from having to install my ant sandbox locally which can get out of date. By everyone pointing to the network share, everyone will always be using the most up to date sandbox that I can maintain. Each developer's source code has a local build.xml file which does an import on my master build file in the network ant sandbox. If I set an env variable to point to the network ant sandbox, ANT is throwing an error trying to import it. The env variable is set to: \\<serverName>\dir1\dir2\dir3<file:///\\%3cserverName%3e\dir1\dir2\dir3> for example.
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:165)
at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:161)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
---
Shawn Castrianni
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
RE: shared ant installation
Posted by "Burgess, Benjamin" <BB...@tiaa-cref.org>.
We use a similar strategy more like what DD is describing. At the top
of our "Master Build Script" which everyone's script imports, we have
these tasks (some are from ant contrib) declared outside of a target (so
they always run):
<get src="http://an.internal.web.server/master.build.xml"
dest="${user.home}/.ant/master.build.xml" ignoreerrors="true"
usetimestamp="true"/>
<loadfile srcFile="${ant.home}/etc/our.version.txt"
property="our.ant.version" failonerror="false"/>
<if>
<not>
<equals arg1="${our.ant.version}"
arg2="1.6.5.3"/>
</not>
<then>
<splash showduration="1000"
imageurl="file:///${ant.home}/etc/our.update.gif"/>
</then>
</if>
We added a couple extra files in our Ant distribution's etc folder
including an image that says to go check for an updated ant distribution
and a version.txt file that has a number in it that we increment
whenever we update the distribution. The get task keeps local copies of
the master.build.xml file up to date and the hardcoded version number in
that master.build.xml should match the number in the ant distribution's
version.txt file (otherwise, you know there is an updated ant
distribution available).
Ben
-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com]
Sent: Monday, June 02, 2008 6:42 PM
To: Ant Users List
Subject: Re: shared ant installation
On Mon, Jun 2, 2008 at 4:44 PM, Shawn Castrianni
<Sh...@halliburton.com> wrote:
> After more investigation, I guess it isn't even getting to my import.
I think it is dying on just trying to invoke ant from a Windows UNC
path. If I just type:
>
> \\<serverName>\dir1\dir2\dir3\ant\bin\ant
>
> it gives me the same error as before. Is it possible to run ant from
a network share on windows?
\\server\dir is not a valid URL, and thus Java/Ant has trouble with it
(in the low level URL/URI code). Depending on the JDK sometimes
file:/server/dir is the proper URL, sometimes its file:///server/dir.
(You could also have them map the remote dir to a drive letter, to
work around the UNC path name issue).
But wanting developers to use a non-local Ant sandbox, brrrr, that's a
no-no to me. By this thinking you'd want them to work in a code
sandbox you dynamically update yourself without their knowledge, or
why not have them use a remote JDK install to make sure they are using
the right patch of the JDK (too many times I've seen variation on this
where you work Shawn ;-)
Just trust your developers to update the CVS or SVN maintained sandbox
of your build stuff often, after you've told them. Possibly add
"enforcement", by comparing the version of your stuff embedded into
downloaded dependencies with the local one, and fail on mismatch. Or
have the build check your "master" sandbox's version and fail on
mismatch. Better these strategies than the shared sandbox approach
IMHO. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: shared ant installation
Posted by Dominique Devienne <dd...@gmail.com>.
On Mon, Jun 2, 2008 at 4:44 PM, Shawn Castrianni
<Sh...@halliburton.com> wrote:
> After more investigation, I guess it isn't even getting to my import. I think it is dying on just trying to invoke ant from a Windows UNC path. If I just type:
>
> \\<serverName>\dir1\dir2\dir3\ant\bin\ant
>
> it gives me the same error as before. Is it possible to run ant from a network share on windows?
\\server\dir is not a valid URL, and thus Java/Ant has trouble with it
(in the low level URL/URI code). Depending on the JDK sometimes
file:/server/dir is the proper URL, sometimes its file:///server/dir.
(You could also have them map the remote dir to a drive letter, to
work around the UNC path name issue).
But wanting developers to use a non-local Ant sandbox, brrrr, that's a
no-no to me. By this thinking you'd want them to work in a code
sandbox you dynamically update yourself without their knowledge, or
why not have them use a remote JDK install to make sure they are using
the right patch of the JDK (too many times I've seen variation on this
where you work Shawn ;-)
Just trust your developers to update the CVS or SVN maintained sandbox
of your build stuff often, after you've told them. Possibly add
"enforcement", by comparing the version of your stuff embedded into
downloaded dependencies with the local one, and fail on mismatch. Or
have the build check your "master" sandbox's version and fail on
mismatch. Better these strategies than the shared sandbox approach
IMHO. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: shared ant installation
Posted by Shawn Castrianni <Sh...@halliburton.com>.
After more investigation, I guess it isn't even getting to my import. I think it is dying on just trying to invoke ant from a Windows UNC path. If I just type:
\\<serverName>\dir1\dir2\dir3\ant\bin\ant
it gives me the same error as before. Is it possible to run ant from a network share on windows?
---
Shawn Castrianni
-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
Sent: Monday, June 02, 2008 4:30 PM
To: 'Ant Users List'
Subject: shared ant installation
I am trying to produce a sandbox with ant and some master build scripts such that all my developers can point to the network share for ant. I am hoping to use this to prevent everybody from having to install my ant sandbox locally which can get out of date. By everyone pointing to the network share, everyone will always be using the most up to date sandbox that I can maintain. Each developer's source code has a local build.xml file which does an import on my master build file in the network ant sandbox. If I set an env variable to point to the network ant sandbox, ANT is throwing an error trying to import it. The env variable is set to: \\<serverName>\dir1\dir2\dir3<file:///\\%3cserverName%3e\dir1\dir2\dir3> for example.
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:165)
at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:161)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
---
Shawn Castrianni
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org