0

Please help to build Sqoop2 from source. I use Maven 3.2.1 on CentOS 6.5. When I try to compile Sqoop2 with command:

mvn compile

I get exception resulting from:

missing org.apache.sqoop:sqoop-core:test-jar:tests:2.0.0-SNAPSHOT

When I try to build Sqoop2 with command:

mvn package -Pbinary  

I get exception resulting from:

Missing org/sonatype/aether/graph/DependencyFilter

Any ideas?

dokondr
  • 3,389
  • 12
  • 38
  • 62

2 Answers2

3

The same issue:

java.lang.NoClassDefFoundError: org/sonatype/aether/graph/DependencyFilter

Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.graph.DependencyFilter

was reported in Hadoop as HADOOP-10092 and fixed by bumping maven-site-plugin from 3.0 to 3.3.

It looks like sqoop's sqoop2 branch is using the same outdated version in docs/pom.xml:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>

I'd suggest trying the same fix.

Joe
  • 29,416
  • 12
  • 68
  • 88
  • Thanks! Changing version to 3.3 solved this error and brought the next one: '[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ test --- [INFO] Compiling 25 source files .... [ERROR] COMPILATION ERROR : [ERROR] Failure executing javac, but could not parse the error: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ... java.net.URLClassLoader.defineClass(URLClassLoader.java:449)'... – dokondr Feb 26 '14 at 13:35
  • [java.lang.OutOfMemoryError: PermGen space](http://stackoverflow.com/questions/3101128/java-lang-outofmemoryerror-permgen-space). – Joe Feb 26 '14 at 13:44
0

you should run mvn install before attempting to package it (or just run them together: mvn install package -Pbinary).

Any maven 3.x version should be supported, but Just to be on the safe, here's the configuration I validated works properly:

mureinik@mycomputer sqoop (sqoop2)]$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 10:44:56+0200)
Maven home: /usr/local/apache-maven-3.0.4
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.23.2.el6.x86_64", arch: "amd64", family: "unix"
Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • I use latest Maven 3.2.1. I tried 'mvn install' and still get the same: `[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:site (packaging-documentation) on project sqoop-docs: Execution packaging-documentation of goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:site failed: A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:site:` **org/sonatype/aether/graph/DependencyFilter** – dokondr Feb 26 '14 at 10:18