私のアプリケーションは開発中に正常に動作します。プロダクションビルドを実行すると、build/lib/www/appフォルダーにapp.jsがありません。誰も私のビルドで何がうまくいかないのかを追跡する方法についていくつかの洞察を提供することができますか?JHipster gulpビルドでプロダクション用のapp.jsが生成されない
ありがとうございました。
更新: 何が起こっているのかを理解しようとするすべてのgulpfileを歩き、最終的にassets:prodタスクの最後に呼び出されるビルド関数に到達しました。その関数の中で、私はテスト文字列と行
.pipe(gulpIf( '**/app.js'、フッタ(テンプレート)))
でテンプレート変数を置き換え、それが動作します。だから今私は多くの人のテンプレートが問題を引き起こしているかどうかを考え出すことに専念しています。何が痛い。エラーが発生した場所の近くの文字の一部など、より多くの情報をGulpに与える方法はありますか?
./gradlew -Pprod clean bootRepackage
Starting a Gradle Daemon (subsequent builds will be faster)
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at gatling_b4a4yvzsw9z41nm1decp5w4n3.run(/Users/jreymann/projects-java/us.netblue/gradle/gatling.gradle:23)
:clean
:cleanResources UP-TO-DATE
:bootBuildInfo
:bower
:nodeSetup SKIPPED
:npmSetup SKIPPED
:npmInstall UP-TO-DATE
:gulpBuildWithOpts
[12:29:58] Using gulpfile ~/projects-java/us.netblue/gulpfile.js
[12:29:58] Starting 'clean'...
[12:29:58] Finished 'clean' after 4.63 ms
[12:29:58] Starting 'build'...
[12:29:58] Starting 'copy:fonts'...
[12:29:58] Starting 'copy:common'...
[12:29:58] Starting 'inject:vendor'...
[12:29:58] Starting 'ngconstant:prod'...
[12:29:58] Finished 'ngconstant:prod' after 23 ms
[12:29:58] gulp-inject 1 files into vendor.scss.
[12:29:58] Finished 'copy:common' after 78 ms
[12:29:58] gulp-inject 19 files into index.html.
[12:29:58] Finished 'inject:vendor' after 79 ms
[12:29:58] Finished 'copy:fonts' after 98 ms
[12:29:58] Starting 'copy'...
[12:29:58] Finished 'copy' after 19 μs
[12:29:58] Starting 'inject:app'...
[12:29:58] gulp-inject 143 files into index.html.
[12:29:58] Finished 'inject:app' after 168 ms
[12:29:58] Starting 'inject:troubleshoot'...
[12:29:58] gulp-inject Nothing to inject into index.html.
[12:29:58] Finished 'inject:troubleshoot' after 2.07 ms
[12:29:58] Starting 'images'...
[12:29:58] Starting 'sass'...
[12:29:58] Starting 'html'...
[12:29:58] Starting 'copy:swagger'...
[12:29:58] Starting 'copy:images'...
[12:29:58] Finished 'copy:images' after 8.98 ms
[12:29:59] Tested 18 tests, 18 passes, 0 failures: PASS
[12:29:59] gulp-imagemin: Minified 6 images (saved 6.79 kB - 17%)
[12:29:59] Finished 'images' after 459 ms
[12:29:59] Finished 'sass' after 492 ms
[12:29:59] Starting 'styles'...
[12:29:59] Finished 'styles' after 2.21 ms
[12:29:59] Finished 'html' after 527 ms
[12:29:59] Finished 'copy:swagger' after 527 ms
[12:29:59] Starting 'assets:prod'...
[12:30:12] Finished 'assets:prod' after 13 s
[12:30:12] Finished 'build' after 14 s
:processResources
:compileJava
[Fatal Error] shrinkwrap-descriptors-bom-2.0.0-alpha-3.pom:130:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
[Fatal Error] shrinkwrap-descriptors-bom-2.0.0-alpha-3.pom:130:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-parent-39.pom:1506:5: The markup in the document following the root element must be well-formed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-parent-39.pom:1506:5: The markup in the document following the root element must be well-formed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
:compileScala UP-TO-DATE
:classes
:findMainClass
:war
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
:bootRepackage
BUILD SUCCESSFUL
私は個別にゴクゴクビルドを実行する場合、私が取得:
gulp build
[12:05:12] Using gulpfile ~/projects-java/us.netblue/gulpfile.js
[12:05:12] Starting 'clean'...
[12:05:12] Finished 'clean' after 21 ms
[12:05:12] Starting 'build'...
[12:05:12] Starting 'copy:fonts'...
[12:05:12] Starting 'copy:common'...
[12:05:12] Starting 'inject:vendor'...
[12:05:12] Starting 'ngconstant:prod'...
[12:05:12] Finished 'ngconstant:prod' after 25 ms
[12:05:12] gulp-inject 1 files into vendor.scss.
[12:05:12] Finished 'copy:common' after 80 ms
[12:05:12] gulp-inject 19 files into index.html.
[12:05:12] Finished 'inject:vendor' after 80 ms
[12:05:12] Finished 'copy:fonts' after 104 ms
[12:05:12] Starting 'copy'...
[12:05:12] Finished 'copy' after 24 μs
[12:05:12] Starting 'inject:app'...
[12:05:13] gulp-inject 143 files into index.html.
[12:05:13] Finished 'inject:app' after 179 ms
[12:05:13] Starting 'inject:troubleshoot'...
[12:05:13] gulp-inject Nothing to inject into index.html.
[12:05:13] Finished 'inject:troubleshoot' after 2.19 ms
[12:05:13] Starting 'images'...
[12:05:13] Starting 'sass'...
[12:05:13] Starting 'html'...
[12:05:13] Starting 'copy:swagger'...
[12:05:13] Starting 'copy:images'...
[12:05:13] Finished 'copy:images' after 7.44 ms
[12:05:13] Tested 18 tests, 18 passes, 0 failures: PASS
[12:05:13] gulp-imagemin: Minified 6 images (saved 6.79 kB - 17%)
[12:05:13] Finished 'images' after 439 ms
[12:05:13] Finished 'sass' after 483 ms
[12:05:13] Starting 'styles'...
[12:05:13] Finished 'styles' after 1.42 ms
[12:05:13] Finished 'html' after 511 ms
[12:05:13] Finished 'copy:swagger' after 514 ms
[12:05:13] Starting 'assets:prod'...
[12:05:26] gulp-notify: [JHipster Gulp Build] Error: Unexpected token .
[12:05:26] Finished 'assets:prod' after 13 s
[12:05:26] Finished 'build' after 14 s
私は同じ問題があります。どのようにして「一度に1つのテンプレートを1つずつ試してみましたか」 –
gulpビルドプロセスの一部は、プロジェクトルートのbuild/tmp/templates.jsにある角度のあるテンプレートキャッシュファイルを生成します。これは、正しく覚えていれば、gulpfile.jsの "html"タスクで行われます。template.jsが生成されるようにビルドを試してからビルドプロセスのその部分をコメントアウトして、ファイルが再生成されないようにすることができます。次に、templates.jsで、最初のものを除くすべての$ templateCache.put行をコメントアウトし、ビルドを再実行します。成功した場合は、ビルドの失敗を引き起こすテンプレートを見つけるまで次の行のコメントを外してビルドをやり直してください。 –