|
|
|
Hi Jason,
Thanks for looking into this. The reason I need to add the ant jars is because Weblogic ships it's own version of ant, so I have to make sure my ant jars are in front of the classpath. I hope you'll be able to find out what's wrong. Let me know if you need more information! Hi Ruben,
I am having trouble reproducing the issue. Here is my setup: 1) I did a clean Pulse 1.2.38 install, which auto-detected an ant resource for my version of ant (1.7.0) 2) I added an ant project with the single defalt build spec. 3) I added a property to the build specification named "CLASSPATH" with value: ${env.ANT_HOME}\\ant.jar;${env.BEA_HOME}\\weblogic81\\server\\lib\\weblogic.jar I checked both the "add to environment" and "resolve variables" boxes. 4) When I trigger a build, the value of CLASSPATH in env.txt is as expected. I assume there is something different with my setup? Hi Jason,
We're using ant 1.6.5, but I reproduced it with 1.7. I had to delete the 1.6.5 resource to get Pulse to use 1.7, adding it as a resource on the build specification didn't help. I haven't defined ANT_HOME in my environment, maybe you have? This is from my env.txt: Command Line: 2 ------------- 3 D:\apache-ant-1.7.0\bin\ant.bat -f build.xml 4 5 Process Environment: 6 -------------------- 7 =C:=C:\Program Files\Zutubi\Pulse Server\bin 8 ALLUSERSPROFILE=C:\Documents and Settings\All Users 9 ANT_HOME=D:\apache-ant-1.7.0 10 ANT_OPTS=-Xmx1024m -Xms512m 11 APPDATA=C:\Documents and Settings\srv_etwbea\Application Data 12 APR_ICONV_PATH=C:\Program Files\Subversion\iconv 13 BEA_HOME=d:\bea8 14 BEA_VERSION=8.1 15 CLASSPATH=${env.ANT_HOME}\lib\ant.jar;d:\bea8\weblogic81\server\lib\weblogic.jar;E:\buildserver\recipes\2129931\base\common\classes;E:\buildserver\recipes\2129931\base\lib\all_3rdparty.jar Regards, Ruben Hi Ruben,
Thanks for the further details. I did indeed have ANT_HOME in my environment, which exlains the difference. The issue here is the order in which the properties are introduced into the build. At the moment the required resources are imported after the properties defined on the buil specification. This seems backward, as the properties defined closer to the build (i.e. those on the spec) should be introduced later. I will change this for the 1.2.39 release. Also, note that you do not need to use the env. prefix to reference a property defined on your resource. This prefix is only really needed to reference the environment defined outside of Pulse. Lastly, you should be able to have two versions of the ant resource defined, but an Ant command will always pull in the default version of the resource. This may be why adding 1.7.0 did not work for you. You can control this by either changing the default ant version or converting to a custom project and editing the <resource> tag to pull in the desired version. Hi Jason,
> Thanks for the further details. I did indeed have ANT_HOME in my environment, which exlains the difference. The issue here is the order in which > the properties are introduced into the build. At the moment the required resources are imported after the properties defined on the buil specification. > This seems backward, as the properties defined closer to the build (i.e. those on the spec) should be introduced later. > I will change this for the 1.2.39 release. Wow, glad you've found it. Thanks! > Also, note that you do not need to use the env. prefix to reference a property defined on your resource. > This prefix is only really needed to reference the environment defined outside of Pulse. Ah, thats works indeed, great tip. > Lastly, you should be able to have two versions of the ant resource defined, but an Ant command will always pull in the default version of the resource. > This may be why adding 1.7.0 did not work for you. You can control this by either changing the default ant version > or converting to a custom project and editing the <resource> tag to pull in the desired version. Switching the default helps, but that switches the ant version globally. I have different specs that need to build with different versions of ant (don't ask ;-) If I understand you correctly, I'd have to convert to custom projects. Does this mean that adding a specific ant resource version to a spec has no effect? Cheers, Ruben Hi Ruben,
That is right, you would need a custom project. Adding a specific resource to the specs will not help as an ant project pulls in the resource even deeper, within the Pulse file itself, so it would override your resource. The easiest thing to do is probably to convert to custom and remove the <resource> tag. Then you can add the specific resource versions to each of your specs. |
||||||||||||||||||||||||||||||||||||||||||||||
Thanks for the report. My first guess is that there may be a timing/ordering issue that means these variables are resolved prior to the env.* variables being defined. I will take a look and get back to you!