jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.47k stars 4.02k forks source link

Unable to Build War Package #482

Closed akhil192502 closed 10 years ago

akhil192502 commented 10 years ago

Hi,

I have recently updated my jhipster to the latest version 0.18.1 and I am having an issue while creating the production WAR package.

I am getting the below error :

[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.2:build (run-grunt) on project gomapplication: Error during : grunt --force: 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 gomapplication: Error during : grunt --force at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Error during : grunt --force 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:75) at com.github.trecloux.yeoman.YeomanMojo.execute(YeomanMojo.java:56) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 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

I am also getting an error in my "imagemin" task. The stack trace is given below:

Running "imagemin:dist" (imagemin) task â src/main/webapp/images/Jcrop.gif (already optimized) â src/main/webapp/images/SocialShare.jpg (saved 870 B - 0%) â src/main/webapp/images/SocialShare_Square.jpg (saved 863 B - 0%) â src/main/webapp/images/ajax-loader.gif (saved 4.42 kB - 36%) â src/main/webapp/images/background_linen.jpg (already optimized) â src/main/webapp/images/background_linen_grey.png (saved 32.99 kB - 50%) â src/main/webapp/images/background_pinstripe.png (saved 35.42 kB - 53%) â src/main/webapp/images/background_triangle.jpg (already optimized) â src/main/webapp/images/controls.png (saved 53.69 kB - 97%) â src/main/webapp/images/favicon_16.png (saved 851 B - 70%) â src/main/webapp/images/favicon_32.png (saved 851 B - 55%) â src/main/webapp/images/googlepluse-ico.png (saved 2.72 kB - 83%) â src/main/webapp/images/headerLogo.png (saved 2.35 kB - 32%) Warning: Command failed: /home/ubuntu/source_code_git/gather-our-code/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/vendor/gifsicle -w -o /tmp/fa15d6e6-733e-429f-a0dd-7ef868012102 /tmp/96062604-3acb-4412-94a8-d3ad095783f8 gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#10: read error: unknown block type 0 at file offset 3743 gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#10: read error: image position and/or dimensions out of range gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#11: read error: image position and/or dimensions out of range gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#12: read error: image position and/or dimensions out of range gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#13: read error: image position and/or dimensions out of range gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#9: read error: image corrupted, code out of range (20 times) gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#9: read error: (not reporting more errors) gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#9: read error: missing 2061 pixels of image data gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#9: read error: image corrupted, code out of range (20 times) gifsicle:/tmp/96062604-3acb-4412-94a8-d3ad095783f8:#9: read error: (not reporting more errors) gifsicle: (plus more errors; is this GIF corrupt?) Used --force, continuing. Fatal error: Cannot read property 'contents' of undefined

The same code base was working earlier.

Can you help?

jdubois commented 10 years ago

For imagemin, this looks like an error in the "grunt-contrib-imagemin" module, we are just packaging it, and you should report the error to https://github.com/gruntjs/grunt-contrib-imagemin instead

Maybe you can also try with another version? If this solves your issue we will upgrade it.

finmurphy commented 10 years ago

Has anyone found a solution or a workaround to this? I'm having the same problem with 0.18.1 prod builds.

cheers, f

akhil192502 commented 10 years ago

@finmurphy you need to remove the 'gif' images from the imagemin task. Currently, the error comes when you try to minify gif images.