I'm using maven as my build tool and I want to create a batch script that opens a cmd window in a given directory, runs my maven build command, doesn't exit on the build finishing AND allows me to just hit the up arrow and run the maven build again. My usecase would be running this script at the start of the day then being able to come back to it and executing a new build by just hitting the up arrow and enter.
Here's my current batch script, which does remain open after it runs the command, but it isn't saved to the cmd's history
cd /d C:\source\project
cmd /k mvn -U clean install