how to exec with a set of files as multiple arguments?
Hi, I need to execute a command with a large, not known in advance, number of files, each listed as separate argument. I have been unable to figure out how to do this with Ant. Roughly speaking, I want sth. like except that I don't know how to convert the fileset into a set of s. gives the files combined together in one argument... Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: how to exec with a set of files as multiple arguments?
Jan >-Ursprüngliche Nachricht- >Von: Paul Pogonyshev [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 14:14 >An: user@ant.apache.org >Betreff: how to exec with a set of files as multiple arguments? > >Hi, > >I need to execute a command with a large, not known in >advance, number of files, each listed as separate argument. I >have been unable to figure out how to do this with Ant. > >Roughly speaking, I want sth. like > > > > > > > >except that I don't know how to convert the fileset into a set >of s. > > > > > > > > > > >gives the files combined together in one argument... > >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: AW: how to exec with a set of files as multiple arguments?
On 17 February 2006 15:08, [EMAIL PROTECTED] wrote: > > > > > Thanks, that works OK. is kind of deprecated, but I assume there is no other way. Thanks again. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
absolute paths vs. relative paths
Hi, I have one more question. How can I get relative paths instead of absolute ones? For instance, say I need to save the paths into a file. If I use absolute paths, it will be meaningless for someone on a different machine or with different home directory... Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: how to exec with a set of files as multiple arguments?
>> >> >> >> >> > >Thanks, that works OK. is kind of deprecated, >but I assume there is no other way. Manual sais "It is highly recommended to avoid the line version when possible. Ant will try to split the command line in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect under some circumstances." But it does not say that this is deprecated. You should use when possible so you have the direct control how the argument is split. But here you cant, because you dont know the number of files. (Ok, programming via API: Ant or DOM...) Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: absolute paths vs. relative paths
nested in Jan >-Ursprüngliche Nachricht- >Von: Paul Pogonyshev [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 14:37 >An: user@ant.apache.org >Betreff: absolute paths vs. relative paths > >Hi, > >I have one more question. How can I get relative paths >instead of absolute ones? For instance, say I need to save >the paths into a file. If I use absolute paths, it will be >meaningless for someone on a different machine or with >different home directory... > >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: Real meaning of javac target/source attributes
> > There are other ways to accomplish this (and Ant itself makes use of > > some of those techniques) but you can't rely on those being 100% > > safe. > > Such as? I'm really curious. The usual tricks, like checking for the existence of a class known to be introduced in a given JRE version, looking at various system properties, etc. I suppose you could say that those techniques are more about tolerating different versions of the JRE at runtime because you still have to know in advance what function was introduced when. They can be useful though, especially in cases where you have a problem that can be solved in all JRE versions, but can be solved better in later JRE versions because of new APIs available in the later version. -- Jeffrey E. (Jeff) Care ([EMAIL PROTECTED]) IBM WebSphere Application Server Development
AW: Real meaning of javac target/source attributes
>> > There are other ways to accomplish this (and Ant itself >makes use of >> > some of those techniques) but you can't rely on those being 100% >> > safe. >> >> Such as? I'm really curious. > >The usual tricks, like checking for the existence of a class >known to be introduced in a given JRE version, looking at >various system properties, etc. > >I suppose you could say that those techniques are more about >tolerating different versions of the JRE at runtime because >you still have to know in advance what function was introduced >when. They can be useful though, especially in cases where you >have a problem that can be solved in all JRE versions, but can >be solved better in later JRE versions because of new APIs >available in the later version. Ant does that for compiling newer features. Ants guideline is that it can be compiled against Java 1.2. So you could build it on 1.2 and it works. But there are some additional tasks which needs newer Java versions. They are handled same as tasks relying on external libraries. (The enhancement of the newer JDK against 1.2 is the external lib :-) Ants buildfile [1] checks for the existance of several classes introduced in the jdk versions. See the target "check_for_optional_packages" The JavaEnvUtil [2] class of Ant uses the same technique in its static initializer. static { // Determine the Java version by looking at available classes // java.lang.Readable was introduced in JDK 1.5 // java.lang.CharSequence was introduced in JDK 1.4 // java.lang.StrictMath was introduced in JDK 1.3 // java.lang.ThreadLocal was introduced in JDK 1.2 // java.lang.Void was introduced in JDK 1.1 // Count up version until a NoClassDefFoundError ends the try try { javaVersion = JAVA_1_0; javaVersionNumber = 10; Class.forName("java.lang.Void"); javaVersion = JAVA_1_1; javaVersionNumber++; } catch (Throwable t) { Jan [1] http://svn.apache.org/viewcvs.cgi/*checkout*/ant/core/trunk/build.xml?co ntent-type=text%2Fplain [2] http://svn.apache.org/viewcvs.cgi/*checkout*/ant/core/trunk/src/main/org /apache/tools/ant/util/JavaEnvUtils.java?rev=278136&content-type=text%2F plain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: how to exec with a set of files as multiple arguments?
> >> > >> > >> > >> > >> > > > >Thanks, that works OK. is kind of deprecated, > >but I assume there is no other way. > > Manual sais > "It is highly recommended to avoid the line version when possible. Ant > > will try to split the command line in a way similar to what a (Unix) > shell would do, but may create something that is very different from > what you expect under some circumstances." > > But it does not say that this is deprecated. Yeah, and I said `kind of deprecated' ;) BTW, I discovered that does exactly what I want... :) Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to exec with a set of files as multiple arguments?
pathconvert? http://ant.apache.org/manual/CoreTasks/pathconvert.html On Fri, 2006-02-17 at 13:13, Paul Pogonyshev wrote: > Hi, > > I need to execute a command with a large, not known in advance, > number of files, each listed as separate argument. I have been > unable to figure out how to do this with Ant. > > Roughly speaking, I want sth. like > > > > > > > > except that I don't know how to convert the fileset into a set > of s. > > > > > > > > > > > gives the files combined together in one argument... > > 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]
conditional execution
Hi, Is it possible to do some sorts of conditional execution of tasks other than and scripts (require extensions)? I need things like if file exists, do this, else do that. Or, if files are equal (byte-wise), do something. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: conditional execution
Ant-contrib has an "if" task which you could use. http://ant-contrib.sourceforge.net/ However, the traditional Ant solution is to split each piece of functionality into its own target, set properties based on condition, and use the if / unless attributes on the targets. Ben -Original Message- From: Paul Pogonyshev [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 10:04 AM To: user@ant.apache.org Subject: conditional execution Hi, Is it possible to do some sorts of conditional execution of tasks other than and scripts (require extensions)? I need things like if file exists, do this, else do that. Or, if files are equal (byte-wise), do something. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** 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 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: how to exec with a set of files as multiple arguments?
>BTW, I discovered that does >exactly what I want... :) ok, difference is that will invoke the executable for each argument while does this only once. Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: AW: how to exec with a set of files as multiple arguments?
On 17 February 2006 17:17, [EMAIL PROTECTED] wrote: > > >BTW, I discovered that does > >exactly what I want... :) > > > ok, difference is that will invoke the executable for each > argument while > does this only once. No, with parallel="true" will also invoke the command once only. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional execution
On 17 February 2006 17:07, Burgess, Benjamin wrote: > Ant-contrib has an "if" task which you could use. > > http://ant-contrib.sourceforge.net/ > > However, the traditional Ant solution is to split each piece of > functionality into its own target, set properties based on condition, > and use the if / unless attributes on the targets. The problem is that I'm creating a macro, I don't feel like repeating the logic for each of similar targets... OK, seems like I'll need to use some extension... Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
>No, with parallel="true" will also invoke the command >once only. Really sure? Or is this invoked one _after_ the other? .java: if (!parallel) { String[] s = new String[fileNames.size()]; fileNames.copyInto(s); for (int j = 0; j < s.length; j++) { String[] command = getCommandline(s[j], base); exe.setCommandline(command); runExecute(exe); } } Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
Is there a utility which comes with cruise control to trigger the builds manually through a web interface. Eager to see the group replies./ -Original Message- From: Ninju Bohra [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 11:28 AM To: Ant Users List Subject: Re: Regarding Continous build integration. CruiseControl is the way to go!!! - Original Message From: "Burgess, Benjamin" <[EMAIL PROTECTED]> To: Ant Users List Sent: Thursday, December 22, 2005 9:28:58 AM Subject: RE: Regarding Continous build integration. All of your requirements are met with CruiseControl. It is the most advanced build manager solution available. As for a list of other products, look here: http://docs.codehaus.org/display/DAMAGECONTROL/Continuous+Integration+Se rver+Feature+Matrix As for more CruiseControl documentation besides the website, try the Wiki: http://confluence.public.thoughtworks.org/display/CC/Home Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 10:24 AM To: user@ant.apache.org Subject: Regarding Continous build integration. Importance: High I would like to know if there are any open-source continuous integration build tools other than CruiseControl. Is there any other documentation other than The following website regarding this. http://cruisecontrol.sourceforge.net/ We would like to do the following tasks: a) Do an end of day build and nightly build. b) Email a link for the success build for the right set of individuals. c) Email the build failure to another set of individuals d) If the build is successful, publish in a webpage what were the changes. Eager to see the ant community suggestions Thanks srikrishna ** 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 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
--- [EMAIL PROTECTED] wrote: > >No, with parallel="true" will also invoke > the command > >once only. > > Really sure? Or is this invoked one _after_ the > other? Pretty sure that is how apply-parallel works. The snippet below is !parallel... :) -Matt > > .java: > if (!parallel) { > String[] s = new String[fileNames.size()]; > fileNames.copyInto(s); > for (int j = 0; j < s.length; j++) { > String[] command = getCommandline(s[j], > base); > exe.setCommandline(command); > runExecute(exe); > } > } > > > Jan > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional execution
--- Paul Pogonyshev <[EMAIL PROTECTED]> wrote: > On 17 February 2006 17:07, Burgess, Benjamin wrote: > > Ant-contrib has an "if" task which you could use. > > > > http://ant-contrib.sourceforge.net/ > > > > However, the traditional Ant solution is to split > each piece of > > functionality into its own target, set properties > based on condition, > > and use the if / unless attributes on the targets. > > The problem is that I'm creating a macro, I don't > feel like > repeating the logic for each of similar targets... > If you can wait to create the macro(s) until the condition is available for evaluation you can use conditional target execution to create a different macro depending on the result of evaluating the condition... ;) see http://wiki.apache.org/ant/NewAntFeaturesInDetail/PresetDef third example , "It is interesting to note...". -Matt > OK, seems like I'll need to use some extension... > > Paul > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
On Fri, 17 February, 2006 3:46 pm, [EMAIL PROTECTED] wrote: > Is there a utility which comes with cruise control to trigger the builds > manually through a web interface. Yes. CruiseControl can be managed by a JMX interface, which is included as part of the CC reporting application: http://confluence.public.thoughtworks.org/display/CC/Managing+CruiseControl+With+JMX Good luck! -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
On 17 February 2006 17:37, [EMAIL PROTECTED] wrote: > >No, with parallel="true" will also invoke the command > >once only. > > Really sure? Or is this invoked one _after_ the other? > > .java: > if (!parallel) { ^^^ There's a `not' here :) Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional execution
On 17 February 2006 17:55, Matt Benson wrote: > --- Paul Pogonyshev <[EMAIL PROTECTED]> > wrote: > > > On 17 February 2006 17:07, Burgess, Benjamin wrote: > > > Ant-contrib has an "if" task which you could use. > > > > > > http://ant-contrib.sourceforge.net/ > > > > > > However, the traditional Ant solution is to split > > each piece of > > > functionality into its own target, set properties > > based on condition, > > > and use the if / unless attributes on the targets. > > > > The problem is that I'm creating a macro, I don't > > feel like > > repeating the logic for each of similar targets... > > > > If you can wait to create the macro(s) until the > condition is available for evaluation you can use > conditional target execution to create a different > macro depending on the result of evaluating the > condition... ;) Won't work since the macro determines the condition itself... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
>> Really sure? Or is this invoked one _after_ the other? > >Pretty sure that is how apply-parallel works. The snippet >below is !parallel... :) mmh :) Ok, something to lern more ... I think Ant will create a new process for each. 5 arguments + parallel=true: 5 processes running parallel 5 arguments + parallel=false create process start process wait for process create 2nd process ... wait for 5th process Jan ExecuteOn.runParallel(...) { ... while (stillToDo > 0) { String[] command = getCommandline(cs, cb); exe.setCommandline(command); ... runExecute(exe); stillToDo -= currentAmount; } } ExecTask.runExecute(Execute exe) { if (!spawn) { returnCode = exe.execute(); } else { exe.spawn(); } } Execute.execute() { final Process process = launch(...); ... waitFor(process); // process.waitFor(); ... } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
On 17 February 2006 18:21, [EMAIL PROTECTED] wrote: > >> Really sure? Or is this invoked one _after_ the other? > > > >Pretty sure that is how apply-parallel works. The snippet > >below is !parallel... :) > > mmh :) > Ok, something to lern more ... > > I think Ant will create a new process for each. > 5 arguments + parallel=true: 5 processes running parallel > 5 arguments + parallel=false > create process > start process > wait for process > create 2nd process > ... > wait for 5th process http://ant.apache.org/manual/CoreTasks/apply.html parallel Run the command only once, appending all files as arguments. If false, command will be executed once for every file. maxparallel Limit the amount of parallelism by passing at most this many sourcefiles at once. Set it to <= 0 for unlimited. Since Ant 1.6. Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ant-contrib requires ant.jar but including it breaks javac
I started using foreach from ant-contrib. It seems to require ant.jar to be in classpath. However, when I put it in the classpath, ant cannot compile any java code (I can manually compile of course and it works fine, removing foreach and compiling java code through ant works fine also). CLASSPATH=.;c:\Tools\apache-ant-1.6.5/lib/ant-launcher.jar;c:\Tools\ant- contrib/lib/ant-contrib.jar;c:\Tools\apache-ant-1.6.5/lib/ant.jar PATH=C:\Tools\j2sdk1.4.2_09/bin;c:\Tools\apache-ant-1.6.5/bin; Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: C:\Tools\j2sdk1.4.2_09\jre Detected OS: Windows XP Ant startup: %JAVA_HOME%/bin/java -classpath %CLASSPATH% -Dant.home=%ANT_HOME% org.apache.tools.ant.launch.Launcher -verbose -buildfile %BUILD_FILE% %1 %2 %3 %4 build.xml: Exception with ant.jar in the classpath: build.xml:162: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe lper.java:539) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:3 80) Exception without ant.jar in classpath: build.xml:67: The following error occurred while executing this line: jar:file:/C:/Tools/ant-contrib/lib/ant-contrib.jar!/net/sf/antcontrib/an tlib.xml:3: taskdef A class needed by class net.sf.antcontrib.platform.ShellScriptTask cannot be found: org/apache/tools/ant/taskdefs/ExecTask at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHe lper.java:539) I have a feeling that there is another jar file(s) that I am missing. Any ideas? Thanks, Mehdi Rakhshani
AW: ant-contrib requires ant.jar but including it breaks javac
Just put the ant-contrib in one of the external library directories, e.g. USER_HOME/.ant/lib. Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 17:36 >An: user@ant.apache.org >Betreff: ant-contrib requires ant.jar but including it breaks javac > > > > > >I started using foreach from ant-contrib. It seems to require >ant.jar to be in classpath. However, when I put it in the >classpath, ant cannot compile any java code (I can manually >compile of course and it works fine, removing foreach and >compiling java code through ant works fine also). > > > >CLASSPATH=.;c:\Tools\apache-ant-1.6.5/lib/ant-launcher.jar;c:\T >ools\ant- >contrib/lib/ant-contrib.jar;c:\Tools\apache-ant-1.6.5/lib/ant.jar > >PATH=C:\Tools\j2sdk1.4.2_09/bin;c:\Tools\apache-ant-1.6.5/bin; > >Apache Ant version 1.6.5 compiled on June 2 2005 > >Buildfile: build.xml > >Detected Java version: 1.4 in: C:\Tools\j2sdk1.4.2_09\jre > >Detected OS: Windows XP > > > >Ant startup: > > > >%JAVA_HOME%/bin/java -classpath %CLASSPATH% >-Dant.home=%ANT_HOME% org.apache.tools.ant.launch.Launcher >-verbose -buildfile %BUILD_FILE% %1 >%2 %3 %4 > > > >build.xml: > > > > > > > >Exception with ant.jar in the classpath: > > > >build.xml:162: Unable to find a javac compiler; >com.sun.tools.javac.Main is not on the classpath. > >Perhaps JAVA_HOME does not point to the JDK at >org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >ProjectHe >lper.java:539) at >org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstan >ce.java:3 >80) > > > >Exception without ant.jar in classpath: > > > >build.xml:67: The following error occurred while executing this line: > >jar:file:/C:/Tools/ant-contrib/lib/ant-contrib.jar!/net/sf/antc >ontrib/an >tlib.xml:3: taskdef A class needed by class >net.sf.antcontrib.platform.ShellScriptTask cannot be found: >org/apache/tools/ant/taskdefs/ExecTask at >org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >ProjectHe >lper.java:539) > > > >I have a feeling that there is another jar file(s) that I am missing. >Any ideas? > > > >Thanks, > >Mehdi Rakhshani > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
Can you brief through the basic steps ? I am new to using JMX. Have a nice weekend . Is there any good documentation. Thanks srikrishna -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 11:01 AM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 3:46 pm, [EMAIL PROTECTED] wrote: > Is there a utility which comes with cruise control to trigger the builds > manually through a web interface. Yes. CruiseControl can be managed by a JMX interface, which is included as part of the CC reporting application: http://confluence.public.thoughtworks.org/display/CC/Managing+CruiseCont rol+With+JMX Good luck! -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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]
RE: ant-contrib requires ant.jar but including it breaks javac
By copying ant-contrib.jar to ANT_HOME and removing it (and ant.jar) from classpath the problem went away. Thanks for the suggestion. Any idea why having it the other way causes a problem though? Thanks, Mehdi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 11:39 AM To: user@ant.apache.org Subject: AW: ant-contrib requires ant.jar but including it breaks javac Just put the ant-contrib in one of the external library directories, e.g. USER_HOME/.ant/lib. Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 17:36 >An: user@ant.apache.org >Betreff: ant-contrib requires ant.jar but including it breaks javac > > > > > >I started using foreach from ant-contrib. It seems to require >ant.jar to be in classpath. However, when I put it in the >classpath, ant cannot compile any java code (I can manually >compile of course and it works fine, removing foreach and >compiling java code through ant works fine also). > > > >CLASSPATH=.;c:\Tools\apache-ant-1.6.5/lib/ant-launcher.jar;c:\T >ools\ant- >contrib/lib/ant-contrib.jar;c:\Tools\apache-ant-1.6.5/lib/ant.jar > >PATH=C:\Tools\j2sdk1.4.2_09/bin;c:\Tools\apache-ant-1.6.5/bin; > >Apache Ant version 1.6.5 compiled on June 2 2005 > >Buildfile: build.xml > >Detected Java version: 1.4 in: C:\Tools\j2sdk1.4.2_09\jre > >Detected OS: Windows XP > > > >Ant startup: > > > >%JAVA_HOME%/bin/java -classpath %CLASSPATH% >-Dant.home=%ANT_HOME% org.apache.tools.ant.launch.Launcher >-verbose -buildfile %BUILD_FILE% %1 >%2 %3 %4 > > > >build.xml: > > > > > > > >Exception with ant.jar in the classpath: > > > >build.xml:162: Unable to find a javac compiler; >com.sun.tools.javac.Main is not on the classpath. > >Perhaps JAVA_HOME does not point to the JDK at >org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >ProjectHe >lper.java:539) at >org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstan >ce.java:3 >80) > > > >Exception without ant.jar in classpath: > > > >build.xml:67: The following error occurred while executing this line: > >jar:file:/C:/Tools/ant-contrib/lib/ant-contrib.jar!/net/sf/antc >ontrib/an >tlib.xml:3: taskdef A class needed by class >net.sf.antcontrib.platform.ShellScriptTask cannot be found: >org/apache/tools/ant/taskdefs/ExecTask at >org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >ProjectHe >lper.java:539) > > > >I have a feeling that there is another jar file(s) that I am missing. >Any ideas? > > > >Thanks, > >Mehdi Rakhshani > > - 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]
AW: ant-contrib requires ant.jar but including it breaks javac
The ant-launcher creates its own classpath, after that you have multiple ant.jar (the correct one and the one from CLASSPATH). Maybe that´s why. Jan >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Gesendet: Freitag, 17. Februar 2006 17:56 >An: user@ant.apache.org >Betreff: RE: ant-contrib requires ant.jar but including it breaks javac > > >By copying ant-contrib.jar to ANT_HOME and removing it (and >ant.jar) from classpath the problem went away. Thanks for the >suggestion. > >Any idea why having it the other way causes a problem though? > >Thanks, >Mehdi > >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Friday, February 17, 2006 11:39 AM >To: user@ant.apache.org >Subject: AW: ant-contrib requires ant.jar but including it breaks javac > >Just put the ant-contrib in one of the external library >directories, e.g. USER_HOME/.ant/lib. > >Jan > >>-Ursprüngliche Nachricht- >>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >>Gesendet: Freitag, 17. Februar 2006 17:36 >>An: user@ant.apache.org >>Betreff: ant-contrib requires ant.jar but including it breaks javac >> >> >> >> >> >>I started using foreach from ant-contrib. It seems to require ant.jar >>to be in classpath. However, when I put it in the classpath, >ant cannot >>compile any java code (I can manually compile of course and it works >>fine, removing foreach and compiling java code through ant works fine >>also). >> >> >> >>CLASSPATH=.;c:\Tools\apache-ant-1.6.5/lib/ant-launcher.jar;c:\T >>ools\ant- >>contrib/lib/ant-contrib.jar;c:\Tools\apache-ant-1.6.5/lib/ant.jar >> >>PATH=C:\Tools\j2sdk1.4.2_09/bin;c:\Tools\apache-ant-1.6.5/bin; >> >>Apache Ant version 1.6.5 compiled on June 2 2005 >> >>Buildfile: build.xml >> >>Detected Java version: 1.4 in: C:\Tools\j2sdk1.4.2_09\jre >> >>Detected OS: Windows XP >> >> >> >>Ant startup: >> >> >> >>%JAVA_HOME%/bin/java -classpath %CLASSPATH% -Dant.home=%ANT_HOME% >>org.apache.tools.ant.launch.Launcher >>-verbose -buildfile %BUILD_FILE% %1 >>%2 %3 %4 >> >> >> >>build.xml: >> >> >> >> >> >> >> >>Exception with ant.jar in the classpath: >> >> >> >>build.xml:162: Unable to find a javac compiler; >>com.sun.tools.javac.Main is not on the classpath. >> >>Perhaps JAVA_HOME does not point to the JDK at >>org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >>ProjectHe >>lper.java:539) at >>org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstan >>ce.java:3 >>80) >> >> >> >>Exception without ant.jar in classpath: >> >> >> >>build.xml:67: The following error occurred while executing this line: >> >>jar:file:/C:/Tools/ant-contrib/lib/ant-contrib.jar!/net/sf/antc >>ontrib/an >>tlib.xml:3: taskdef A class needed by class >>net.sf.antcontrib.platform.ShellScriptTask cannot be found: >>org/apache/tools/ant/taskdefs/ExecTask at >>org.apache.tools.ant.ProjectHelper.addLocationToBuildException( >>ProjectHe >>lper.java:539) >> >> >> >>I have a feeling that there is another jar file(s) that I am missing. >>Any ideas? >> >> >> >>Thanks, >> >>Mehdi Rakhshani >> >> > >- >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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
> >http://ant.apache.org/manual/CoreTasks/apply.html > >parallel > Run the command only once, appending all files as arguments. > If false, command will be executed once for every file. Ok, thats written in the manual. But I read the code (which is the only valid source ;-) So: where is my error? Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: AW: AW: AW: AW: how to exec with a set of files as multiple arguments?
The code sez if parallel execute the runParallel() method, which builds a command line out of the maximum # of files available, executes, then repeats until all available files have been exhausted. :) -Matt --- [EMAIL PROTECTED] wrote: > > > >http://ant.apache.org/manual/CoreTasks/apply.html > > > >parallel > > Run the command only once, appending all files as > arguments. > > If false, command will be executed once for every > file. > > > Ok, thats written in the manual. But I read the code > (which is the only > valid source ;-) > > So: where is my error? > > > Jan > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xdoclet for creating taglib in ant?
Offers Ant the possibility to create via xdoclet taglib files, or do I need for this porpuse other external sources? Thanks for any answer best regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
I need to build for multiple projects. Can you share the cruisecontrol.war file. Thanks srikrishna -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 12:23 PM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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]
RE: Regarding Continous build integration.
This topic brings up an interesting issue I am having and maybe the community has the answer. I have a local build for tomcat and our development environment (properties files are the same, information to connect to our databases the same). However, the problem lies with deploying to JBOSS our QA environment and our Websphere QA environment. The wars from the dev build after validated either get moved over and then the QA environment is talking to dev database, or after moving the war, the properties files are migrated over that point to test and the war is rebuilt. (QA is out of my control) I feel there has to be a better way to deploy across application servers and/or at least be able to fun a build for dev, test, and prod that use the appropriate properties files for each environment in the war. Any thoughts? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 1:29 PM To: user@ant.apache.org Subject: RE: Regarding Continous build integration. I need to build for multiple projects. Can you share the cruisecontrol.war file. Thanks srikrishna -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 12:23 PM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trying to escape quote character in define argument for cpptasks
I'm trying to pass in a macro define to the command line to define the level of code being used. Something like gcc -o objname.o source.c -DFIXLVL=\"FEB 17 2006\" the code does something like: static const char mszFixLvl[] = " " __FILE__ " at " FIXLVL " on " __DATE__ " at " __TIME__ " "; so the value of FIXLVL must have quotes at the time preprocessing begins and cannot have been stripped off by ant, cpptasks, or any other thing in between. I'm using cpptasks 1.0b3, ant 1.6.5. I've tried and I've even tried defining the fix level in a property, and then using the property name in the defineset value, but it was too smart for that. How can I force this thing to listen to me? Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can these targets be combined?
I need to execute a single task if a file exists. Here's what I've been able to glean from the Ant manual (which desperately needs an index, BTW): Is there a way to combine these two targets into one? Thanks! -- Ian Pilcher[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can these targets be combined?
Nope...the way you have it written the "standard" ANT way of doing it... now if you want to introduce some behavior defined in the ant-contrib project, particularly the task then you can write it as: - Original Message From: Ian Pilcher <[EMAIL PROTECTED]> To: user@ant.apache.org Sent: Friday, February 17, 2006 4:28:53 PM Subject: Can these targets be combined? I need to execute a single task if a file exists. Here's what I've been able to glean from the Ant manual (which desperately needs an index, BTW): Is there a way to combine these two targets into one? Thanks! -- Ian Pilcher[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Continous build integration.
I have multiple projects for which I want to use cruisecontrol to do builds. What is the best way to configure this.? I have c:\cvssource Checkout/project1 Checkout/project2 Log/project1 Log/project2 Artifact/project1 Artifact/project2 http://localhost:8080/cruisecontrol/buildresults/projec t1" skipusers="false" spamwhilebroken="true"> http://localhost:8080/cruisecontrol/buildresults/projec t2" skipusers="false" spamwhilebroken="true"> -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 12:23 PM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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]
Re: Regarding Continous build integration.
I believe you have sent this email to the wrong mailing list...this the ANT user's mailing. Your question is more directed to the CruiseControl user list ([EMAIL PROTECTED]) Try again, Ninju - Original Message From: [EMAIL PROTECTED] To: user@ant.apache.org Sent: Friday, February 17, 2006 4:52:25 PM Subject: RE: Regarding Continous build integration. I have multiple projects for which I want to use cruisecontrol to do builds. What is the best way to configure this.? I have c:\cvssource Checkout/project1 Checkout/project2 Log/project1 Log/project2 Artifact/project1 Artifact/project2 http://localhost:8080/cruisecontrol/buildresults/projec t1" skipusers="false" spamwhilebroken="true"> http://localhost:8080/cruisecontrol/buildresults/projec t2" skipusers="false" spamwhilebroken="true"> -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 12:23 PM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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]
RE: Regarding Continous build integration.
Do I need to register to send emails to this mailing list.? Thanks srikrishna -Original Message- From: Ninju Bohra [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 5:55 PM To: Ant Users List Subject: Re: Regarding Continous build integration. I believe you have sent this email to the wrong mailing list...this the ANT user's mailing. Your question is more directed to the CruiseControl user list ([EMAIL PROTECTED]) Try again, Ninju - Original Message From: [EMAIL PROTECTED] To: user@ant.apache.org Sent: Friday, February 17, 2006 4:52:25 PM Subject: RE: Regarding Continous build integration. I have multiple projects for which I want to use cruisecontrol to do builds. What is the best way to configure this.? I have c:\cvssource Checkout/project1 Checkout/project2 Log/project1 Log/project2 Artifact/project1 Artifact/project2 http://localhost:8080/cruisecontrol/buildresults/projec t1" skipusers="false" spamwhilebroken="true"> http://localhost:8080/cruisecontrol/buildresults/projec t2" skipusers="false" spamwhilebroken="true"> -Original Message- From: Joe Schmetzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 12:23 PM To: Ant Users List Cc: user@ant.apache.org; [EMAIL PROTECTED] Subject: RE: Regarding Continous build integration. On Fri, 17 February, 2006 4:49 pm, [EMAIL PROTECTED] wrote: > Can you brief through the basic steps ? I am new to using JMX. > Have a nice weekend . I think you will need to read through the documentation at http://cruisecontrol.sourceforge.net/ and the CC wiki. If you have futher problems, you can try the CC mailing list at http://cruisecontrol.sourceforge.net/contact.html, as this obviously not an ant related question. Cheers, -- Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]