Open keithkml opened 9 years ago
PS: I don't have a grunt-maven.json file - am I supposed to?
You should have grunt-maven.json file generated automatically in your target-grunt
. Just check if it's there. Then - do you load gruntMavenProperties
in Gruntfile? (https://github.com/allegro/grunt-maven-npm#watch)
Yes, you can see in the original post that I do indeed include gruntMavenProperties.
here's target-grunt/grunt-maven.json
{
"filesToWatch": "/Users/keith/Code/wham/server-new-website/src/main/webapp/homepage/**",
"directoryToWatch": "/Users/keith/Code/wham/server-new-website/src/main/webapp/homepage",
"projectRootPath": "/Users/keith/Code/wham/server-new-website",
"targetPath": "/Users/keith/Code/wham/server-new-website/target",
"sourceDirectory": "src/main/webapp",
"jsSourceDirectory": "homepage",
"filteredFiles": ["**/node_modules.tar"]
}
Sorry, i missed that part :)
Could you run this via vanilla Grunt from target-grunt
with debug flag to see what watch
task thinks it watches?
Not sure I see a watch path...
$ grunt -d watch
Running "clean:0" (clean) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-clean/tasks/clean.js
Cleaning "build"...OK
Running "clean:1" (clean) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-clean/tasks/clean.js
Cleaning "bin"...OK
Running "html2js:app" (html2js) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-html2js/tasks/html2js.js
Successfully converted 1 html templates to js.
Running "html2js:common" (html2js) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-html2js/tasks/html2js.js
Successfully converted 1 html templates to js.
Running "jshint:src" (jshint) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-jshint/tasks/jshint.js
>> 9 files lint free.
Running "jshint:test" (jshint) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-jshint/tasks/jshint.js
>> 2 files lint free.
Running "jshint:gruntfile" (jshint) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-jshint/tasks/jshint.js
>> 1 file lint free.
Running "jshint:globals" (jshint) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-jshint/tasks/jshint.js
>> 0 files lint free.
Running "sass:build" (sass) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-sass/tasks/sass.js
Running "concat:build_css" (concat) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-concat/tasks/concat.js
File "build/assets/whamsite-0.1.0.css" created.
Running "copy:build_app_assets" (copy) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-copy/tasks/copy.js
Created 3 directories, copied 90 files
Running "copy:build_vendor_assets" (copy) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-copy/tasks/copy.js
Running "copy:build_appjs" (copy) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-copy/tasks/copy.js
Copied 9 files
Running "copy:build_vendorjs" (copy) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-copy/tasks/copy.js
Copied 5 files
Running "copy:build_vendorcss" (copy) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-copy/tasks/copy.js
Running "index:build" (index) task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/Gruntfile.js
Running "delta" task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-watch/tasks/watch.js
Waiting...
grunt -v watch
this will show you all paths
Seems to me that the issue is that it's looking in target-grunt for changes, not in my original source dir.
Running "delta" task
[D] Task source: /Users/keith/Code/wham/server-new-website/target-grunt/node_modules/grunt-contrib-watch/tasks/watch.js
Waiting...Options: interrupt=false, nospawn=false, event=["all"], target=undefined, cwd="/Users/keith/Code/wham/server-new-website/target-grunt", cliArgs=["-d","-v"], livereload
Verifying property delta exists in config...OK
Verifying property delta.gruntfile.files exists in config...OK
Verifying property delta.jssrc.files exists in config...OK
Verifying property delta.assets.files exists in config...OK
Verifying property delta.html.files exists in config...OK
Verifying property delta.tpls.files exists in config...OK
Verifying property delta.sass.files exists in config...OK
Verifying property delta.jsunit.files exists in config...OK
Live reload server started on port: 35729
Watching Gruntfile.js for changes.
Watching src/index.html for changes.
Watching src/assets/2AAF1C_0_0.eot for changes.
Watching src/assets/2AAF1C_0_0.ttf for changes.
Watching src/assets/2AAF1C_0_0.woff for changes.
Watching src/assets/2AAF1C_10_0.eot for changes.
Watching src/assets/2AAF1C_10_0.ttf for changes.
Watching src/assets/2AAF1C_10_0.woff for changes.
Watching src/assets/2AAF1C_11_0.eot for changes.
Watching src/assets/2AAF1C_11_0.ttf for changes.
Watching src/assets/2AAF1C_11_0.woff for changes.
Watching src/assets/2AAF1C_12_0.eot for changes.
Watching src/assets/2AAF1C_12_0.ttf for changes.
Watching src/assets/2AAF1C_12_0.woff for changes.
Watching src/assets/2AAF1C_13_0.eot for changes.
Watching src/assets/2AAF1C_13_0.ttf for changes.
Watching src/assets/2AAF1C_13_0.woff for changes.
Watching src/assets/2AAF1C_14_0.eot for changes.
Watching src/assets/2AAF1C_14_0.ttf for changes.
Watching src/assets/2AAF1C_14_0.woff for changes.
Watching src/assets/2AAF1C_15_0.eot for changes.
Watching src/assets/2AAF1C_15_0.ttf for changes.
Watching src/assets/2AAF1C_15_0.woff for changes.
Watching src/assets/2AAF1C_1_0.eot for changes.
Watching src/assets/2AAF1C_1_0.ttf for changes.
Watching src/assets/2AAF1C_1_0.woff for changes.
Watching src/assets/2AAF1C_2_0.eot for changes.
Watching src/assets/2AAF1C_2_0.ttf for changes.
Watching src/assets/2AAF1C_2_0.woff for changes.
Watching src/assets/2AAF1C_3_0.eot for changes.
Watching src/assets/2AAF1C_3_0.ttf for changes.
Watching src/assets/2AAF1C_3_0.woff for changes.
Watching src/assets/2AAF1C_4_0.eot for changes.
Watching src/assets/2AAF1C_4_0.ttf for changes.
Watching src/assets/2AAF1C_4_0.woff for changes.
Watching src/assets/2AAF1C_5_0.eot for changes.
Watching src/assets/2AAF1C_5_0.ttf for changes.
Watching src/assets/2AAF1C_5_0.woff for changes.
Watching src/assets/2AAF1C_6_0.eot for changes.
Watching src/assets/2AAF1C_6_0.ttf for changes.
Watching src/assets/2AAF1C_6_0.woff for changes.
Watching src/assets/2AAF1C_7_0.eot for changes.
Watching src/assets/2AAF1C_7_0.ttf for changes.
Watching src/assets/2AAF1C_7_0.woff for changes.
Watching src/assets/2AAF1C_8_0.eot for changes.
Watching src/assets/2AAF1C_8_0.ttf for changes.
Watching src/assets/2AAF1C_8_0.woff for changes.
Watching src/assets/2AAF1C_9_0.eot for changes.
Watching src/assets/2AAF1C_9_0.ttf for changes.
Watching src/assets/2AAF1C_9_0.woff for changes.
Watching src/assets/2AAF1C_A_0.eot for changes.
Watching src/assets/2AAF1C_A_0.ttf for changes.
Watching src/assets/2AAF1C_A_0.woff for changes.
Watching src/assets/2AAF1C_B_0.eot for changes.
Watching src/assets/2AAF1C_B_0.ttf for changes.
Watching src/assets/2AAF1C_B_0.woff for changes.
Watching src/assets/2AAF1C_C_0.eot for changes.
Watching src/assets/2AAF1C_C_0.ttf for changes.
Watching src/assets/2AAF1C_C_0.woff for changes.
Watching src/assets/2AAF1C_D_0.eot for changes.
Watching src/assets/2AAF1C_D_0.ttf for changes.
Watching src/assets/2AAF1C_D_0.woff for changes.
Watching src/assets/2AAF1C_E_0.eot for changes.
Watching src/assets/2AAF1C_E_0.ttf for changes.
Watching src/assets/2AAF1C_E_0.woff for changes.
Watching src/assets/2AAF1C_F_0.eot for changes.
Watching src/assets/2AAF1C_F_0.ttf for changes.
Watching src/assets/2AAF1C_F_0.woff for changes.
Watching src/assets/README.md for changes.
Watching src/assets/_fonts.css for changes.
Watching src/assets/clients-section for changes.
Watching src/assets/colorsplotches-02.png for changes.
Watching src/assets/confused-section for changes.
Watching src/assets/feature_icons-01.png for changes.
Watching src/assets/feature_icons-02.png for changes.
Watching src/assets/feature_icons-03.png for changes.
Watching src/assets/feature_icons-04.png for changes.
Watching src/assets/feature_icons-05.png for changes.
Watching src/assets/feature_icons-06.png for changes.
Watching src/assets/feature_icons-07.png for changes.
Watching src/assets/feature_icons-08.png for changes.
Watching src/assets/feature_icons-09.png for changes.
Watching src/assets/feature_icons-10.png for changes.
Watching src/assets/feature_icons-11.png for changes.
Watching src/assets/feature_icons-12.png for changes.
Watching src/assets/feature_icons-13.png for changes.
Watching src/assets/clients-section/icon-x-nocircle.png for changes.
Watching src/assets/clients-section/info-button-hover.png for changes.
Watching src/assets/clients-section/info-button.png for changes.
Watching src/assets/clients-section/play-button-hover.png for changes.
Watching src/assets/clients-section/play-button.png for changes.
Watching src/assets/confused-section/features-pricing-icon.png for changes.
Watching src/assets/confused-section/lightshow-editor-icon.png for changes.
Watching src/assets/confused-section/live-events-icon.png for changes.
Watching src/app/about/about.tpl.html for changes.
Watching src/app/clients-section/clients-section.tpl.html for changes.
Watching src/app/confused-section/confused-section.tpl.html for changes.
Watching src/app/features-section/features-section.tpl.html for changes.
Watching src/app/home/home.tpl.html for changes.
Watching src/app/how-section/how-section.tpl.html for changes.
Watching src/app/signup-section/signup-section.tpl.html for changes.
Watching src/app/about/about.js for changes.
Watching src/app/app.js for changes.
Watching src/app/clients-section/clients-section.js for changes.
Watching src/app/confused-section/confused-section.js for changes.
Watching src/app/features-section/features-section.js for changes.
Watching src/app/home/home.js for changes.
Watching src/app/how-section/how-section.js for changes.
Watching src/app/signup-section/signup-section.js for changes.
Watching src/common/plusOne/plusOne.js for changes.
Watching src/app/clients-section/_clients-section.scss for changes.
Watching src/app/confused-section/_confused-section.scss for changes.
Watching src/app/features-section/_features-section.scss for changes.
Watching src/app/how-section/_how-section.scss for changes.
Watching src/app/signup-section/_signup-section.scss for changes.
Watching src/scss/_variables.scss for changes.
Watching src/scss/main.scss for changes.
Watching src/scss/bourbon/_bourbon-deprecated-upcoming.scss for changes.
Watching src/scss/bourbon/_bourbon.scss for changes.
Watching src/scss/bourbon/addons/_button.scss for changes.
Watching src/scss/bourbon/addons/_clearfix.scss for changes.
Watching src/scss/bourbon/addons/_directional-values.scss for changes.
Watching src/scss/bourbon/addons/_ellipsis.scss for changes.
Watching src/scss/bourbon/addons/_font-family.scss for changes.
Watching src/scss/bourbon/addons/_hide-text.scss for changes.
Watching src/scss/bourbon/addons/_html5-input-types.scss for changes.
Watching src/scss/bourbon/addons/_position.scss for changes.
Watching src/scss/bourbon/addons/_prefixer.scss for changes.
Watching src/scss/bourbon/addons/_retina-image.scss for changes.
Watching src/scss/bourbon/addons/_size.scss for changes.
Watching src/scss/bourbon/addons/_timing-functions.scss for changes.
Watching src/scss/bourbon/addons/_triangle.scss for changes.
Watching src/scss/bourbon/addons/_word-wrap.scss for changes.
Watching src/scss/bourbon/css3/_animation.scss for changes.
Watching src/scss/bourbon/css3/_appearance.scss for changes.
Watching src/scss/bourbon/css3/_backface-visibility.scss for changes.
Watching src/scss/bourbon/css3/_background-image.scss for changes.
Watching src/scss/bourbon/css3/_background.scss for changes.
Watching src/scss/bourbon/css3/_border-image.scss for changes.
Watching src/scss/bourbon/css3/_border-radius.scss for changes.
Watching src/scss/bourbon/css3/_box-sizing.scss for changes.
Watching src/scss/bourbon/css3/_calc.scss for changes.
Watching src/scss/bourbon/css3/_columns.scss for changes.
Watching src/scss/bourbon/css3/_filter.scss for changes.
Watching src/scss/bourbon/css3/_flex-box.scss for changes.
Watching src/scss/bourbon/css3/_font-face.scss for changes.
Watching src/scss/bourbon/css3/_font-feature-settings.scss for changes.
Watching src/scss/bourbon/css3/_hidpi-media-query.scss for changes.
Watching src/scss/bourbon/css3/_hyphens.scss for changes.
Watching src/scss/bourbon/css3/_image-rendering.scss for changes.
Watching src/scss/bourbon/css3/_keyframes.scss for changes.
Watching src/scss/bourbon/css3/_linear-gradient.scss for changes.
Watching src/scss/bourbon/css3/_perspective.scss for changes.
Watching src/scss/bourbon/css3/_placeholder.scss for changes.
Watching src/scss/bourbon/css3/_radial-gradient.scss for changes.
Watching src/scss/bourbon/css3/_transform.scss for changes.
Watching src/scss/bourbon/css3/_transition.scss for changes.
Watching src/scss/bourbon/css3/_user-select.scss for changes.
Watching src/scss/bourbon/functions/_assign.scss for changes.
Watching src/scss/bourbon/functions/_color-lightness.scss for changes.
Watching src/scss/bourbon/functions/_flex-grid.scss for changes.
Watching src/scss/bourbon/functions/_golden-ratio.scss for changes.
Watching src/scss/bourbon/functions/_grid-width.scss for changes.
Watching src/scss/bourbon/functions/_modular-scale.scss for changes.
Watching src/scss/bourbon/functions/_px-to-em.scss for changes.
Watching src/scss/bourbon/functions/_px-to-rem.scss for changes.
Watching src/scss/bourbon/functions/_strip-units.scss for changes.
Watching src/scss/bourbon/functions/_tint-shade.scss for changes.
Watching src/scss/bourbon/functions/_transition-property-name.scss for changes.
Watching src/scss/bourbon/functions/_unpack.scss for changes.
Watching src/scss/bourbon/helpers/_convert-units.scss for changes.
Watching src/scss/bourbon/helpers/_gradient-positions-parser.scss for changes.
Watching src/scss/bourbon/helpers/_is-num.scss for changes.
Watching src/scss/bourbon/helpers/_linear-angle-parser.scss for changes.
Watching src/scss/bourbon/helpers/_linear-gradient-parser.scss for changes.
Watching src/scss/bourbon/helpers/_linear-positions-parser.scss for changes.
Watching src/scss/bourbon/helpers/_linear-side-corner-parser.scss for changes.
Watching src/scss/bourbon/helpers/_radial-arg-parser.scss for changes.
Watching src/scss/bourbon/helpers/_radial-gradient-parser.scss for changes.
Watching src/scss/bourbon/helpers/_radial-positions-parser.scss for changes.
Watching src/scss/bourbon/helpers/_render-gradients.scss for changes.
Watching src/scss/bourbon/helpers/_shape-size-stripper.scss for changes.
Watching src/scss/bourbon/helpers/_str-to-num.scss for changes.
Watching src/scss/bourbon/settings/_asset-pipeline.scss for changes.
Watching src/scss/bourbon/settings/_prefixer.scss for changes.
Watching src/scss/bourbon/settings/_px-to-em.scss for changes.
Watching src/app/app.spec.js for changes.
Watching src/app/home/home.
Hm, thats weird - see sandbox project - the output there shows:
Watching ../src/main/webapp/static for changes.
Watching ../src/main/webapp/static/bin for changes.
Watching ../src/main/webapp/static/test for changes.
Watching ../src/main/webapp/static/Gruntfile.js for changes.
Notice that it first goes up one ../src/...
to watch files in src. Can you check if sandbox works for you?
Yep, sandbox works great. What do you think the difference might be?
I dont see much of a differemce, can you enter path for files to be watchhed manually and see if it catches the right files? Lets debug it step by step, first we rule out grun-maven.json
fault.
Sure, enter those paths where?
Just enter path from filesToWatch
property from grunt-maven.json to watch task files in gruntfile (instead of template).
What i mean is to use:
watch: {
maven: {
files: ['/Users/keith/Code/wham/server-new-website/src/main/webapp/homepage/**'],
tasks: 'default'
}
}
I couldn't write it while replying via mobile :)
I'm trying to run
mvn grunt:grunt -Dtarget=watch
. It hangs at "waiting..." forever, even after I change source files.Here's the relevant part of my pom.xml:
And my build.config.js:
AND some relevant parts of my Gruntfile: