Build issues packaging javascript into jar after upgrade to 2017.2

Answered

Our application is Java 8 and Gradle 4.0 using Spring Boot to run the API layer.

Our current application setup has a gradle task to copy the production build contents of the javascript directory from 'dist/prod' under the web directory to 'build/resources/main/public' under the API directory.  After the contents are copied we then assemble the jar and package the JS files into the jar.

We can then use IntelliJ to run a configuration for the API through SpringBoot which then launches the API layer.

In IntelliJ 2017.1.x and before, when we lunched the app through IntelliJ we could navigate the application.

In IntelliJ 2017.2 we are now getting a Whitelabel error page because the JS files are not being bundled into the jar.

We use this same process for end-to-end testing using Selenium, and our tests are throwing the same Whitelabel error message because the JS files are no longer bundled correctly.

If we assemble and host the API layer through the command line, everything behaves as expected as well as the end-to-end tests behaving the way we would expect.

Any assistance on how to get IntelliJ working again for us would be appreciated.

 

0
2 comments

IntelliJ IDEA no longer uses the same output paths as Gradle, see https://youtrack.jetbrains.com/issue/IDEA-175172 for details.

0
Avatar
Permanently deleted user

Thank you for the reference article.  It turns out the final answer was that our copy action was putting the javascript files into 'build/resources/main/public' for use by gradle, and we needed to put them into 'out/production/resources/public' for use by IntelliJ.

0

Please sign in to leave a comment.