Open amicos opened 9 years ago
I'm stuck on it
Can you show tree of your project? and mark where you need your package.json to reside in.
The tree of my project:
MyProject
├── src
------├── main
------------├──webapp
------------------├──app
------------ -----------├──projects scripts and files
------------------------├── index.html
------------------├──dist
------------------├── test
------------------├──WEB-INF
------------------├── GruntFile.js
------------------├──package.json
├──pom.xml
I want my pom to build my project to have in final the war
I guess the formatting is wrong - can you edit it so i can see the indentations?
Okay, i guess you need to add some more formatting to your pom as well, as i can't see the whole.
I do it
Okay, sto there are two problems:
jsSourceDirectory
is relative to sourceDirectory
, so you should not put the whole there, app
would be enoughGruntFile.js
and package.json
need to be present in jsSourceDirectory
I modify the Pom :
< jsSourceDirectory> ${basedir}/src/main/webapp </ jsSourceDirectory>
but I have this issue :
error errno -4058 error package.json ENOENT, open 'C:\workspace\JcdstreamIhm\target-grunt\package.json' error package.json This is most likely not a problem with npm itself. error package.json npm can't find a package.json file in your current directory. verbose exit [ -4058, true ]
I don't know what did you change - can you shod the relevant bits?
< jsSourceDirectory> ${basedir}/src/main/webapp </ jsSourceDirectory>
in the webapp I have the GruntFile.js and package.json
As i mentioned earlier, jsSourceDriectory
should contain relative path, just change it it app - if your gruntfile and package.json are in app.
Ok I use the relative path. I want to build my project and generate the war. do you think the goals I used are enough to reach my target. Thanks
If your configuration (i.e. npm works) is okay, that should be enough.
I have this issue when i do : mvn install
npm ERR! install Couldn't read dependencies
ERR! errno -4058
ERR! package.json ENOENT, open 'C:\workspace\MyProject\package.json' ERR! package.json This is most likely not a problem with npm itself. ERR! package.json npm can't find a package.json file in your current directory
My Pom File:
how to specify the path of package.json and gruntfile to the plugin because my pom isnt in the same repesitory (the pom is in the default root of project and all the others files are in webapp)? who can help me please?