Clean Setup: mvn clean install - Failing on different Systems
Closed this issue · 4 comments
I just tried to setup the framework on my local dev machine. I keep getting the same error:
Tests run: 243, Failures: 18, Errors: 5, Skipped: 2
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Aura Framework ..................................... SUCCESS [ 18.875 s]
[INFO] aura-interfaces .................................... SUCCESS [ 16.238 s]
[INFO] aura-spring ........................................ SUCCESS [ 18.018 s]
[INFO] aura-util .......................................... FAILURE [ 40.246 s]
[INFO] aura ............................................... SKIPPED
[INFO] aura-impl-expression ............................... SKIPPED
[INFO] aura-impl .......................................... SKIPPED
[INFO] aura-tools ......................................... SKIPPED
[INFO] aura-components .................................... SKIPPED
[INFO] aura-modules ....................................... SKIPPED
[INFO] aura-resources ..................................... SKIPPED
[INFO] aura-integration-test .............................. SKIPPED
[INFO] aura-jetty ......................................... SKIPPED
[INFO] archetype for Aura-based "hello, world" ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2018-04-20T10:33:15+02:00
[INFO] Final Memory: 37M/539M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project aura-util: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\dev\Documents\web\aura\aura\aura-util\target\surefire-reports for the individual test results.
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :aura-util
My machine is running Win10 x64 - Latest Version
I also tested it using the Ubuntu Subsystem & on a different Winm10 machine.
Using JDK8 - Latest Version and Maven - Latest Version
Hopefully someone can help me
I did some additional testing, here are more in depth logs:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project aura-util: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\dev\Documents\web\aura\aura\aura-util\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.19.1:test (default-test) on project aura-util: There are test failures.
Please refer to C:\Users\dev\Documents\web\aura\aura\aura-util\target\surefire-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
Please refer to C:\Users\dev\Documents\web\aura\aura\aura-util\target\surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution (SurefireHelper.java:91)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary (SurefirePlugin.java:320)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:892)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:755)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
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)
[ERROR]
[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 :aura-util
I can't get it to work. Tried on 3 different machines so far..
Thank you posting detail failure result. Can you please provide surefire-reports for the individual test results which is failing. I am able to build the code successfully. It does have issue with license headers but that is something by passed.
@rahul-chaudhary Thanks for the answer. Sry for the delay. I will try to reproduce the error this evening or tomorrow and will post the surefire-reports afterwards.
I got the same error.
My Environment Info
OS/Middleware | Version |
---|---|
OS | CentOS Linux release 7.5.1804 (Core) |
Java | 1.8.0_181 |
Apache Maven | 3.5.4 |
Node.js | v8.11.4 |
npm | 6.4.0 |
Chromedriver | 2.37 |
I run commands below.
# cd
# curl -LkvOf http://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip
# echo "export PATH=$PATH:$HOME/bin" >> $HOME/.bash_profile
# source ~/.bash_profile
# git clone https://github.com/forcedotcom/aura.git
# cd aura/
# mvn clean install
Displayed Error Message
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Aura Framework 0.6000-SNAPSHOT ..................... SUCCESS [ 5.294 s]
[INFO] aura-interfaces .................................... SUCCESS [ 3.870 s]
[INFO] aura-spring ........................................ SUCCESS [ 1.284 s]
[INFO] aura-util .......................................... FAILURE [ 26.184 s]
[INFO] aura ............................................... SKIPPED
[INFO] aura-impl-expression ............................... SKIPPED
[INFO] aura-impl .......................................... SKIPPED
[INFO] aura-tools ......................................... SKIPPED
[INFO] aura-components .................................... SKIPPED
[INFO] aura-modules ....................................... SKIPPED
[INFO] aura-resources ..................................... SKIPPED
[INFO] aura-integration-test .............................. SKIPPED
[INFO] aura-jetty ......................................... SKIPPED
[INFO] archetype for Aura-based "hello, world" 0.6000-SNAPSHOT SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.802 s
[INFO] Finished at: 2018-08-18T18:43:26+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project aura-util: There are test failures.
[ERROR]
[ERROR] Please refer to /root/aura/aura-util/target/surefire-reports for the individual test results.
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :aura-util
I did
- checked
/root/aura/aura-util/target/surefire-reports
folder - ran
grep -r "Failure: " /root/aura/aura-util/target/surefire-reports | grep -v "Failure: 0"
command - viewed the corresponding file.
As a result, There are two files.
- org.auraframework.util.IOUtilTest.txt
- org.auraframework.util.resource.ResourceLoaderTest.txt
File detail are below.
# view org.auraframework.util.IOUtilTest.txt
-------------------------------------------------------------------------------
Test set: org.auraframework.util.IOUtilTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec <<< FAILURE! - in org.auraframework.util.IOUtilTest
testDelete(org.auraframework.util.IOUtilTest) Time elapsed: 0.044 sec <<< FAILURE!
junit.framework.AssertionFailedError: test cleanup failed
at org.auraframework.util.IOUtilTest.testDelete(IOUtilTest.java:84)
# view org.auraframework.util.resource.ResourceLoaderTest.txt
-------------------------------------------------------------------------------
Test set: org.auraframework.util.resource.ResourceLoaderTest
-------------------------------------------------------------------------------
Tests run: 15, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.164 sec <<< FAILURE! - in org.auraframework.util.resource.ResourceLoaderTest
testCacheDirParentNotWritable(org.auraframework.util.resource.ResourceLoaderTest) Time elapsed: 0 sec <<< FAILURE!
junit.framework.AssertionFailedError: Should have failed to cache resource
at org.auraframework.util.resource.ResourceLoaderTest.testCacheDirParentNotWritable(ResourceLoaderTest.java:250)