Ant compilation Lucene ivy is not available error solution

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.