On Wed, Jul 11, 2012 at 5:21 PM, Peter Donald <[email protected]> wrote: > Hmmm... The build file that I passed along in previous mail actually > worked for me and when I ran "buildr artifacts" seem to download a > large number of jars. I presumed these were the correct ones. I am not > sure which repository is the correct one as I have never used Hadoop > and just arbitrarily chose some repositories ;)
I tried your file and this got me a little further. I ran into an error: RuntimeError : Failed to download com.google.guava:guava:pom:11.0.2, tried the following repositories: ... so I added another repository: repositories.remote << 'http://repo1.maven.org/maven2' This handled the guava dependency, and downloaded many, many JARs as a result. However, it fails here: Downloading javax.jms:jms:jar:1.1 warning: peer certificate won't be verified in this SSL session warning: peer certificate won't be verified in this SSL session Buildr aborted! RuntimeError : Failed to download javax.jms:jms:jar:1.1, tried the following repositories: https://repository.cloudera.com/content/repositories/releases/ https://repository.cloudera.com/content/repositories/third-party/ http://repo1.maven.org/maven2/ I then thought to search for the file, since I have the Oracle JDK installed, and realized I have a maven-repo directory in my filesystem - /usr/share/maven-repo, which contains javax/jms/jms/1.1/jms-1.1.jar. I added it as another remote repository, thus: repositories.remote << "file:///localhost/usr/share/maven-repo/" But this still doesn't work, with the same error as before...so I simply copied the .jar from /usr/share... to ~/.m2/repository/... and it was happy. I then ran into a dependency on "com.sun.jdmk:jmxtools:jar:1.2.1", which I don't appear to have on my system. Does buildr have a way to exclude dependencies? This StackOverflow post [1] indicates that someone has solved this issue using Maven's ability to define exclusions. > However if you are getting the "no remote repositories defined" error > it means that there is some problem relating to the way you have > defined the repositories in the build file as buildr can't not find > any i it's list. I think this was due to having the artifact line defined before the repositories.remote lines. That's the only difference I can find between your test file and the way I was doing it previously. Forgive me for being a naive outsider, but this whole business of JAR repositories and dependencies reminds me of RPM dependency hell, and just doesn't feel very DRY. At this point, I would really prefer to simply write something like Java.classpath = ENV['CLASSPATH'] and be done with it, seeing as I already have all the necessary JAR dependencies on my system, courtesy of CDH4 packages. I tried this, however, even when I have commented out all the "compile.with", "HADOOP = ...", and "repositories.remote" lines, buildr is still trying to download artifacts. Am I simply stuck downloading all the restrictively-licensed JARs manually? Chris [1] http://stackoverflow.com/questions/4908651/help-the-following-artifacts-could-not-be-resolved-javax-jmsjmsjar1-1
