当我尝试用mvn -Pprod包构建一个prod profile war时,
我收到了这个gulp错误:
TypeError: undefined is not an object (evaluating '$httpBackend.verifyNoOutstandingExpectation') in /home/myapp/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js (line 9)
/home/myapp/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js:9:1596
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) (0 secs / 1.231 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) ERROR (2.671 secs / 1.231 secs)
[22:28:40] 'test' errored after 9.84 s
[22:28:40] Error: 1
at formatError (/usr/lib/node_modules/gulp/bin/gulp.js:169:10)
我不知道它可以来自哪里。
如果有人可以帮我这个,或者至少给我提示找到解决方案......
谢谢!
完整的错误消息:
TypeError: undefined is not an object (evaluating '$httpBackend.verifyNoOutstandingExpectation') in /home/myapp/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js (line 9)
/home/myappey/dev/workspace/applicationRh/src/test/javascript/spec/app/services/auth/auth.services.spec.js:9:1596
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) (0 secs / 1.299 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) ERROR (2.733 secs / 1.299 secs)
[1A[2KPhantomJS 2.1.1 (Linux 0.0.0): Executed 64 of 64 (64 FAILED) ERROR (2.733 secs / 1.299 secs)
[13:22:48] 'test' errored after 11 s
[13:22:48] Error: 1
at formatError (/usr/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/usr/lib/node_modules/gulp/bin/gulp.js:195:15)
at emitOne (events.js:90:13)
at Gulp.emit (events.js:182:7)
at Gulp.Orchestrator._emitTaskDone (/home/myapp/dev/workspace/applicationRh/node_modules/orchestrator/index.js:264:8)
at /home/myappey/dev/workspace/applicationRh/node_modules/orchestrator/index.js:275:23
at finish (/home/myappey/dev/workspace/applicationRh/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/myappey/dev/workspace/applicationRh/node_modules/orchestrator/lib/runTask.js:29:3)
at removeAllListeners (/home/myappey/dev/workspace/applicationRh/node_modules/karma/lib/server.js:336:7)
at Server.<anonymous> (/home/myappey/dev/workspace/applicationRh/node_modules/karma/lib/server.js:347:9)
at Server.g (events.js:273:16)
at emitNone (events.js:85:20)
at Server.emit (events.js:179:7)
at emitCloseNT (net.js:1535:8)
at _combinedTickCallback (node.js:380:13)
at process._tickCallback (node.js:407:11)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.308 s
[INFO] Finished at: 2016-05-14T13:22:48+02:00
[INFO] Final Memory: 43M/286M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.5:build (run-frontend-build) on project rh-myapp: Error during : gulp test --no-color: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.5:build (run-frontend-build) on project rh-myapp: Error during : gulp test --no-color
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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.MojoExecutionException: Error during : gulp test --no-color
at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:129)
at com.github.trecloux.yeoman.YeomanMojo.logAndExecuteCommand(YeomanMojo.java:110)
at com.github.trecloux.yeoman.YeomanMojo.build(YeomanMojo.java:96)
at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:70)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:147)
at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:127)
... 25 more