spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

Facing issues during spring-cloud-netflix project build #1692

Closed Ahmed-A-Syed closed 7 years ago

Ahmed-A-Syed commented 7 years ago

Hi

I was trying to run the spring-cloud-Netflix project code downloaded from https://github.com/spring-cloud/spring-cloud-netflix using maven .

When I was running command : mvn install. I was facing the below errors.

[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:1.5.0:exec (imports) @ spring-cloud-netflix ---
[ERROR] Command execution failed.
java.io.IOException: Cannot run program "egrep" (in directory "C:\workspace\spring-cloud-netflix-master"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
    at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    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:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    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:497)
    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: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
    at java.lang.ProcessImpl.start(ProcessImpl.java:137)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 29 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] spring-cloud-netflix-dependencies ................. SUCCESS [  9.540 s]
[INFO] Spring Cloud Netflix .............................. FAILURE [  5.919 s]
[INFO] Spring Cloud Netflix Core ......................... SKIPPED
[INFO] Spring Cloud Netflix Hystrix ...................... SKIPPED
[INFO] Spring Cloud Netflix Hystrix Stream ............... SKIPPED
[INFO] spring-cloud-netflix-hystrix-amqp ................. SKIPPED
[INFO] Spring Cloud Netflix Eureka Client ................ SKIPPED
[INFO] Spring Cloud Netflix Eureka Server ................ SKIPPED
[INFO] Spring Cloud Netflix Spectator .................... SKIPPED
[INFO] Spring Cloud Netflix Turbine ...................... SKIPPED
[INFO] Spring Cloud Netflix Turbine Stream ............... SKIPPED
[INFO] Spring Cloud Netflix Sidecar ...................... SKIPPED
[INFO] spring-cloud-starter-archaius ..................... SKIPPED
[INFO] spring-cloud-starter-atlas ........................ SKIPPED
[INFO] spring-cloud-starter-ribbon ....................... SKIPPED
[INFO] spring-cloud-starter-eureka ....................... SKIPPED
[INFO] spring-cloud-starter-eureka-server ................ SKIPPED
[INFO] spring-cloud-starter-feign ........................ SKIPPED
[INFO] spring-cloud-starter-hystrix ...................... SKIPPED
[INFO] spring-cloud-starter-hystrix-dashboard ............ SKIPPED
[INFO] spring-cloud-starter-spectator .................... SKIPPED
[INFO] spring-cloud-starter-turbine ...................... SKIPPED
[INFO] spring-cloud-starter-turbine-stream ............... SKIPPED
[INFO] spring-cloud-starter-turbine-amqp ................. SKIPPED
[INFO] spring-cloud-starter-zuul ......................... SKIPPED
[INFO] Spring Cloud Netflix Docs ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.753 s
[INFO] Finished at: 2017-02-14T14:18:59+05:30
[INFO] Final Memory: 32M/92M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (imports) on project spring-cloud-netflix: Command execution failed. Cannot run program "egrep" (in directory "C:\workspace\spring-cloud-netflix-master"): CreateProcess error=2, The system cannot find the file specified -> [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 :spring-cloud-netflix
spencergibb commented 7 years ago

We recommend you build with ./mvnw install to make sure you have a supported version of maven.

Also, this profile should ensure that egrep isn't used on windows. Unsure why that would fail? Are you using cygwin or some other bash?

spencergibb commented 7 years ago

See #18 for removal of grep.