Call ant build file from maven




















It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. Ant files are used by the Ant tool, which provides more flexible, free-form builds. An Ant build file is much like a program in its own right only encoded as verbose XML. POM files are used by Maven , which has a different philosophy and imposes more structure. The Maven approach is more declarative than Ant.

Writing a Maven build is less like writing a procedural program to build the software. They describe the steps taken to produce some kind of artifact - an executable file, a test run, etc. The build file will describe how to create a clean build environment, what to compile, where the dependencies are that you need to compile, where to put the executables, DLLs, and the like, any additional programs you need to execute like running your testrunner on your project, or instrumenting your code so a coverage tool can analyse your test coverage.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. What is ant build file and maven build file?

Ask Question. Asked 11 years ago. Active 11 years ago. Viewed 5k times. Can somebody please tell me in simple words what exactly is ant build file and maven build file?

Improve this question. Add a comment. Active Oldest Votes. You can use the maven-antrun-plugin to invoke the ant build. Then use the build-helper-maven-plugin to attach the jar produced by ant to the project. If you specify your project with packaging pom , Maven will not conflict with the ant build. In the example below, the ant build. You can actually wrap an ANT project with Maven by using multiple ant run goals as I wrote in a different question.

Assuming your existing ant project has clean and build tasks, this might be a useful way of wrapping the project so you can use maven goals and have it map to existing ant code. With the information above you should be able to achieve what you need. Let me know if you have any questions. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. How to wrap an Ant build with Maven? Ask Question. Asked 12 years, 3 months ago. Active 3 years ago. Viewed 31k times. Questions: a I am creating a. Improve this question. Rich Seller Add a comment.

Active Oldest Votes. Improve this answer. Vlad Gheorghe 25 7 7 bronze badges. Rich Seller Rich Seller Very helpful answer Rich, Once I get it working in my project I'll accept your answer. Great advice.

Community Bot 1 1 1 silver badge. Thanks Sal, good answer.



0コメント

  • 1000 / 1000