An error is thrown when Lucene is compiled with Ant today:
Ivy is not available
Originally, an ivy plug-in was missing, and the ivy plug-in was used to intelligently manage dependency. The project home page is a http://ant.apache.org/ivy/, just put the ivy-version.jar in the following Directory:
| The code is as follows: |
Copy code |
/Usr/share/ant/lib $ {HOME}/. ant/lib |
However, since ant is in use, you may wish to use ant to automatically place ivy to where it should go. Create a compilation script:
| The code is as follows: |
Copy code |
<Project name = "demo" default = "resolve" xmlns: ivy = "antlib: org. apache. ivy. ant"> <Target name = "bootstrap" description = "Install ivy"> <Mkdir dir = "$ {user. home}/. ant/lib"/> <Get dest = "$ {user. home}/. ant/lib/ivy. jar" src = "http://search.maven.org/remotecontent? Filepath = org/apache/ivy/2.3.0/ivy-2.3.0.jar "/> </Target> <Target name = "resolve" description = "Use ivy to resolve classpaths"> <Ivy: resolve/> <Ivy: report todir = 'build/ivy-reports 'graph = 'false' xml = 'false'/> <Ivy: cachepath pathid = "compile. path" conf = "compile"/> <Ivy: cachepath pathid = "test. path" conf = "test"/> </Target> <Target name = "clean" description = "Cleanup build files"> <Delete dir = "build"/> </Target> <Target name = "clean-all" depends = "clean" description = "Additionally purge ivy cache"> <Ivy: cleancache/> </Target> </Project>
|
Then ant bootstrap is finished.