Thanks for your answer. I'd like to fix this problem once for all - mapping and using push would just buy me some time I reckon.
> -----Original Message----- > From: Jose M Urena [mailto:jose.ur...@verizon.com] > Sent: 03 August 2018 14:02 > To: Ant Users List > Subject: [DKIM:FAIL] Re: [E] Javac: Command-Line Argument Files > > the following suggestion I have learned for working with Jenkins jobs which > can have very long paths for the workspace > > 1. if you have permission on your computer/server to create windows shares > and to run from shared drive, > then you could save most of the characters to the left of your path by > using PUSHD > > if your current dir is c:\users\yourname\documents\ which is 28 characters > then pushd will reduce it to 3, saving you 25 characters > > net share TEMPSHORTPATH=%CD% /grant:%USERNAME%,FULL > pushd \\%COMPUTERNAME%.%USERDNSDOMAIN%\TEMPSHORTPATH > :: call your ant script > > ant > > :: leave the temp drive, remove it from windows shares > popd > net share /delete TEMPSHORTPATH > :: confirm share was cleaned > net use > net share > > 2. if the issue is with commands under your c:\program files, like > c:\program files\oracle\jdk180\bin\javac > you can try using MKLINK to remove spaces and shorten the path > mkdir c:\dev > cd c:\dev > mklink /j jdk "c:\program files\oracle\jdk180" > > now you can use c:\dev\jdk\bin\javac which is shorter than c:\program > files\oracle\jdk180\bin\javac > > 3. if you can not use PUSHD, mklink can be used to shorten paths but it is > not as short as pushd > mkdir c:\dev > cd c:\dev > mklink /j doc "c:\users\yourname\documents\" > > > > On Fri, Aug 3, 2018 at 6:25 AM Pietro Paolini < > pietro.paol...@alfasystems.com> wrote: > > > Hi all, > > > > I am a bit struggling with an build.xml file <javac> task, I haven't got > > too much experience with Ant but hopefully my question won't sound too > > silly. On a window machine I reach the > > Command line limit size and the compiler task fails as "the extension or > > file name is too long". > > > > I am wondering if it could be possible to get advantage of > > > > > > https://urldefense.proofpoint.com/v2/url?u=https- > 3A__docs.oracle.com_javase_8_docs_technotes_tools_windows_javac.html- > 23BHCJEIBB&d=DwIFAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0Pom > BTQ&r=8XYgcdEXHJW1PQ9xb6NrZ5vlBTrHBT7lhTNH6uwwINQ&m=LOtmbKv9 > Pf9JXdG7oo-wOJVmm0DBaI-biSoqKkmRB1Y&s=3d6wFJcoY- > jzVaYoMjXRGQtLVB4MbjUD6j_Krv55Gp0&e= > > > > Is there a quick win on that ? I couldn't find much on Google :-( > > > > Thanks, > > Pietro > > > > > > Pietro Paolini > > Consultant > > > > Alfa > > ________________________________ > > e: pietro.paol...@alfasystems.com | w: alfasystems.com< > > https://urldefense.proofpoint.com/v2/url?u=https- > 3A__www.alfasystems.com&d=DwIFAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3 > LRxpb6__0PomBTQ&r=8XYgcdEXHJW1PQ9xb6NrZ5vlBTrHBT7lhTNH6uwwINQ > &m=LOtmbKv9Pf9JXdG7oo-wOJVmm0DBaI- > biSoqKkmRB1Y&s=bNk8SVZHcZac3KOa02xtQCXPIhrz3JfJRZfiaFUIVUk&e= > > > > > t: +44 (0) 20 7920-2643 | Moor Place, 1 Fore Street Avenue, London, EC2Y > > 9DT, GB > > ________________________________ > > > > The contents of this communication are not intended to be binding or > > constitute any form of offer or acceptance or give rise to any legal > > obligations on behalf of the sender or Alfa. The views or opinions > > expressed represent those of the author and not necessarily those of Alfa. > > This email and any attachments are strictly confidential and are intended > > solely for use by the individual or entity to whom it is addressed. If you > > are not the addressee (or responsible for delivery of the message to the > > addressee) you may not copy, forward, disclose or use any part of the > > message or its attachments. At present the integrity of email across the > > internet cannot be guaranteed and messages sent via this medium are > > potentially at risk. All liability is excluded to the extent permitted by > > law for any claims arising as a result of the use of this medium to > > transmit information by or to Alfa or its affiliates. > > > > Alfa Financial Software Ltd > > Reg. in England No: 0248 2325 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > > For additional commands, e-mail: user-h...@ant.apache.org > > > >