As far as I know, Windows has no facility for executing batch scripts (or anything else for that matter) which are inside a JAR file. So, what you'll need to do is copy the script to a temp directory and execute it from there. I'm not sure how you'd do this with Ant. In a Java-based Mojo, you could call getResourceAsStream() to get an InputStream and the copy the bytes to the temp file.
Justin -----Original Message----- From: yoyomohan [mailto:[email protected]] Sent: Sunday, October 04, 2009 2:02 PM To: [email protected] Subject: Re: Ant Mojo Resources Hi jslinnha, I'm stuck in the same problem .pls. can you share the solution for the problem 'calling scripts from custom ant plugin jar file' only. Thanks in advance..... jslinnha wrote: > > Hi All, > > I have created an Ant based plugin that need to call a windows batch > file. The batch file is in the plugin projects resources folder and > thus in the plugin jar. How can I access this resource path/ batch > file using the <exec> ant task ? > > Thanks > > Jon > > -- View this message in context: http://www.nabble.com/Ant-Mojo-Resources-tp7011696p25740443.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
