Newbie question, error fetching dependences
Hi, When I try to fetch the dependences with ant -f fetch.xml -Ddest=system I get the following error: ... jspc: [artifact:dependencies] Downloading: tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.pom [artifact:dependencies] [WARNING] Unable to get resource from repository remote (http://repo1.maven.org/maven2/) [artifact:dependencies] Downloading: tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.pom [artifact:dependencies] [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) [artifact:dependencies] Downloading: tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.pom [artifact:dependencies] [WARNING] Unable to get resource from repository remote (http://repo1.maven.org/maven2/) [artifact:dependencies] Downloading: tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.pom [artifact:dependencies] [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) all: BUILD SUCCESSFUL Total time: 7 seconds So I guess that jspc is not installed. I'm not under a proxy, an I don't know where is the problem. I'm afraid that this question is already answered, I googled it and I didn't find any answer :( - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: Newbie question, error fetching dependences
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22tomcat%22%20AND%20a%3A%22jasper-compiler%22 There is no POM for version 4.1.36 On Mon, Jun 6, 2011 at 11:50 AM, Fabio Souto wrote: > Hi, > > When I try to fetch the dependences with ant -f fetch.xml -Ddest=system I get > the following error: > ... > jspc: > [artifact:dependencies] Downloading: > tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.pom > [artifact:dependencies] [WARNING] Unable to get resource from repository > remote (http://repo1.maven.org/maven2/) > [artifact:dependencies] Downloading: > tomcat/jasper-compiler/4.1.36/jasper-compiler-4.1.36.pom > [artifact:dependencies] [WARNING] Unable to get resource from repository > central (http://repo1.maven.org/maven2) > [artifact:dependencies] Downloading: > tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.pom > [artifact:dependencies] [WARNING] Unable to get resource from repository > remote (http://repo1.maven.org/maven2/) > [artifact:dependencies] Downloading: > tomcat/jasper-runtime/4.1.36/jasper-runtime-4.1.36.pom > [artifact:dependencies] [WARNING] Unable to get resource from repository > central (http://repo1.maven.org/maven2) > > all: > > BUILD SUCCESSFUL > Total time: 7 seconds > > > So I guess that jspc is not installed. I'm not under a proxy, an I don't know > where is the problem. > I'm afraid that this question is already answered, I googled it and I didn't > find any answer :( > - > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > -- Wolfgang Häfelinger häfelinger IT - Applied Information Technology http://www.haefelinger.it - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Travel Assistance applications open for ApacheCon North America 2011
The Apache Software Foundation (ASF)'s Travel Assistance Committee (TAC) is now accepting applications for ApacheCon North America 2011, 7-11 November in Vancouver BC, Canada. The TAC is seeking individuals from the Apache community at-large --users, developers, educators, students, Committers, and Members-- who would like to attend ApacheCon, but need some financial support in order to be able to get there. There are limited places available, and all applicants will be scored on their individual merit. Financial assistance is available to cover flights/trains, accommodation and entrance fees either in part or in full, depending on circumstances. However, the support available for those attending only the BarCamp (7-8 November) is less than that for those attending the entire event (Conference + BarCamp 7-11 November). The Travel Assistance Committee aims to support all official ASF events, including cross-project activities; as such, it may be prudent for those in Asia and Europe to wait for an event geographically closer to them. More information can be found at http://www.apache.org/travel/index.html including a link to the online application and detailed instructions for submitting. Applications will close on 8 July 2011 at 22:00 BST (UTC/GMT +1). We wish good luck to all those who will apply, and thank you in advance for tweeting, blogging, and otherwise spreading the word. Regards, The Travel Assistance Committee - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
Re: IvyDE Workspace Resolver
Hi Since my previous post, I added javadoc artefact publication, which works fine if calling ivy from ANT (after some tweaking of deliver/publish). But now the WorkspaceResolver is lost again, and my only solution to stop it complaining is to disable version checking in the global IvyDE preferences. However this is only a workaround. Now I would like to debug IvyDE to understand what happen. How do you setup Eclipse to debug the resolve step of IvyDE ? Regards -- View this message in context: http://old.nabble.com/IvyDE-Workspace-Resolver-tp31425340p31784151.html Sent from the ivy-user mailing list archive at Nabble.com.
verifying encoding value using xmlvalidate task
Hi, I am working on a task which can verify xml encoding value. All xml files in the project should be verified. It would be great if someone can point me in the right direction. The line in the xml file which needs to be verified is Thanks Nick
How change variable based on environment variable value
Hi, Below is xml from my build.xml file. I'm trying to set a property value based on the condition that the build.xml file is being run on the build box. I created a system variable and set it to true on a Win XP SP3 build system. I tested this part of the xml and the code " ${env.BUILD_BOX}" works and returns the correct value of "True" for the variable "${env.BUILD_BOX}". The problem is the second target "setJOF" is not setting the "JOF" property value to "F:/Inetpub/wwwroot/wo30". The xml "${JOF}" returns no value. In a nutshell I'm trying to do is check if the buld.xml is running on the buildbox (not a developers box). If it's running on the buildbox change the value of a property to a path unique to the buildbox which overrides the path property value in the build.user.properties file. If it's not running on the buildbox use the value of the property set in the build.user.properties file. Any help on this would be greatly appreciated. Thanks, BPM Build.xml : ${env.BUILD_BOX} ${JOF} build.userproperties: JOF=C:/Inetpub/wwwroot/wo30
Re: How change variable based on environment variable value
Any chance we can see the complete build.xml? On Mon, 6 Jun 2011, Brian McCann wrote: Hi, Below is xml from my build.xml file. I'm trying to set a property value based on the condition that the build.xml file is being run on the build box. I created a system variable and set it to true on a Win XP SP3 build system. I tested this part of the xml and the code " ${env.BUILD_BOX}" works and returns the correct value of "True" for the variable "${env.BUILD_BOX}". The problem is the second target "setJOF" is not setting the "JOF" property value to "F:/Inetpub/wwwroot/wo30". The xml "${JOF}" returns no value. In a nutshell I'm trying to do is check if the buld.xml is running on the buildbox (not a developers box). If it's running on the buildbox change the value of a property to a path unique to the buildbox which overrides the path property value in the build.user.properties file. If it's not running on the buildbox use the value of the property set in the build.user.properties file. Any help on this would be greatly appreciated. Thanks, BPM Build.xml : ${env.BUILD_BOX} ${JOF} build.userproperties: JOF=C:/Inetpub/wwwroot/wo30 Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
Hi, This is the complete build.xml file. Thanks, BPM == ${env.BUILD_BOX} ${JOF} == -Original Message- From: Scot P. Floess [mailto:sflo...@nc.rr.com] Sent: Monday, June 06, 2011 12:09 PM To: Ant Users List Subject: Re: How change variable based on environment variable value Any chance we can see the complete build.xml? On Mon, 6 Jun 2011, Brian McCann wrote: > Hi, > Below is xml from my build.xml file. I'm trying to set a property value > based on the condition > that the build.xml file is being run on the build box. I created a system > variable and set it to true on a Win XP SP3 build system. > I tested this part of the xml and the code " ${env.BUILD_BOX}" > works and returns the correct value of "True" > for the variable "${env.BUILD_BOX}". The problem is the second target > "setJOF" is not setting the "JOF" property value to > "F:/Inetpub/wwwroot/wo30". > The xml "${JOF}" returns no value. > > In a nutshell I'm trying to do is check if the buld.xml is running on the > buildbox (not a developers box). If it's running on the buildbox change the > value of a property to > a path unique to the buildbox which overrides the path property value in the > build.user.properties file. If it's not running on the buildbox use the > value of the > property set in the build.user.properties file. > > Any help on this would be greatly appreciated. > Thanks, > > BPM > > Build.xml : > > > > > > > > environment="env"/> > > value="${env.BUILD_BOX}"/> > > > ${env.BUILD_BOX} > > > > > > > > > >${JOF} > > > > > > build.userproperties: > JOF=C:/Inetpub/wwwroot/wo30 > > > > Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
Hi Brian, Try this code. Note: you can't put the default value of JOF into a file that will be loaded automatically when ant is run, such as (home)/.antrc, as that would set JOF before your code executes. First set works, last set fails. On the other hand, you could set "JOF_default" in a properties file that is loaded before this code is run, then have an "else" clause in your condition to use it when BUILD_BOX is not set in your environment: Rob simplified code -- BUILD_BOX = ${env.BUILD_BOX} JOF = ${JOF} After Property file, JOF = ${JOF} output of test run - no build-run - C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX= C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>echo %BUILD_BOX% %BUILD_BOX% C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>ant -f jof-test.xml Buildfile: C:\Documents and Settings\rechlin\My Documents\test\TEST-ant\jof-test.xml setJOF: [echo] BUILD_BOX = ${env.BUILD_BOX} [echo] JOF = ${JOF} [echo] After Property file, JOF = C:/Inetpub/wwwroot/wo30 BUILD SUCCESSFUL Total time: 0 seconds output of test run with BUILD_RUN set in the environment - C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX=true C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>echo %BUILD_BOX% true C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>ant -f jof-test.xml Buildfile: C:\Documents and Settings\rechlin\My Documents\test\TEST-ant\jof-test.xml setJOF: [echo] BUILD_BOX = true [echo] JOF = F:/Inetpub/wwwroot/wo30 [echo] After Property file, JOF = F:/Inetpub/wwwroot/wo30 BUILD SUCCESSFUL Total time: 0 seconds -- - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
I don't see how either target checkbuildbox nor setJOF is called... Your default target is set to "build" - how are you executing when you run ant? I'd like to see your depends, etc... On Mon, 6 Jun 2011, Brian McCann wrote: Hi, This is the complete build.xml file. Thanks, BPM == ${env.BUILD_BOX} ${JOF} == -Original Message- From: Scot P. Floess [mailto:sflo...@nc.rr.com] Sent: Monday, June 06, 2011 12:09 PM To: Ant Users List Subject: Re: How change variable based on environment variable value Any chance we can see the complete build.xml? On Mon, 6 Jun 2011, Brian McCann wrote: Hi, Below is xml from my build.xml file. I'm trying to set a property value based on the condition that the build.xml file is being run on the build box. I created a system variable and set it to true on a Win XP SP3 build system. I tested this part of the xml and the code " ${env.BUILD_BOX}" works and returns the correct value of "True" for the variable "${env.BUILD_BOX}". The problem is the second target "setJOF" is not setting the "JOF" property value to "F:/Inetpub/wwwroot/wo30". The xml "${JOF}" returns no value. In a nutshell I'm trying to do is check if the buld.xml is running on the buildbox (not a developers box). If it's running on the buildbox change the value of a property to a path unique to the buildbox which overrides the path property value in the build.user.properties file. If it's not running on the buildbox use the value of the property set in the build.user.properties file. Any help on this would be greatly appreciated. Thanks, BPM Build.xml : ${env.BUILD_BOX} ${JOF} build.userproperties: JOF=C:/Inetpub/wwwroot/wo30 Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
Hi Robert, couple questions to make sure I'm following you right. 1. I'm currently setting the value of JOF in the build.userproperties file to " JOF=C:/Inetpub/wwwroot/wo30" and even if I try to run a conditional in the build.xml file < property name="JOF" value="F:/Inetpub/wwwroot/wo30"/> The value of JOF gets set in stone when build.xml runs? Build.properties files always override build.xml? 2. Since I already have a file build.user.properties I could just set the default value of JOF path in that file like which would be the state that the build file is not being run on the build box? so your code would look like: BUILD_BOX = ${env.BUILD_BOX} JOF = ${JOF} After Property file, JOF = ${JOF} Thanks, BPM -Original Message- From: Echlin, Robert [mailto:robert.ech...@windriver.com] Sent: Monday, June 06, 2011 12:46 PM To: Ant Users List Subject: RE: How change variable based on environment variable value Hi Brian, Try this code. Note: you can't put the default value of JOF into a file that will be loaded automatically when ant is run, such as (home)/.antrc, as that would set JOF before your code executes. First set works, last set fails. On the other hand, you could set "JOF_default" in a properties file that is loaded before this code is run, then have an "else" clause in your condition to use it when BUILD_BOX is not set in your environment: Rob simplified code -- BUILD_BOX = ${env.BUILD_BOX} JOF = ${JOF} After Property file, JOF = ${JOF} output of test run - no build-run - C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX= C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>echo %BUILD_BOX% %BUILD_BOX% C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>ant -f jof-test.xml Buildfile: C:\Documents and Settings\rechlin\My Documents\test\TEST-ant\jof-test.xml setJOF: [echo] BUILD_BOX = ${env.BUILD_BOX} [echo] JOF = ${JOF} [echo] After Property file, JOF = C:/Inetpub/wwwroot/wo30 BUILD SUCCESSFUL Total time: 0 seconds output of test run with BUILD_RUN set in the environment - C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX=true C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>echo %BUILD_BOX% true C:\Documents and Settings\rechlin\My Documents\test\TEST-ant>ant -f jof-test.xml Buildfile: C:\Documents and Settings\rechlin\My Documents\test\TEST-ant\jof-test.xml setJOF: [echo] BUILD_BOX = true [echo] JOF = F:/Inetpub/wwwroot/wo30 [echo] After Property file, JOF = F:/Inetpub/wwwroot/wo30 BUILD SUCCESSFUL Total time: 0 seconds -- - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
Hi Scott, Thanks for pointing that out I've been calling the targets manually on the commandline. even if I got them to work the build file would still have failed due to no depends Thanks, BPM -Original Message- From: Scot P. Floess [mailto:sflo...@nc.rr.com] Sent: Monday, June 06, 2011 12:47 PM To: Brian McCann Cc: 'Ant Users List' Subject: RE: How change variable based on environment variable value I don't see how either target checkbuildbox nor setJOF is called... Your default target is set to "build" - how are you executing when you run ant? I'd like to see your depends, etc... On Mon, 6 Jun 2011, Brian McCann wrote: > Hi, > This is the complete build.xml file. > > Thanks, > BPM > == > > > > > > > > > > > > ${env.BUILD_BOX} > > > > >${JOF} > > > > > > > == > > -Original Message- > From: Scot P. Floess [mailto:sflo...@nc.rr.com] > Sent: Monday, June 06, 2011 12:09 PM > To: Ant Users List > Subject: Re: How change variable based on environment variable value > > > Any chance we can see the complete build.xml? > > On Mon, 6 Jun 2011, Brian McCann wrote: > >> Hi, >> Below is xml from my build.xml file. I'm trying to set a property value >> based on the condition >> that the build.xml file is being run on the build box. I created a system >> variable and set it to true on a Win XP SP3 build system. >> I tested this part of the xml and the code " > ${env.BUILD_BOX}" >> works and returns the correct value of "True" >> for the variable "${env.BUILD_BOX}". The problem is the second target >> "setJOF" is not setting the "JOF" property value to >> "F:/Inetpub/wwwroot/wo30". >> The xml "${JOF}" returns no value. >> >> In a nutshell I'm trying to do is check if the buld.xml is running on the >> buildbox (not a developers box). If it's running on the buildbox change > the >> value of a property to >> a path unique to the buildbox which overrides the path property value in > the >> build.user.properties file. If it's not running on the buildbox use the >> value of the >> property set in the build.user.properties file. >> >> Any help on this would be greatly appreciated. >> Thanks, >> >> BPM >> >> Build.xml : >> >> >> >> >> >> >> >>> environment="env"/> >> >>> value="${env.BUILD_BOX}"/> >> >> >> ${env.BUILD_BOX} >> >> >> >> >> >> >> >> >> >>${JOF} >> >> >> >> >> >> build.userproperties: >> JOF=C:/Inetpub/wwwroot/wo30 >> >> >> >> > > Scot P. Floess RHCT (Certificate Number 605010084735240) > Chief Architect FlossWare http://sourceforge.net/projects/flossware >http://flossware.sourceforge.net >https://github.com/organizations/FlossWare > > - > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org
RE: How change variable based on environment variable value
Many thanks for your help :) BPM -Original Message- From: Echlin, Robert [mailto:robert.ech...@windriver.com] Sent: Monday, June 06, 2011 1:51 PM To: Brian McCann Subject: RE: How change variable based on environment variable value > -Original Message- > From: Brian McCann [mailto:bmccan...@comcast.net] > Sent: Monday, June 06, 2011 1:34 PM > To: 'Ant Users List' > Cc: Echlin, Robert > Subject: RE: How change variable based on environment variable value > > Hi Robert, > > couple questions to make sure I'm following you right. > > 1. I'm currently setting the value of JOF in the > build.userproperties file to " JOF=C:/Inetpub/wwwroot/wo30" > and even if I try to run a conditional in the build.xml file > < property name="JOF" value="F:/Inetpub/wwwroot/wo30"/> The > value of JOF gets set in stone when build.xml runs? > Build.properties files always override build.xml? Whatever gets set first stays set. Properties are immutable. > > > 2. Since I already have a file build.user.properties I could > just set the default value of JOF path in that file like > value="C:/Inetpub/wwwroot/wo30"/> which would be the state > that the build file is not being run on the build box? No, a properties file is not an XML file. The "build.user.properties" file would look like: two samples --- # Set JOF for my computer JOF=C:/Inetpub/wwwroot/wo30 -- OR -- # Set values for my computer JOF = C:/Inetpub/wwwroot/wo30 Princelieness = 100 --- end samples -- Notes about propertye files: - Space around the "=" is ignored - comment lines start with # > > so your code would look like: > > > > > > BUILD_BOX = ${env.BUILD_BOX} > > > > JOF = ${JOF} > > > After Property file, JOF = ${JOF} > > > Yuppers, you got it. This would load the build.user.properties file after the check for the BUILD_BOX variable. However, I would put this code VERY close to the top of the build.xml file, so that when you set other properties there, they are available early. And of course, if you want to override them, you need to do that before the properties are loaded from the local users file. :-) Anyway, you can use the pattern of setting the variable names to a "default" or "local" property name in the file, and then set the correct one before you use it, taking into account other info like the "BUILD_BOX" environment variable. Rob > > Thanks, > BPM > > > -Original Message- > From: Echlin, Robert [mailto:robert.ech...@windriver.com] > Sent: Monday, June 06, 2011 12:46 PM > To: Ant Users List > Subject: RE: How change variable based on environment variable value > > Hi Brian, > Try this code. > Note: you can't put the default value of JOF into a file that > will be loaded automatically when ant is run, such as > (home)/.antrc, as that would set JOF before your code > executes. First set works, last set fails. > > On the other hand, you could set "JOF_default" in a > properties file that is loaded before this code is run, then > have an "else" clause in your condition to use it when > BUILD_BOX is not set in your environment: >else="${JOF_default}"> > > Rob > > simplified code -- > > > > > BUILD_BOX = ${env.BUILD_BOX} > > > > JOF = ${JOF} > > > After Property file, JOF = ${JOF} > > > > output of test run - no build-run - > C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant>set BUILD_BOX= > > C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant>echo %BUILD_BOX% %BUILD_BOX% > > C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant>ant -f jof-test.xml > Buildfile: C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant\jof-test.xml > > setJOF: > [echo] BUILD_BOX = ${env.BUILD_BOX} > [echo] JOF = ${JOF} > [echo] After Property file, JOF = C:/Inetpub/wwwroot/wo30 > > BUILD SUCCESSFUL > Total time: 0 seconds > output of test run with BUILD_RUN > set in the environment - C:\Documents and > Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX=true > > C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant>echo %BUILD_BOX% true > > C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant>ant -f jof-test.xml > Buildfile: C:\Documents and Settings\rechlin\My > Documents\test\TEST-ant\jof-test.xml > > setJOF: > [echo] BUILD_BOX = true > [echo] JOF = F:/Inetpub/wwwroot/wo30 > [echo] After Property file, JOF = F:/Inetpub/wwwroot/wo30 > > BUILD SUCCESSFUL > Total time: 0 seconds > -- > > - > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For > additional commands, e-mail: user-h...@ant.apache.org > > = - To unsubscribe,
RE: How change variable based on environment variable value
Thanks for helping with this issue BPM -Original Message- From: Scot P. Floess [mailto:sflo...@nc.rr.com] Sent: Monday, June 06, 2011 1:58 PM To: Brian McCann Subject: RE: How change variable based on environment variable value Sorry, that should be: ... On Mon, 6 Jun 2011, Scot P. Floess wrote: > > What about something like this: > > > > > > > > > > > ${JOF} > > > > > > > > In Linux, I ran this and it worked... > > Pre-setting the environment variable BUILD_BOX: > > Buildfile: /home/sfloess/development/tmp/ant/build.xml > > setJOF: > > BUILD SUCCESSFUL > Total time: 0 seconds > > > > Now setting the environment variable BUILD_BOX: > > export BUILD_BOX=foo > > [sfloess @ fedora-workstation] /home/sfloess/development/tmp/ant> ant > Buildfile: /home/sfloess/development/tmp/ant/build.xml > > setJOF: > [echo] F:/Inetpub/wwwroot/wo30 > > BUILD SUCCESSFUL > Total time: 0 seconds > > > You definitely had one issue - in your "if" attribute you need to denote the > property name if its set (not the value of the property)... > > > > > On Mon, 6 Jun 2011, Brian McCann wrote: > >> Hi Scott, >> >> Thanks for pointing that out I've been calling the targets manually on the >> commandline. >> even if I got them to work the build file would still have failed due to no >> depends >> Thanks, >> BPM >> >> -Original Message- >> From: Scot P. Floess [mailto:sflo...@nc.rr.com] >> Sent: Monday, June 06, 2011 12:47 PM >> To: Brian McCann >> Cc: 'Ant Users List' >> Subject: RE: How change variable based on environment variable value >> >> >> I don't see how either target checkbuildbox nor setJOF is called... Your >> default target is set to "build" - how are you executing when you run ant? >> >> I'd like to see your depends, etc... >> >> >> On Mon, 6 Jun 2011, Brian McCann wrote: >> >>> Hi, >>> This is the complete build.xml file. >>> >>> Thanks, >>> BPM >>> == >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ${env.BUILD_BOX} >>> >>> >>> >>> >>>${JOF} >>> >>> >>> >>> >>> >>> >>> == >>> >>> -Original Message- >>> From: Scot P. Floess [mailto:sflo...@nc.rr.com] >>> Sent: Monday, June 06, 2011 12:09 PM >>> To: Ant Users List >>> Subject: Re: How change variable based on environment variable value >>> >>> >>> Any chance we can see the complete build.xml? >>> >>> On Mon, 6 Jun 2011, Brian McCann wrote: >>> Hi, Below is xml from my build.xml file. I'm trying to set a property value based on the condition that the build.xml file is being run on the build box. I created a system variable and set it to true on a Win XP SP3 build system. I tested this part of the xml and the code " >>> ${env.BUILD_BOX}" works and returns the correct value of "True" for the variable "${env.BUILD_BOX}". The problem is the second target "setJOF" is not setting the "JOF" property value to "F:/Inetpub/wwwroot/wo30". The xml "${JOF}" returns no value. In a nutshell I'm trying to do is check if the buld.xml is running on the buildbox (not a developers box). If it's running on the buildbox change >>> the value of a property to a path unique to the buildbox which overrides the path property value in >>> the build.user.properties file. If it's not running on the buildbox use the value of the property set in the build.user.properties file. Any help on this would be greatly appreciated. Thanks, BPM Build.xml : >>> environment="env"/> >>> value="${env.BUILD_BOX}"/> ${env.BUILD_BOX} ${JOF} build.userproperties: JOF=C:/Inetpub/wwwroot/wo30 >>> >>> Scot P. Floess RHCT (Certificate Number 605010084735240) >>> Chief Architect FlossWare http://sourceforge.net/projects/flossware >>>http://flossware.sourceforge.net >>>https://github.com/organizations/FlossWare >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >>> For additional commands, e-mail: user-h...@ant.apache.org >>> >>> >> >> Scot P. Floess RHCT (Certificate Number 605010084735240) >> Chief Architect FlossWare http://sourceforge.net/projects/flossware >>
RE: How change variable based on environment variable value
Thanks for your question, Brian, I didn't know about the "else" parameter on before I checked that out. I generally learn from helping others. :-) Rob > -Original Message- > From: Brian McCann [mailto:bmccan...@comcast.net] > Sent: Monday, June 06, 2011 3:02 PM > To: user@ant.apache.org > Cc: Echlin, Robert > Subject: RE: How change variable based on environment variable value > > Many thanks for your help :) > BPM > > -Original Message- > From: Echlin, Robert [mailto:robert.ech...@windriver.com] > Sent: Monday, June 06, 2011 1:51 PM > To: Brian McCann > Subject: RE: How change variable based on environment variable value > > > > -Original Message- > > From: Brian McCann [mailto:bmccan...@comcast.net] > > Sent: Monday, June 06, 2011 1:34 PM > > To: 'Ant Users List' > > Cc: Echlin, Robert > > Subject: RE: How change variable based on environment variable value > > > > Hi Robert, > > > > couple questions to make sure I'm following you right. > > > > 1. I'm currently setting the value of JOF in the > > build.userproperties file to " JOF=C:/Inetpub/wwwroot/wo30" > > and even if I try to run a conditional in the build.xml file > > < property name="JOF" value="F:/Inetpub/wwwroot/wo30"/> The > > value of JOF gets set in stone when build.xml runs? > > Build.properties files always override build.xml? > > Whatever gets set first stays set. Properties are immutable. > > > > > > > 2. Since I already have a file build.user.properties I could > > just set the default value of JOF path in that file like > > > value="C:/Inetpub/wwwroot/wo30"/> which would be the state > > that the build file is not being run on the build box? > > No, a properties file is not an XML file. > The "build.user.properties" file would look like: > two samples --- > # Set JOF for my computer > JOF=C:/Inetpub/wwwroot/wo30 > > -- OR -- > # Set values for my computer > JOF = C:/Inetpub/wwwroot/wo30 > Princelieness = 100 > > --- end samples -- > Notes about propertye files: > - Space around the "=" is ignored > - comment lines start with # > > > > > > so your code would look like: > > > > > > > > > > > > BUILD_BOX = ${env.BUILD_BOX} > > > > > > > > JOF = ${JOF} > > > > > > After Property file, JOF = ${JOF} > > > > > > > > Yuppers, you got it. > This would load the build.user.properties file after the check for the > BUILD_BOX variable. > > However, I would put this code VERY close to the top of the > build.xml file, > so that when you set other properties there, they are available early. > And of course, if you want to override them, you need to do > that before the > properties are loaded from the local users file. > :-) > > Anyway, you can use the pattern of setting the variable names > to a "default" > or "local" property name in the file, and then set the > correct one before > you use it, taking into account other info like the > "BUILD_BOX" environment > variable. > > Rob > > > > > Thanks, > > BPM > > > > > > -Original Message- > > From: Echlin, Robert [mailto:robert.ech...@windriver.com] > > Sent: Monday, June 06, 2011 12:46 PM > > To: Ant Users List > > Subject: RE: How change variable based on environment variable value > > > > Hi Brian, > > Try this code. > > Note: you can't put the default value of JOF into a file that > > will be loaded automatically when ant is run, such as > > (home)/.antrc, as that would set JOF before your code > > executes. First set works, last set fails. > > > > On the other hand, you could set "JOF_default" in a > > properties file that is loaded before this code is run, then > > have an "else" clause in your condition to use it when > > BUILD_BOX is not set in your environment: > >> else="${JOF_default}"> > > > > Rob > > > > simplified code -- > > > > > > > > > > BUILD_BOX = ${env.BUILD_BOX} > > > > > > > > JOF = ${JOF} > > > > > > After Property file, JOF = ${JOF} > > > > > > > > output of test run - no build-run - > > C:\Documents and Settings\rechlin\My > > Documents\test\TEST-ant>set BUILD_BOX= > > > > C:\Documents and Settings\rechlin\My > > Documents\test\TEST-ant>echo %BUILD_BOX% %BUILD_BOX% > > > > C:\Documents and Settings\rechlin\My > > Documents\test\TEST-ant>ant -f jof-test.xml > > Buildfile: C:\Documents and Settings\rechlin\My > > Documents\test\TEST-ant\jof-test.xml > > > > setJOF: > > [echo] BUILD_BOX = ${env.BUILD_BOX} > > [echo] JOF = ${JOF} > > [echo] After Property file, JOF = C:/Inetpub/wwwroot/wo30 > > > > BUILD SUCCESSFUL > > Total time: 0 seconds > > output of test run with BUILD_RUN > > set in the environment - C:\Documents and > > Settings\rechlin\My Documents\test\TEST-ant>set BUILD_BOX=true > > > > C:\Documents and Settings\rechlin\My > > Documents\test\TEST-ant>echo %BUILD_
Re: verifying encoding value using xmlvalidate task
Hi Dominic. I'm no ant expert, but just trying to understand the requirement. If you intent to check presence of encoding value in XML files ? Or is your intent to validate the XML files using the encoding ? Thanks in advance, Parag Doke Save paper, save trees. Do not print emails/documents unless absolutely necessary. On Mon, Jun 6, 2011 at 8:38 PM, dominic Tippabattuni wrote: > Hi, > > I am working on a task which can verify xml encoding value. All xml files in > the project should be verified. > It would be great if someone can point me in the right direction. > > The line in the xml file which needs to be verified is > > > Thanks > Nick > - To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org