Closed pvardanega closed 9 years ago
Thanks a lot for submitting this, it looks like a very useful feature! I must admit though, my preference would be to add this to the start goal. I think this will be simpler for users of this plugin - less verbose, no need to repeat the port (which may not be particularly intuitive when the port is randomly assigned), no need to worry about ordering of start
and init-data
.
I guess the benefit of this new goal is that it can be run without starting a mongodb instance. Is that how you need to be able to run this in your build?
Yes, you are totally right. I'll improve this pull request :+1:
Great thanks. You can extract what you've done here into some class that is called from the start
mojo, then add databaseName
and initDirectory
as new config options.
I'm going to close this pull request for now, we'll definitely work your commits in to the core but we'll probably pull manually into a new branch and rationalise this and #41 before merging. Thanks!!
(If you could leave your fork & branch around that would be helpful :))
Insert data during
start
goal. It needs the folder where the data files to execute are and the database name where that data will be stored in mongo.Works like this: