I want to run a command
mvn clean dbmaintain:updateDatabase
How can I run this command for a project opened in IntelliJ IDEA 12?
If I will run this command, will it automatically run the scripts commands on my db server that's mentioned in my pom.xml file or jdbc.properties file?
Run commandsStart typing the command name and navigate the suggestion list using the arrow keys. When you press Space , you accept the current suggestion and get further suggestions specific to this command. To get the list of available commands, type ? . The list of commands depends on the installed/enabled plugins.
Create a run/debug Maven configuration From the main menu, select Add Configuration. Alternatively, right-click any task in the Maven tool window and select Modify Run Configuration.
If your project has been detected by IntelliJ as a Maven project, then you should take a look at the Maven project
window, on the right side. Your project should show up as a node, with a Lifecycle
subnode. If you expand it, you will see the available goals, including clean
.
Right-click on this goal, choose Create yourProject[clean]
and in the popup window you will be able to add extra goals to run, including dbmaintain:updateDatabase
. Running this configuration will be exactly the same as running the command from an external command prompt.
If your project has not been detected as a Maven project, try reimporting it by opening the root pom.xml
using File > Open
. IntelliJ will ask if you want to reopen the project using the Maven structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With