简体   繁体   中英

How to execute build.xml using jar managed by Maven?

Our project uses Maven to manage the dependent Jar collection, and we use Ant to build the project. Now I have a question when I'm writing build.xml ; I cannot easily get the dependent Jar set when compiling Java source code because they are stored in the user's repository. So I was wondering if there is any better way to use the Maven plugin to automactically load these jars when executing the build.xml file.

Could you please be more clear? Is the jar you are talking about a non-open-source jar? In that case you should ("manually") add it to your central repository. Otherwise find out in what central repository the jar is hosted, and add that to your repositories tag.

And just out of curiosity: why do you use Maven to manage dependencies and not Ivy?

The better way is only using maven or Ant,they can do all thing you want.

but, if you want to use them mixing, of course ,you can. you can use maven-dependency-plugin in pom.xml to manage jar package.

search for detail information by google.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM