I’m using the Maven DBUnit plugin to load test data for unit tests. I’d also like to use it for loading a different set of data to a different db for demo purposes. The dbunit plugin only allows for a single execution. Should I just create a separate pom or is there some trick that I can do to make this happen. (I.e., I’d like to simply do something like mvn load-demo-data).
Share
you can execute a plugin several times if you like it depends just on the configuration you give in the pom:
You can also define a profile to control the execution which might the right choice for your demo data. The call you described mvn load-demo-data is not possible with maven, cause maven calls only a goal or lifecycle.