1

I've got a problem which I couldn't solve for a few days, please help me.

I'd like to execute an ant-script within netbeans. the script needs a special classpath which a plugin/module made by myself puts into a "global-variable". The variable can be shown using the netbeans "Manage variables"-dialog. So it's working, I guess

Then I've tried to run the ant-script with: "run Target/advanced" and set the property to: enhanceClassPath=${MAG} (${MAG} contains the special classpah..)

Unfortunately the script contains in the property 'enhanceClassPath' still the value '${MAG}' instead the variable value..

I've got a working and simular example in eclipse, but hadn't any luck with netbeans, I guess the main problem is that netbeans doesn't support variables..

greez Chris

James McMahon
  • 48,506
  • 64
  • 207
  • 283

1 Answers1

1

you can use your IDE variable MAG in your ant script via ${var.MAG}. don't assign it to a custom property (enhanceClassPath).

ax.
  • 58,560
  • 8
  • 81
  • 72
  • Could you be more specific, please? I've set in NB a GlobalProperty called "var.MAG". Then I tried to access it in the ant script with but the value of cp is still not resolved.. –  Sep 03 '09 at 15:30
  • Ok thanks. But it didn't work.. not as custom property neither directly in ant.. Do you have any other ideas? –  Sep 03 '09 at 15:55
  • it works for me - when i debug my (netbeans managed) ant script, i can see var.MAG in the debugger variables window. http://wiki.netbeans.org/IDEVariables says: Variables are stored in build.properties in user directory and in properties file they are prefixed with "var." build.properties is automatically loaded in a netbeans managed ant script via . if your ant script is *not* managed by nb, you have to include "${netbeans.user}/build.properties" yourself - look into nbproject/build-impl.xml for how to. – ax. Sep 03 '09 at 16:30
  • Ah.. now I understand! Thanks a lot, I do really recognize your help!! –  Sep 04 '09 at 06:10
  • if you recognize my help, you could consider accepting my answer. thanks! – ax. Sep 11 '09 at 17:24