Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build war package #416

Closed
lukaphp opened this issue Jul 3, 2014 · 28 comments
Closed

Unable to build war package #416

lukaphp opened this issue Jul 3, 2014 · 28 comments
Milestone

Comments

@lukaphp
Copy link

lukaphp commented Jul 3, 2014

When I execute the command "mvn -Pprod package", I got this error during grunt test --no-color.

Maybe something wrong with my node configuration ?

[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build
(run-grunt) on project jhipster: Error during : cmd /c grunt test --no-color: P
rocess exited with an error: 3 (Exit value: 3) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal c
om.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project jhipster
: Error during : cmd /c grunt 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.buildProje
ct(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during : cmd /c
grunt test --no-color
at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:
104)
at com.github.trecloux.yeoman.YeomanMojo.logAndExecuteCommand(YeomanMojo
.java:85)
at com.github.trecloux.yeoman.YeomanMojo.grunt(YeomanMojo.java:73)
at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:56)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:208)
... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an erro
r: 3 (Exit value: 3)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecut
or.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:
102)
... 24 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

@jdubois
Copy link
Member

jdubois commented Jul 3, 2014

Can you tell which version of JHipster you are using?
And your .yo-rc.json file, so we know your configuration?

@lukaphp
Copy link
Author

lukaphp commented Jul 3, 2014

Hi, I'm using jhipster v0.12.0 and this is my .yo-rc.json

{
"generator-jhipster": {
"baseName": "jhipster",
"packageName": "it.cproject.moretto",
"packageFolder": "it/cproject/moretto",
"hibernateCache": "ehcache"
}

}

@lukaphp
Copy link
Author

lukaphp commented Jul 3, 2014

Hi, I'm using jhipster v0.12.0 and this is my .yo-rc.json
{ "generator-jhipster": { "baseName": "jhipster", "packageName":
"it.cproject.moretto", "packageFolder": "it/cproject/moretto",
"hibernateCache":
"ehcache" }
}
Thanks

Gianluca Stefanelli

2014-07-03 17:35 GMT+02:00 Julien Dubois notifications@github.com:

Can you tell which version of JHipster you are using?
And your .yo-rc.json file, so we know your configuration?


Reply to this email directly or view it on GitHub
#416 (comment)
.

@lukaphp
Copy link
Author

lukaphp commented Jul 4, 2014

Ok just solved, but is a workaround....
I have added this line in my pom inside yeoman-maven-plugin

--no-color --force --no-color --force

This arguments avoid to exit from maven process build, but I don't believe that is the right way.

@jmirc jmirc added bug and removed bug labels Jul 11, 2014
@jmirc jmirc added this to the 0.18 milestone Jul 11, 2014
@jmirc jmirc closed this as completed in b622de3 Jul 11, 2014
@jmirc
Copy link
Member

jmirc commented Jul 11, 2014

You just need to add in the package.json the two following dependencies

"lodash": "2.4.1",
"zeparser": "0.0.7"

@finmurphy
Copy link

I'm getting a similar error when I run "mvn -Pprod package". I've upgraded to 18.1 (which has lodash/zeparser in package.json) and the error still occurs:

ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project dohub: Error during : bower install --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.2:build (run-grunt) on project dohub: Error during : bower install --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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 : bower install --no-color
at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:104)
at com.github.trecloux.yeoman.YeomanMojo.logAndExecuteCommand(YeomanMojo.java:85)
at com.github.trecloux.yeoman.YeomanMojo.bowerInstall(YeomanMojo.java:68)
at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:55)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 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:102)
... 24 more

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

I also got this error when execute mvn -Pprod package -X

jhipster version:

generator-jhipster@1.4.0

build environment

Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T04:58:10+08:00)
Maven home: /usr/local/Cellar/maven/3.2.3/libexec
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"
Node: v0.11.14
NVM: 0.17.2

.yo-rc.json

{
  "generator-jhipster": {
    "baseName": "twjug",
    "packageName": "org.phstudy.twjug",
    "packageFolder": "org/phstudy/twjug",
    "authenticationType": "cookie",
    "hibernateCache": "hazelcast",
    "clusteredHttpSession": "hazelcast",
    "websocket": "atmosphere",
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "postgresql",
    "useCompass": true,
    "buildTool": "maven",
    "frontendBuilder": "grunt",
    "javaVersion": "7"
  }
}

package.json

