2016-10-08 3 views
0

Попытка установить Mahout на Ubuntu16.04, у меня есть успешно установите maven 3.3.9 и subversion 1.9.3. Новое в Mahout и Maven, я не знаю, если я должен пропустить тест и просто использоватьНе удалось выполнить цель org.apache.maven.plugins: maven-surefire-plugin: 2.16: test (default-test) в проекте mahout-math: есть ошибки тестирования

mvn -DskipTests 

Здесь ошибка я получил:

[INFO] Mahout Build Tools ................................. SUCCESS [ 6.621 s] 
[INFO] Apache Mahout ...................................... SUCCESS [ 1.164 s] 
[INFO] Mahout Math ........................................ FAILURE [03:35 min] 
[INFO] Mahout MapReduce Legacy ............................ SKIPPED 
[INFO] Mahout Integration ................................. SKIPPED 
[INFO] Mahout Examples .................................... SKIPPED 
[INFO] Mahout Release Package ............................. SKIPPED 
[INFO] Mahout Math/Scala wrappers ......................... SKIPPED 
[INFO] Mahout Spark bindings .............................. SKIPPED 
[INFO] Mahout Spark bindings shell ........................ SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 03:44 min 
[INFO] Finished at: 2016-10-07T19:05:02-07:00 
[INFO] Final Memory: 33M/134M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven- 
surefire-plugin:2.16:test (default-test) on project mahout-math: There are test failures. 
[ERROR] 
[ERROR] Please refer to/home/flora/.linuxbrew/Cellar/mahout/trunk/math/target/surefire-reports 
for the individual test results. 
[ERROR] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project mahout-math: There are test failures. 

Please refer to /home/flora/.linuxbrew/Cellar/mahout/trunk/math/target/surefire-reports for the individual test results. 
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) 
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) 
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) 
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 

Вызванный: org.apache.maven. plugin.MojoFailureException: есть ошибки тестирования.

Please refer to /home/flora/.linuxbrew/Cellar/mahout/trunk/math/target/surefire-reports for the individual test results. 
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:82) 
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:190) 
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:852) 
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:720) 
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) 
... 20 more 
[ERROR] 
[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/MojoFailureException 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR] mvn <goals> -rf :mahout-math 
+0

версия исходников, имеющие неудачу теста ... Вы должны решить, если вы хотите использовать это ... Вы, конечно, можете пропустить неисправные тесты с помощью '-DskipTests'? – khmarbaise

ответ

0

Я использую Maven 3.3.9, но я не могу просто использовать «МВН -DskipTests», она не будет выполнена из-за отсутствия жизненного цикла фазы или цели. Вот сообщение об ошибке:

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1] 

Существует два способа игнорировать сбои модулей. Использование фазы установки, например:

method 1: mvn -DskipTests install 

method 2: mvn -Dmaven.test.skip=true install 

Разница между двумя методами является то, что первым будет компилировать модульные тесты и последний не будет, так что последнее может пропустить компилировать неудачу, бывшие не может.

Maven Surefire Plugin: Skipping Tests