RE: Maven build test failure

Answered

Hi All,

I am new to Maven.

When i run the maven project on eclipse by “run as maven test”
getting following error.

Can any one help me regarding this?

 


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

[WARNING]

[WARNING] Some problems were encountered while building the effective settings

[WARNING] Failed to use environment variables for interpolation: Cannot run program "cmd.exe": CreateProcess error=740, The requested operation requires elevation @

[WARNING]

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building Maven_project 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ Maven_project ---

[debug] execute contextualize

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory D:\Maven_project\src\main\resources

[INFO]

[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ Maven_project ---

[INFO] No sources to compile

[INFO]

[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ Maven_project ---

[debug] execute contextualize

[INFO] Using 'UTF-8' encoding to copy filtered resources.

[INFO] skip non existing resourceDirectory D:\Maven_project\src\test\resources

[INFO]

[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ Maven_project ---

[INFO] Nothing to compile - all classes are up to date

[INFO]

[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ Maven_project ---

[INFO] Surefire report directory: D:\Maven_project\target\surefire-reports
-------------------------------------------------------

T E S T S

-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 4.018s

[INFO] Finished at: Mon Oct 13 20:22:44 IST 2014

[INFO] Final Memory: 5M/15M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project Maven_project: Error while executing forked tests.; nested exception is java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\Maven_project"): CreateProcess error=740, The requested operation requires elevation -> [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

Add Comment
1 Answers
Best answer

Hi Snpanigrahi9,

Are you trying to do this on your Office machine or laptop because this error seems like you are running Eclipse with less priviledge.

Try Run your Eclipse with Administrative permission:

Right click on the Eclipse shortcut or .exe file and Select Run As Administrator

Regards,
Lakshay Sharma

Professor Answered on October 13, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.