Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # dev >> Pig Newbie: Building with Ant


Copy link to this message
-
Re: Pig Newbie: Building with Ant
remove ivy/ivy-2.2.0.jar and try rebuild.

On Sun, Mar 25, 2012 at 4:26 PM, Apurv Verma <[EMAIL PROTECTED]> wrote:
> Hi,
>  I checked out the latest trunk and tried to run "ant" which throwed some
> errors. I generally use maven. Usually the first thing to do after
> downloading a maven project is mvn install.
> Then after changes one can do mvn test to see all tests pass. What are the
> equivalent ivy commands for these?
>
> Here is the error I got.
>
> apurv@deepu:/media/MyVolume/MyPrograms/Eclipse/pig-trunk$ ant
> Buildfile: /media/MyVolume/MyPrograms/Eclipse/pig-trunk/build.xml
>
> ivy-download:
>      [get] Getting:
> http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
>      [get] To:
> /media/MyVolume/MyPrograms/Eclipse/pig-trunk/ivy/ivy-2.2.0.jar
>      [get] Not modified - so not downloaded
>
> ivy-init-dirs:
>
> ivy-probe-antlib:
>
> ivy-init-antlib:
> Unable to obtain resource from
> /media/MyVolume/MyPrograms/Eclipse/pig-trunk/ivy/ivy-2.2.0.jar:
> java.util.zip.ZipException: error in opening zip file
>  [typedef] Unable to obtain resource from
> /media/MyVolume/MyPrograms/Eclipse/pig-trunk/ivy/ivy-2.2.0.jar:
>  [typedef] java.util.zip.ZipException: error in opening zip file
>  [typedef] at java.util.zip.ZipFile.open(Native Method)
>  [typedef] at java.util.zip.ZipFile.<init>(ZipFile.java:127)
>  [typedef] at java.util.jar.JarFile.<init>(JarFile.java:135)
>  [typedef] at java.util.jar.JarFile.<init>(JarFile.java:99)
>  [typedef] at
> org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1002)
>  [typedef] at
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:145)
>  [typedef] at
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
>  [typedef] at
> org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:949)
>  [typedef] at
> org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:918)
>  [typedef] at
> org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:54)
>  [typedef] at
> org.apache.tools.ant.taskdefs.Definer.resourceToURLs(Definer.java:375)
>  [typedef] at
> org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:267)
>  [typedef] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>  [typedef] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>  [typedef] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  [typedef] at java.lang.reflect.Method.invoke(Method.java:597)
>  [typedef] at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>  [typedef] at org.apache.tools.ant.Task.perform(Task.java:348)
>  [typedef] at org.apache.tools.ant.Target.execute(Target.java:390)
>  [typedef] at org.apache.tools.ant.Target.performTasks(Target.java:411)
>  [typedef] at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
>  [typedef] at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
>  [typedef] at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>  [typedef] at
> org.apache.tools.ant.Project.executeTargets(Project.java:1249)
>  [typedef] at org.apache.tools.ant.Main.runBuild(Main.java:801)
>  [typedef] at org.apache.tools.ant.Main.startAnt(Main.java:218)
>  [typedef] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>  [typedef] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>  [typedef] Could not load definitions from resource
> org/apache/ivy/ant/antlib.xml. It could not be found.
>
> BUILD FAILED
> /media/MyVolume/MyPrograms/Eclipse/pig-trunk/build.xml:1527: You need
> Apache Ivy 2.0 or later from http://ant.apache.org/
>         It could not be loaded from
> http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
>
> Total time: 6 seconds
>
>
> --
> thanks and regards,
>
> Apurv Verma
> B. Tech.(CSE)
> IIT- Ropar