Re: Ant ,ftp,java
Karthik wrote: Hi form On running the ftp target (in build.xml ) from java using "org.apache.tools.ant.*" I ageeint this Exception as below. Please read the error text and think about what it means. A bit of pondering will save a lot of time compared to posting for help on the mailing list and getting back incomplete answers like this one. D:\TEST\unix.xml:38: error during FTP transfer: org.apache.commons.net.MalformedServerReplyException: Could not parse response code. There was a server response code that could not be parsed Server Reply: SSH-1.99-OpenSSH_3.6.1p2 The server response that could not be parsed was "SSH-1.99-OpenSSH_3.6.1p2" Everything else is left as an exercise for the reader. -Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Special Ant-Javadoc for own tasks?
Hello, i just wrote a bunch of project-specific ant tasks to use with our build system. When it came to documentation, i searched for something similar as JavaDoc is to java programmers. Can somebody point me to a product that can automatically generate ant task documentation (like in the ant manual) from source comments? Thank you, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
one more problem
Hi, I'm stuck again :( I need to translate the following part of a shell script to Ant (with Ant-Contrib in place; using external `sed' is not an option, I want to minimize dependencies for Windows boxes): for PO_FILE in *.po; do LOCALE=$(echo "$PO_FILE" | sed -e 's/\.po$//') RESOURCE_FILE=$(echo "$RESOURCE_NAME" | sed -e "s/\./\//g") CLASS_FILE="$RESOURCE_DIRECTORY/${RESOURCE_FILE}_$LOCALE.class" if test "$CLASS_FILE" -ot "$PO_FILE"; then mkdir -p "$RESOURCE_DIRECTORY"/$(echo "$RESOURCE_NAME" | sed -e "s/^[^.]\+$//" -e "s/\.[^.]\+$//" -e "s/\./\//g") msgfmt --java2 \ --resource="$RESOURCE_NAME" \ --locale="$LOCALE" \ -d"$RESOURCE_DIRECTORY" \ --check --statistics\ "$PO_FILE" fi done I'm having problems with variable calculation. RESOURCE_NAME in the script has the form of `org.foo.bar.L10n', how do I compute `org/foo/bar/L10n' out of it in Ant? Also, I'd like to compute the locale out of file name, though this is not important. Thanks in advance, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ant ,ftp,java
Double check your port numbers. Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer "Karthik" <[EMAIL PROTECTED]> wrote on 02/20/2006 02:31:54 AM: > Hi form > > On running the ftp target (in build.xml ) from java using "org. > apache.tools.ant.*" I ageeint this Exception as below. > > > > > > > > > > remotedir = "${ftpremotedir}" > userid = "${ftpid}" > password = "${ftppas}" > Port= "22" > action=""> > separator="/" > > > > > > > > > > error: > > > D:\TEST\unix.xml:38: error during FTP transfer: org.apache.commons. > net.MalformedServerReplyException: Could not parse response code. > Server Reply: SSH-1.99-OpenSSH_3.6.1p2 > at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2014) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at com.xius.copy.os.xnix.FILECOPY1_1.runTarget(FILECOPY1_1.java:43) > at com.xius.copy.os.xnix.FILECOPY1_1.main(FILECOPY1_1.java:62) > > > > > but if I run the same FTP tag from ant ( ant -buildfile build.xml > ),then the task is processeed sucessfully. > > > > Note : in both cases I have made shure to set classpath of > > commons-net-1.4.1.jar > jakarta-oro-2.0.8.jar > > > > Some body Please tell me why am i getting the error... > > with regards > Karthik
Re: one more problem
Hi, to get the Locale from the file you can use the propertyregexp-Command: This will give you the locale of the file. This could also be used, with some modifications for other transformations. Greets markus m. may > --- Ursprüngliche Nachricht --- > Von: Paul Pogonyshev <[EMAIL PROTECTED]> > An: user@ant.apache.org > Betreff: one more problem > Datum: Mon, 20 Feb 2006 15:28:13 +0200 > > Hi, > > I'm stuck again :( > > I need to translate the following part of a shell script to Ant (with > Ant-Contrib in place; using external `sed' is not an option, I want > to minimize dependencies for Windows boxes): > > > for PO_FILE in *.po; do > LOCALE=$(echo "$PO_FILE" | sed -e 's/\.po$//') > RESOURCE_FILE=$(echo "$RESOURCE_NAME" | sed -e "s/\./\//g") > CLASS_FILE="$RESOURCE_DIRECTORY/${RESOURCE_FILE}_$LOCALE.class" > > if test "$CLASS_FILE" -ot "$PO_FILE"; then > mkdir -p "$RESOURCE_DIRECTORY"/$(echo "$RESOURCE_NAME" | sed -e > "s/^[^.]\+$//" -e "s/\.[^.]\+$//" -e "s/\./\//g") > msgfmt --java2 \ > --resource="$RESOURCE_NAME" \ > --locale="$LOCALE" \ > -d"$RESOURCE_DIRECTORY" \ > --check --statistics\ > "$PO_FILE" > fi > done > > > I'm having problems with variable calculation. RESOURCE_NAME in > the script has the form of `org.foo.bar.L10n', how do I compute > `org/foo/bar/L10n' out of it in Ant? > > Also, I'd like to compute the locale out of file name, though > this is not important. > > Thanks in advance, > Paul > > - > 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]
Re: one more problem
On 20 February 2006 16:04, Markus M. May wrote: > Hi, to get the Locale from the file you can use the propertyregexp-Command: > > input="${base.in.file}" > regexp="^(.*)[_]{1}(.*)\.class$$" > select="\2" > casesensitive="false" /> Thank you, I forgot to read all the docs in Ant-Contrib ;) One more, less important question: if I use several targets that invoke the same macro and set a property in that macro for temporary use (like above), I assume that makes parallel builds unreliable, right? Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ant ,ftp,java
Hi Form > but if I run the same FTP tag from ant ( ant -buildfile build.xml > ),then the task is processeed sucessfully. On running the same target using "ant -buildfile unix.xml" The ftp access is able to perform sucessfully (on the same port 22) with regards Karthik -Original Message- From: Jeffrey E Care [mailto:[EMAIL PROTECTED] Sent: Monday, February 20, 2006 7:26 PM To: Ant Users List Subject: Re: Ant ,ftp,java Double check your port numbers. Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer "Karthik" <[EMAIL PROTECTED]> wrote on 02/20/2006 02:31:54 AM: > Hi form > > On running the ftp target (in build.xml ) from java using "org. > apache.tools.ant.*" I ageeint this Exception as below. > > > > > > > > > remotedir = "${ftpremotedir}" > userid = "${ftpid}" >password = "${ftppas}" > Port= "22" >action="put" > separator="/" > > > > > > > > > > error: > > > D:\TEST\unix.xml:38: error during FTP transfer: org.apache.commons. > net.MalformedServerReplyException: Could not parse response code. > Server Reply: SSH-1.99-OpenSSH_3.6.1p2 > at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2014) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at com.xius.copy.os.xnix.FILECOPY1_1.runTarget(FILECOPY1_1.java:43) > at com.xius.copy.os.xnix.FILECOPY1_1.main(FILECOPY1_1.java:62) > > > > > but if I run the same FTP tag from ant ( ant -buildfile build.xml > ),then the task is processeed sucessfully. > > > > Note : in both cases I have made shure to set classpath of > > commons-net-1.4.1.jar > jakarta-oro-2.0.8.jar > > > > Some body Please tell me why am i getting the error... > > with regards > Karthik
�How to split a file? Split Task?????
Dear users, I would like to split a file fixing the number of lines or by size. Such utility exist on all operative sistem, but not in ANT :-(( I was looking in the web and there is an split task supported by Antelope http://antelope.tigris.org/nonav/docs/manual/bk03ch23.html can I use this task using the Ant syntax in a build.xml ant file. If you look in the example the syntax is a little bit different. They use the http://antelope.tigris.org/servlets/ProjectDocumentList Thanks in advance, David - Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail.
Re: �How to split a file? Split Task?????
Dear members, I was looking in to the Ant Bug database and I have found the following request: http://issues.apache.org/bugzilla/show_bug.cgi?id=37200 any way I don't know how to use the split task from Antelope in order to use it via ant build file. Thanks in advance, David Leal - What are the most popular cars? Find out at Yahoo! Autos
RE: Ant ,ftp,java
Are you REALLY sure? Because last time I checked port 22 was SSH, not FTP. Given the server reply you posted it would indeed seem that you are hitting an SSH server. Jeffrey E. (Jeff) Care [EMAIL PROTECTED] IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer "Karthik" <[EMAIL PROTECTED]> wrote on 02/20/2006 09:13:57 AM: > Hi Form > > > > but if I run the same FTP tag from ant ( ant -buildfile build.xml > > ),then the task is processeed sucessfully. > > > On running the same target using "ant -buildfile unix.xml" > > The ftp access is able to perform sucessfully (on the same port 22) > > > with regards > Karthik > > > -Original Message- > From: Jeffrey E Care [mailto:[EMAIL PROTECTED] > Sent: Monday, February 20, 2006 7:26 PM > To: Ant Users List > Subject: Re: Ant ,ftp,java > > > > Double check your port numbers. > > > > Jeffrey E. (Jeff) Care [EMAIL PROTECTED] > IBM WebSphere Application Server Development WAS Pyxis Lead Release > Engineer > > > > > "Karthik" <[EMAIL PROTECTED]> wrote on 02/20/2006 02:31:54 AM: > > > Hi form > > > > On running the ftp target (in build.xml ) from java using "org. > > apache.tools.ant.*" I ageeint this Exception as below. > > > > > > > > > > > > > > > > > > > > > > remotedir = "${ftpremotedir}" > > userid = "${ftpid}" > > password = "${ftppas}" > > Port= "22" > > action=""> > > separator="/" > > > > > > > > > > > > > > > > > > > error: > > > > > > D:\TEST\unix.xml:38: error during FTP transfer: org.apache.commons. > > net.MalformedServerReplyException: Could not parse response code. > > Server Reply: SSH-1.99-OpenSSH_3.6.1p2 > > at > org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2014) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > > at org.apache.tools.ant.Task.perform(Task.java:364) > > at org.apache.tools.ant.Target.execute(Target.java:341) > > at org.apache.tools.ant.Target.performTasks(Target.java:369) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > > at com.xius.copy.os.xnix.FILECOPY1_1.runTarget(FILECOPY1_1.java:43) > > at com.xius.copy.os.xnix.FILECOPY1_1.main(FILECOPY1_1.java:62) > > > > > > > > > > > > but if I run the same FTP tag from ant ( ant -buildfile build.xml > > ),then the task is processeed sucessfully. > > > > > > > > Note : in both cases I have made shure to set classpath of > > > > commons-net-1.4.1.jar > > jakarta-oro-2.0.8.jar > > > > > > > > Some body Please tell me why am i getting the error... > > > > with regards > > Karthik
AW: ¿How to split a file? Split Task?????
> I was looking in the web and there is an split task >supported by Antelope > > http://antelope.tigris.org/nonav/docs/manual/bk03ch23.html > > can I use this task using the Ant syntax in a build.xml ant >file. If you look in the example the syntax is a little bit >different. They use the instead of . > If so, there should be necessary to download the Antelope >3.2.10 Tasks and take the *jar fie insite it, put it in the >class path and declare the new task. > > http://antelope.tigris.org/servlets/ProjectDocumentList as other external tasks ... Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Conditional antcall
Hi, I'd like to access to a database, and, if it fails, create the database otherwise update it. To access the database, I intend to use a sql task. If the sql request fails, I want to call the create-database target. If it successes, I want to call the update-database target. Any idea on how to do this conditional call ? Regards -- A. ROY - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional antcall
Within the constraints of default ANT components it may be a bit klugely (but then you're probably used doing ANT kluges :-) A way that I found to get data into ANT from the database is to execute SQL whose result (when successful) looks like a standard JAVA property file. I then use the task with the output property set to send the results to a temp file (also showheaders=false helps). I execute the SQL (with onerror=continue) and then load the property file (via the task) If the task executed properly, a property would have been loaded into the ANT property space. I use that property in my if/unless checks. In your case, the follow SQL will result in a property being set only if you are able to reach a table in the database: SELECT DISTINCT('found.database=true') from ANY_TABLE; (note replace ANY_TABLE with the name of a table that you expect to be in the schema) Now if you redirect the output to a file and load that file, you can now conditionally check the property ${found.database} to tell you whether the database is there or not... Of course, at our project site we ended up modifying the task to support an onerrorproperty which allows us to have a property to be set if we ecounter an error while executing a SQL. You can also use the / task from the ant-contrib project to tell you that there was an error executing SQL. Hope that makes sense, Ninju - Original Message From: ar <[EMAIL PROTECTED]> To: user@ant.apache.org Sent: Monday, February 20, 2006 10:41:35 AM Subject: Conditional antcall Hi, I'd like to access to a database, and, if it fails, create the database otherwise update it. To access the database, I intend to use a sql task. If the sql request fails, I want to call the create-database target. If it successes, I want to call the update-database target. Any idea on how to do this conditional call ? Regards -- A. ROY - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional antcall
> I'd like to access to a database, and, if it fails, create the > database > otherwise update it. > To access the database, I intend to use a sql task. If the sql > request > fails, I want to call the create-database target. If it successes, > I want > to call the update-database target. > Any idea on how to do this conditional call ? Check ant-contrib, I think there's a trycatch task. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Special Ant-Javadoc for own tasks?
Daniel, The only solution I know and works well is AntDoc. It is no so much live project, but it is robust, even from the new ant version features. You can find more information from the following web page: http://antdoc.free.fr/ take the version 0.8g from 2003.10.01, because the link to the latest version doesn't work. I hope this help, David >i just wrote a bunch of project-specific ant tasks to use with our build >system. When it came to documentation, i searched for something similar >as JavaDoc is to java programmers. >Can somebody point me to a product that can automatically generate ant >task documentation (like in the ant manual) from source comments? >Thank you, >Daniel - Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
Am I using the selector (with mapper) correctly?
Hello all, I need to keep a "derived" directory tree in synch with its source tree specifically with regard to deletions in the source tree. The source tree has a collection of documents of various types (.doc, .xls, etc...). The real directory is full tree (with many sub-dirs) \Documentation --- Design.doc --- Testing.doc --- Plan.xls While the "dervied" tree has the files converted to .pdf format (the base name are the same) \PDFs --- Design.pdf --- Testing.pdf --- Plan.xls I am able to handles updates/additions to the \Documentation tree (via CruiseControl and build scripts) but I stuck on trying to propagate a deletion event. The follow target does not work: Need to delete ${delete.me} When I run it with -d I get: missing: Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image Adding reference: need.to.delete Could not load a dependent class (com/sun/media/jai/codec/FileSeekableStream) for type image Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend fileset: Setup scanner in dir C:\CybeRe\PDFs with patternSet{ includes: [] excludes: [] } [pathconvert] Set property delete.me = Setting project property: delete.me -> [echo] Need to delete BUILD SUCCESSFUL Basically nothing is picked up by the scanner. As an FYI, I tried use instead of and got a: BUILD FAILED C:\CybeRe\build.xml:5: Class org.apache.tools.ant.types.selectors.PresentSelector doesn't support the nested "globmapper" element. at org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:590) which I did not expect.
Fwd: ejb task issue
Hi, I'm getting the following exception while running an ejb task this is my ejb task I'm getting the following error: [ejbjar] Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer - dependent class not found: org/apache/bcel/classfile/ClassParser --- This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved
Fwd: ejb task issue
Hi, Sorry for troubling again. I'm getting the following exception while running an ejb task this is my ejb task I'm getting the following error: [ejbjar] Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer - dependent class not found: org/apache/bcel/classfile/ClassParser --- This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved --- This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient or received it in error, please contact the sender by reply e-mail and destroy all copies of the original message. Please do not copy it for any purpose or disclose its contents. Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved
AW: Conditional antcall
Just an idea does it has any effects to call the create-statement on an existing database? If not, just execute both. Like an on an existing directory. Maybe that depends on the database. And maybe the onerror-attribute of would help. Jan >-Ursprüngliche Nachricht- >Von: ar [mailto:[EMAIL PROTECTED] >Gesendet: Montag, 20. Februar 2006 17:42 >An: user@ant.apache.org >Betreff: Conditional antcall > > >Hi, > >I'd like to access to a database, and, if it fails, create the >database otherwise update it. >To access the database, I intend to use a sql task. If the sql >request fails, I want to call the create-database target. If >it successes, I want to call the update-database target. >Any idea on how to do this conditional call ? > >Regards >-- >A. ROY > >- >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]