Intellij not refreshig Web facets changes

Answered

Hi

i am using currently Intellij 2017.2.2 

Previously i was using 2016.2.5 and it was fine

Whats happening:

i have a web app where i have Javascript files in ...src\main\webapp\src\app

There is configured Web Facets, Web Resource Directory is set as

  • ...target\classes\webapp

Then there is war exploded artifact configured as following:

  • META-INF
  • WEB-INF/classes <-- module compile output
  • webapp <-- directory content (as in Facets)

 

artifact is created into target/SNAPSHOT/...

 

However when i do an updates in src directory:

  • target/classes <--- changes visible
  • target/snapshot/WEB-INF/classes <-- changes visible
  • target/webapp <-- not visible :(

 

Workaround is to add src\main\webapp\src\app to web Facets so:

There is configured Facets which Web Resource Directory contains:

  • src\main\webapp\src\app 

 

Then there is war exploded artifact configured as following:

  • META-INF
  • WEB-INF/classes <-- module compile output
  • webapp <-- directory content (as in Facets) [taken from src instead from target)

Workaround works fine but mvn intellij:instellij is always rewriting to previous configuration and change need to be done again

 

can you please advise?

 

0
4 comments

Normally web resource directory should point to the source location of your web resources, not to a directory that is produced during some build process (especially external).

0
Avatar
Permanently deleted user

hmm so then what is the reason that Intellij is creating configuration pointing to target directory? May it be somewhat project configuration problem on my side? Please not that this problem is occurring for all team members.

0

It would be easier if you could file an issue at https://youtrack.jetbrains.com/issues/IDEA or contact support via https://intellij-support.jetbrains.com/hc/ and attach a sample project that will reproduce the problem so that we can check if the problem is with the configuration and suggest a fix.

0
Avatar
Permanently deleted user
0

Please sign in to leave a comment.