Assume the test I want to run is URLToolboxDeploymentTest. Go to the integration tests root, for ex: $BAM_PRODUCT/modules/integration/ and run the command (I use the wildcards, i.e. the asterisk since I’m too lazy to type),
mvn test -Dtest=*TestServer*,URLToolbox*
This will startup the Carbon server and execute the required integration test.
Vim’s ability to execute commands from vim itself adds a great deal of productivity. Although, it’s debatable that it’s the best editor for Java, I made an attempt to work with maven3 inside vim and integrate it with vim’s quick fix list. Disclaimer: I’m not a vim expert, just an enthusiast. Please drop a comment as this tip is in need of improvements.
First, change make to work with maven. I’ve added -q so that only errors will reach the console.
set makeprg=mvn\ compile\ -q\ -f\ pom.xml
Change the error format to match maven3 output. Disclaimer: This is not perfect, but it manages to pick up the maven3 errors.
set errorformat=[ERROR]\ %f:[%l%.%c]%m
Change your working directory to the root of the maven project with :cd
Execute make with :make
Here’s the output I get.
Now, if you have errors it should show in the quick fix list as depicted below (Use :copen to open the quick fix list)
Now navigate and fix with :cn and :cp. Cheers!