K2J
K2J

Reputation: 2643

Build file and Ant Targets from Project Menu in Netbeans (6.7)

I've recently started using netbeans for a few hobby projects. I've come from a JDeveloper background and I'm used to been able to see my ant build file from the project explorer window.

In JDeveloper this has the advantage of allowing you to right click on it, allow easy edits, or run a required target when you want to.

The only way I can seem to do this in netbeans is to open up the build.xml file, right click and select my target and run it.

Hope everyone is still with me.

I guess the build, compile, test, clean options you get in the project menu when you right click on a project are wired automagically to the ant targets. But I tried to create a new target and see if it was displayed in the normal project menu, and its not.

Does anyone know why Netbeans doesn't include the build.xml file in the project structure or whether it can be included in the project explorer display easily.

Kris

Upvotes: 0

Views: 1325

Answers (2)

gefrag
gefrag

Reputation: 352

Go to Files tab, find your build.xml, expand all targets, right click on the target you want to add and choose between the options provided.

Upvotes: 0

vkraemer
vkraemer

Reputation: 9892

It sounds like you want to switch to the Files view. You can find the build.xml file in that view easily. If you right click on the file, you get a menu that includes items like 'Run Target' and 'Debug Target'.

If you want to have even more control over the mapping between menu items and ant targets, you should explore the Java Free-Form Project type.

Upvotes: 0

Related Questions