{
  "name": "twjug",
  "version": "0.0.0",
  "description": "Description for twjug",
  "dependencies": {
  },
  "devDependencies": {
    "grunt": "0.4.5",
    "grunt-autoprefixer": "0.7.5",
    "grunt-build-control": "0.1.3",
    "grunt-wiredep": "1.8.0",
    "grunt-cli": "0.1.13",
    "grunt-contrib-copy": "0.5.0",
    "grunt-concurrent": "0.5.0",
    "grunt-connect-proxy": "0.1.10",
    "grunt-contrib-clean": "0.5.0",
    "grunt-contrib-concat": "0.4.0",
    "grunt-contrib-connect": "0.8.0",
    "grunt-contrib-cssmin": "0.9.0",
    "grunt-contrib-htmlmin": "0.3.0",
    "grunt-contrib-imagemin": "0.7.1",
    "grunt-contrib-jshint": "0.10.0",
    "grunt-contrib-uglify": "0.4.0",
    "grunt-contrib-watch": "0.6.1",
    "grunt-modernizr": "0.5.2",
    "grunt-ng-annotate": "0.3.2",
    "grunt-rev": "0.1.0",
    "grunt-svgmin": "0.4.0",
    "grunt-text-replace": "0.3.12",
    "grunt-usemin": "2.2.0",
    "load-grunt-tasks": "0.5.0",
    "grunt-karma": "0.8.3",
    "time-grunt": "0.3.2",
    "grunt-contrib-compass": "0.7.2",
    "event-stream": "3.1.5",
    "karma-script-launcher": "0.1.0",
    "karma-chrome-launcher": "0.1.4",
    "karma-html2js-preprocessor": "0.1.0",
    "karma-jasmine": "0.2.2",
    "karma-requirejs": "0.2.2",
    "karma-phantomjs-launcher": "0.1.4",
    "karma": "0.12.16",
    "bower": "1.3.5",
    "generator-jhipster": "1.4.0",
    "lodash": "2.4.1",
    "zeparser": "0.0.7"
  },
  "engines": {
    "node": ">=0.10.0"
  }
}

Error message:

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket o2Q8Ao934US0Nb_qCLdr with id 22395537
connect: res.headerSent: use standard res.headersSent
Fatal error: Cannot read property 'x-ua-compatible' of null


Execution Time (2014-10-28 04:34:31 UTC)
concurrent:test     3.4s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 84%
autoprefixer:dist  380ms  ▇▇▇▇ 9%
connect:test        44ms  ▇ 1%
karma:unit         232ms  ▇▇▇ 6%
Total 4.1s

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.854 s
[INFO] Finished at: 2014-10-28T12:34:35+08:00
[INFO] Final Memory: 15M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project twjug: Error during : grunt test --no-color: Process exited with an error: 3 (Exit value: 3) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project twjug: Error during : grunt 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:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    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:483)
    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 : grunt test --no-color
    at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:104)
    at com.github.trecloux.yeoman.YeomanMojo.logAndExecuteCommand(YeomanMojo.java:85)
    at com.github.trecloux.yeoman.YeomanMojo.grunt(YeomanMojo.java:73)
    at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:56)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 3 (Exit value: 3)
    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:102)
    ... 24 more
[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/MojoExecutionException

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

@jdubois, do you have any idea?

@jdubois
Copy link
Member

jdubois commented Oct 28, 2014

This looks related to Atmosphere, which makes the phantom.js tests fail. Could you try without Atomsphere?

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

It still got the same error without Atomsphere. I have tested on two different machines, both got this error.

.yo-rc.json

{
  "generator-jhipster": {
    "baseName": "twjug",
    "packageName": "org.phstudy.twjug",
    "packageFolder": "org/phstudy/twjug",
    "authenticationType": "cookie",
    "hibernateCache": "hazelcast",
    "clusteredHttpSession": "hazelcast",
    "websocket": "no",
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "postgresql",
    "useCompass": false,
    "buildTool": "maven",
    "frontendBuilder": "grunt",
    "javaVersion": "7"
  }
}

Error message:

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket 5BFOI8jsFHHVpjx_UChN with id 22395537
connect: res.headerSent: use standard res.headersSent
Fatal error: Cannot read property 'x-ua-compatible' of null


Execution Time (2014-10-28 10:32:11 UTC)
concurrent:test     2.1s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 53%
autoprefixer:dist  514ms  ▇▇▇▇▇▇ 13%
connect:test        76ms  ▇ 2%
karma:unit          1.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 32%
Total 4.1s

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.615 s
[INFO] Finished at: 2014-10-28T18:32:15+08:00
[INFO] Final Memory: 15M/225M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project twjug: Error during : grunt test --no-color: Process exited with an error: 3 (Exit value: 3) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project twjug: Error during : grunt 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:120)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    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:483)
    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 : grunt test --no-color
    at com.github.trecloux.yeoman.YeomanMojo.executeCommand(YeomanMojo.java:104)
    at com.github.trecloux.yeoman.YeomanMojo.logAndExecuteCommand(YeomanMojo.java:85)
    at com.github.trecloux.yeoman.YeomanMojo.grunt(YeomanMojo.java:73)
    at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:56)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 3 (Exit value: 3)
    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:102)
    ... 24 more
