Samya Maiti
Samya Maiti

Reputation: 21

Can i change the name of build.xml in ant?

Can I change the name of build.xml in ant?

example- **build_projectname.xml**

If yes, how will I run that build file?

Upvotes: 2

Views: 2046

Answers (1)

CAustin
CAustin

Reputation: 4614

You can rename your Ant script to anything you want. You'll just need to add the -buildfile option (or -f for short) followed by the file name.

ant -buildfile build_projectname.xml

ant -f build_projectname.xml

See https://ant.apache.org/manual/running.html

It might be more convenient to still have a file named build.xml in the same directory that imports your main script so you don't have to type this extra option every time.

Upvotes: 3

Related Questions