1

编译最新的 Sqoop2 时,由于缺少依赖项而出现错误:

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

如何安装这个罐子?

我正在运行:

阿帕奇 Maven 3.2.1

Java版本:1.7.0_51

CentOS 6.5,内核 2.6.32-431.5.1.el6.x86_64

$ mvn compile -Dhadoop.profile=200

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.apache.sqoop:sqoop-common:jar:2.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 73, column 15
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Sqoop
[INFO] Sqoop Common
[INFO] Sqoop SPI
[INFO] Sqoop Core
[INFO] Sqoop Repository
[INFO] Sqoop Derby Repository
[INFO] Sqoop Tools
[INFO] Sqoop Execution Engines
[INFO] Sqoop Mapreduce Execution Engine
[INFO] Sqoop Submission Engines
[INFO] Sqoop Mapreduce Submission Engine
[INFO] Sqoop Connectors
[INFO] Sqoop Connector SDK
[INFO] Sqoop Generic JDBC Connector
[INFO] Sqoop Server
[INFO] Sqoop Client
[INFO] Sqoop Shell
[INFO] Sqoop Documentation
[INFO] Sqoop Tomcat additions
[INFO] Sqoop Distribution
[INFO] Sqoop Integration Tests
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ sqoop ---
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop Common 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-antrun-plugin:1.6:run (save-version) @ sqoop-common ---
[INFO] Executing tasks

main:
[INFO] Executed tasks
[INFO] 
[INFO] --- build-helper-maven-plugin:1.8:add-source (add-source) @ sqoop-common ---
[INFO] Source directory: /home/dk/wks/sqoop2/common/target/generated-sources/java added.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ sqoop-common ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ sqoop-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dk/wks/sqoop2/common/src/main/resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ sqoop-common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop SPI 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ sqoop-spi ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ sqoop-spi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/dk/wks/sqoop2/spi/src/main/resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ sqoop-spi ---
[INFO] Nothing to compile - all classes are up to date
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop Core 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ sqoop-core ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ sqoop-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ sqoop-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop Repository 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ repository ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Sqoop Derby Repository 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.1:process (default) @ sqoop-repository-derby ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Sqoop ............................................. SUCCESS [  1.220 s]
[INFO] Sqoop Common ...................................... SUCCESS [  2.352 s]
[INFO] Sqoop SPI ......................................... SUCCESS [  0.106 s]
[INFO] Sqoop Core ........................................ SUCCESS [  0.365 s]
[INFO] Sqoop Repository .................................. SUCCESS [  0.073 s]
[INFO] Sqoop Derby Repository ............................ FAILURE [  0.257 s]
[INFO] Sqoop Tools ....................................... SKIPPED
[INFO] Sqoop Execution Engines ........................... SKIPPED
[INFO] Sqoop Mapreduce Execution Engine .................. SKIPPED
[INFO] Sqoop Submission Engines .......................... SKIPPED
[INFO] Sqoop Mapreduce Submission Engine ................. SKIPPED
[INFO] Sqoop Connectors .................................. SKIPPED
[INFO] Sqoop Connector SDK ............................... SKIPPED
[INFO] Sqoop Generic JDBC Connector ...................... SKIPPED
[INFO] Sqoop Server ...................................... SKIPPED
[INFO] Sqoop Client ...................................... SKIPPED
[INFO] Sqoop Shell ....................................... SKIPPED
[INFO] Sqoop Documentation ............................... SKIPPED
[INFO] Sqoop Tomcat additions ............................ SKIPPED
[INFO] Sqoop Distribution ................................ SKIPPED
[INFO] Sqoop Integration Tests ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.639 s
[INFO] Finished at: 2014-02-25T18:08:27+04:00
[INFO] Final Memory: 17M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.1:process (default) on project sqoop-repository-derby: Failed to resolve dependencies for one or more projects in the reactor. Reason: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.sqoop:sqoop-core:test-jar:tests:2.0.0-SNAPSHOT
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.sqoop -DartifactId=sqoop-core -Dversion=2.0.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.sqoop -DartifactId=sqoop-core -Dversion=2.0.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] Path to dependency:
[ERROR] 1) org.apache.sqoop.repository:sqoop-repository-derby:jar:2.0.0-SNAPSHOT
[ERROR] 2) org.apache.sqoop:sqoop-core:test-jar:tests:2.0.0-SNAPSHOT
[ERROR] 
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR] 
[ERROR] for artifact:
[ERROR] org.apache.sqoop.repository:sqoop-repository-derby:jar:2.0.0-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true),
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :sqoop-repository-derby
4

2 回答 2

1

这个问题已经在Sqoop 邮件列表中讨论过,应该会在未来得到修复。您现在可以通过调用“mvn install”而不是“mvn compile”来解决它。

于 2014-03-01T16:37:42.160 回答
0

您可以直接执行以下操作来构建 sqoop2

mvn package -Pbinary -Dmaven.test.skip=true
于 2019-09-16T13:28:10.447 回答