[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/MojoExecutionException

@jdubois
Copy link
Member

jdubois commented Oct 28, 2014

And can you run "grunt test" separately? It's because it fails that the Maven build fails

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

log of grunt test

study-mbpr:twjug-jhipster study$ grunt test
Running "clean:server" (clean) task
Cleaning .tmp...OK

Running "concurrent:test" (concurrent) task

    Running "copy:styles" (copy) task
    Copied 3 files

    Done, without errors.


    Execution Time (2014-10-28 10:47:37 UTC)
    loading tasks   4ms  ▇▇▇▇▇▇▇▇▇ 17%
    copy:styles    19ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 83%
    Total 23ms

Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/bootstrap.css created.
File .tmp/styles/documentation.css created.
File .tmp/styles/main.css created.

Running "connect:test" (connect) task
Started connect web server on http://0.0.0.0:9001

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket aycZaiJVYYkSTxJ6XkDE with id 22395537
connect: res.headerSent: use standard res.headersSent
Fatal error: Cannot read property 'x-ua-compatible' of null


Execution Time (2014-10-28 10:47:36 UTC)
concurrent:test     1.5s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 65%
autoprefixer:dist  315ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 14%
connect:test        45ms  ▇▇▇ 2%
karma:unit         431ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 19%
Total 2.3s

@jdubois
Copy link
Member

jdubois commented Oct 28, 2014

So this is in fact your "grunt test" which is not working, because of the "x-ua-compatible" property -> can you grep in your code to find out what it might be?

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

log of grep -iRn 'x-ua-compatible'

study-mbpr:twjug-jhipster study$ grep -iRn 'x-ua-compatible' .
./node_modules/bower/node_modules/insight/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./node_modules/generator-jhipster/app/templates/src/main/webapp/_index.html:8:        <meta http-equiv="X-UA-Compatible" content="IE=edge">
./node_modules/generator-jhipster/app/templates/src/main/webapp/htaccess.txt:91:    Header set X-UA-Compatible "IE=edge"
./node_modules/generator-jhipster/app/templates/src/main/webapp/htaccess.txt:95:        Header unset X-UA-Compatible
./node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-svgo/node_modules/svgo/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/console-browserify/test/static/index.html:4:    <meta http-equiv="x-ua-compatible" content="IE=8" >
./node_modules/grunt-svgmin/node_modules/svgo/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./node_modules/karma/lib/middleware/karma.js:40:  if (urlObj.query['x-ua-compatible']) {
./node_modules/karma/lib/middleware/karma.js:41:    tag = '\n<meta http-equiv="X-UA-Compatible" content="' +
./node_modules/karma/lib/middleware/karma.js:42:     urlObj.query['x-ua-compatible'] + '"/>';
./node_modules/karma/lib/middleware/karma.js:50:  if (urlObj.query['x-ua-compatible']) {
./node_modules/karma/lib/middleware/karma.js:51:    value = '?x-ua-compatible=' + encodeURIComponent(urlObj.query['x-ua-compatible']);
./node_modules/yo/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html:5:  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
./src/main/webapp/.htaccess:91:    Header set X-UA-Compatible "IE=edge"
./src/main/webapp/.htaccess:95:        Header unset X-UA-Compatible
./src/main/webapp/index.html:8:        <meta http-equiv="X-UA-Compatible" content="IE=edge">

@phstudy
Copy link
Contributor

phstudy commented Oct 28, 2014

The problem was caused by ./node_modules/karma/lib/middleware/karma.js, because urlObj.query was null.

var getXUACompatibleMetaElement = function(url) {
  var tag = '';
  var urlObj = urlparse(url, true);
  if (urlObj.query['x-ua-compatible']) {
    tag = '\n<meta http-equiv="X-UA-Compatible" content="' +
     urlObj.query['x-ua-compatible'] + '"/>';
  }
  return tag;
};

@Tony-Proum
Copy link

I have the same issue, only when I run maven build on Linux without UX. Using windows it works.
I Thought using an UX free OS may be the problem, indeed phantom js is a headless solution.

@jdubois
Copy link
Member

jdubois commented Dec 1, 2014

Yes you need a UX for phantom.js, otherwise it can't render anything. I guess you also need it for image minification, or it won't have the necessary libraries.

@Tony-Proum
Copy link

@jdubois Thank's i will try with a UX.
(The image minification jobs works, but not the phantomjs)

@Temkit
Copy link

Temkit commented Jul 14, 2015

hi guys,
what do you mean by " UX for phantom.js" ,
i am facing the same problem and can't resolv it for a week now, someone to help please,
here my error :

Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.4:build (run-grunt) on project cabinet-medical: Error during : node --version: Cannot run program "node" (in directory "/Users/retina/Dropbox/QEMWEB/WORK/PROJETS/LOGICIELS/hispter/cabinet_hipster_generate"): error=2, No such file or directory -> [Help 1]

@gmarziou
Copy link
Contributor

Your problem is very different: node executable has not been found in your path.
When you run 'node --version' in a terminal what does it say?

@kharmaodo
Copy link

I have the same error "failed to execute goal com.github.trecloux:yeoman-maven-plugin" when beginning with jhipster.
{
"name": "pegasus",
"version": "0.0.0",
"description": "Description for pegasus",
"private": true,
"dependencies": {
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-autoprefixer": "2.2.0",
"grunt-build-control": "0.3.0",
"grunt-wiredep": "2.0.0",
"grunt-browser-sync": "2.1.3",
"browser-sync": "2.9.6",
"grunt-contrib-copy": "0.8.0",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-concat": "0.5.1",
"grunt-contrib-cssmin": "0.11.0",
"grunt-contrib-htmlmin": "0.4.0",
"grunt-contrib-imagemin": "0.9.3",
"grunt-contrib-jshint": "0.11.0",
"grunt-contrib-uglify": "0.8.0",
"grunt-contrib-watch": "0.6.1",
"grunt-modernizr": "0.6.0",
"grunt-ng-annotate": "0.10.0",
"grunt-ng-constant": "1.1.0",
"grunt-rev": "0.1.0",
"grunt-svgmin": "2.0.1",
"grunt-text-replace": "0.4.0",
"grunt-usemin": "3.0.0",
"grunt-angular-templates":"0.5.7",
"load-grunt-tasks": "3.1.0",
"grunt-karma": "0.11.0",
"time-grunt": "1.1.0",
"grunt-sass": "1.0.0",
"event-stream": "3.3.1",
"jshint-stylish": "1.0.1",
"karma-script-launcher": "0.1.0",
"karma-chrome-launcher": "0.1.12",
"karma-html2js-preprocessor": "0.1.0",
"karma-jasmine": "0.3.5",
"karma-requirejs": "0.2.2",
"karma-phantomjs-launcher": "0.2.0",
"phantomjs": "1.9.17",
"karma": "0.12.35",
"karma-coverage": "0.4.2",
"karma-jenkins-reporter": "0.0.2",
"generator-jhipster": "2.21.1",
"lodash": "2.4.1",
"xml2js": "0.4.5",
"yo": ">=1.3.0",
"requirejs": "2.1",
"jasmine-core": "2.1.0",
"zeparser": "0.0.7",
"wiredep": "2.2.2"
},
"engines": {
"node": ">=0.12.0"
},
"scripts": {
"test": "grunt test"
}
}

@gmarziou
Copy link
Contributor

gmarziou commented Oct 5, 2015

@maodo don't use an old closed issue if you want to get some help and also provide log file.

@delkant
Copy link

delkant commented Jan 25, 2016

Where can I find instructions for installing "UX for phantom.js" ?. Thanks!

@gmarziou
Copy link
Contributor

This is a question for stackoverflow, please don't use issues.

@jdubois
Copy link
Member

jdubois commented Jan 25, 2016

why are you commenting on such an old issue?

@delkant
Copy link

delkant commented Jan 25, 2016

Until now I didn't need to use my project in production mode, so I never tried this option before. Somebody talked about "UX for Phanthon.js" here, so I thought it may be useful to have a reference to this step here. I'm sorry if I was wrong.

@arifdiu1
Copy link

arifdiu1 commented Oct 4, 2016

ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.4:build (run-grunt) on project step: Error during : bower install --no-color: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

@atomfrede
Copy link
Member

Please don't revive old issues. If you have an error take a look at your guidelines and open a new issue.

@jhipster jhipster locked and limited conversation to collaborators Oct 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests