"Build Artifact" (from Maven-generated folder) in Run Configuration does not update
Hey,
i'm using a tomcat run/debug configuration deploying a artifact in my project. Therefore i use some "Before Launch" actions:
- Build
- Run Maven Goal
- Build Artifact
The Maven Goal uses a optional pom-definded exploded war goal to build all the needed webapplication sources into a special target folder. The Artifact just takes this folders "directory contents" and puts them into the artifacts output directory. After cleaning everything (remove the artifact folder), starting the app with "Run" generates all folders and starts the app as expected.
But from now all code changes where just deployed into the Maven output after re-Run the app - the artifact folder stays unchanged.
Please help me. Thank You.
(I'm using 2017.3.4 with macOS High Sierra)
Please sign in to leave a comment.
>The Maven Goal uses a optional pom-definded exploded war goal to build all the needed webapplication sources into a special target folder.
Please provide more details: post relevant maven configuration.
>But from now all code changes where just deployed into the Maven output after re-Run the app - the artifact folder stays unchanged.
Sorry the steps and the results you get is not quite clear. Please describe the exact steps you perform in IDE and the expected/actual result you get. Thanks.
Hey,
thanks for Your response.
The "full" maven configuration build a war file for our webapplication. The used limited configuration does the same but the last step - packing the war. The result is a complete "unpacked" webapp which is generated into a folder "target/folderX".
The artifact does nothing but add this folder into the output root (Artifact -> "+" -> "Directory Content"). The output root generates a folder "dist-idea/artifacts/my-artifact". The Run/Debug Config's "Before Launch" contains the steps as provided in the first post. After the artifact is initially builded as expected, a code change + restart of the Run / Debug Config doesn't update the artifact folder (the maven folder "target/folderX" is updated correctly).
I solved my problem by removing the artifact from the configuration and instead just adding the "target/folderX" as "External Source" in the "Deployment" tab.
best regards
Thank you for clarifications.
>restart of the Run / Debug Config doesn't update the artifact folder
Could you also clarify how do you restart? It works for me when I either user Rerun action or Update (which does the artifact re-deploy) in Debug tool window.
I've tested the "Run" and "Debug" Buttons in the main menu. Maybe Rerun works... yesterday there was 1 test which updated the files es expected... maybe i used the Rerun there.
Clicking Debug and selecting Restart server also works for me:
Yes thats what I also expected - but it doesn't.
... for the moment my "External Source" solution works fine for me. I think that will do for the moment.
Thank you for testing!