Jhipster:关于空白项目的Grunt问题

时间:2017-01-28 16:14:18

标签: gruntjs jhipster

我正在尝试打包Jhipster 2.1.1应用程序 我知道它不再受支持了,但是我维护这个webapp并且我们无法升级Jhipster版本。
由于Grunt的包装不起作用,我刚刚创建了一个空白的应用程序(为了测试Grunt)并运行:

mvn -Pprod package -Dmaven.test.skip=true

我得到: [

ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project jhipster: 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 jhipster: Error during : grunt test --no-color
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    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:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
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:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 26 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)
    ... 31 more

[UPDATE]

➜  grunt -V
grunt-cli v1.2.0
grunt v0.4.5
➜  bower -v
1.8.0
➜  node -v
v4.7.2

我发现pb,jasmine-core和requireJs丢失了。现在包装工作正常。但是当我在Tomcat7上部署战争时,图像('jhipster man')没有显示出来。我在浏览器中收到这些错误:

Failed to load resource: the server responded with a status of 404 (Introuvable)
http://localhost:8181/jhipster/api/account?cacheBuster=1485698191924 Failed to load resource: the server responded with a status of 401 (Non-Autorisé)
http://localhost:8181/assets/images/5483e159.hipster.png Failed to load resource: the server responded with a status of 404 (Introuvable)
http://localhost:8181/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 Failed to load resource: the server responded with a status of 404 (Introuvable)
http://localhost:8181/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff Failed to load resource: the server responded with a status of 404 (Introuvable)
http://localhost:8181/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf Failed to load resource: the server responded with a status of 404 (Introuvable)

0 个答案:

没有答案