ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Moore, Kent" <>
Subject RE: Windows authentication
Date Wed, 03 Nov 2010 16:18:21 GMT
This routine works for us to authenticate and copy to Windows machines - 

        <exec executable="net">
            <arg line="use \\${deployment.server}\c$ /user:${deployment.server}\${}

        <delete dir="\\${deployment.server}/c$/auto-deploy"/>
        <copy todir="\\${deployment.server}/c$/auto-deploy">
            <fileset dir="${target.dir}">
                <include name="**"/>


-----Original Message-----
From: Ludwig, Michael [] 
Sent: Wednesday, November 03, 2010 12:15 PM
To: Ant Users List
Subject: Windows authentication

I want to deploy stuff to a server accessible only by its UNC path supplying a username and
password. This is usually done using Windows Explorer. I think this is called Windows Authentication,
or NTLM, or both - not sure.

What are my options using Java? Specifically, using Ant?

The clients I want to run my Ant script from are also Windows.

So far, I've found the following: - from 2002

I'm not at all sure any of it is appropriate, so I'm looking for advice.

My current solution uses Explorer to handle authentication:

 <property name="share" value="\\\bla"/>
 <exec executable="explorer">
   <arg value="${share}"/>
 <input message="Anmeldung an ${share} klar? Dann ENTER druecken!"/>
 <copy file="test.txt" todir="${share}"/>

This requires a Windows OS and a user. There might be something better.

Michael Ludwig 


The information contained in this message is proprietary and/or confidential. If you are not
the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review
by persons other than the intended recipient. Thank you.
View raw message