Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ease of use mongo-import goal #52

Open
yacota opened this issue Nov 11, 2015 · 2 comments
Open

Ease of use mongo-import goal #52

yacota opened this issue Nov 11, 2015 · 2 comments

Comments

@yacota
Copy link

yacota commented Nov 11, 2015

In #48 an easier way to import collections has been implemented, but I also think that being able to point to a "directory" instead of a single file(or list, whatever) would definetly increase the ease of use of this goal

<execution>
                <id>mongo-import</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>mongo-import</goal>
                </goals>
                <configuration>
                  <imports>
                    <import>
                      <database>${mongodb.database.name}</database>
                      <file>${basedir}/src/test/resources/mongodata</file>
                    </import>
                  </imports>
                </configuration>
              </execution>

In mongodata I have a few dozen of json files which are created by following the convention described in issue #48.

yacota added a commit to yacota/embedmongo-maven-plugin that referenced this issue Nov 11, 2015
@joelittlejohn
Copy link
Owner

Sounds good to me. I don't think we need to search directories recursively (this can introduce new edge-cases and issues) but definitely iterating every file in a given directory would be good.

Happy to accept a pull request for this if you have the time.

@joelittlejohn
Copy link
Owner

Ah, I just saw your pull request! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants