If you run the command eclipse:eclipse from the parent folder, you need to open both of your projects 'module1' & 'module2' in the same workspace in order for it to work.
In the first case :
<classpathentry kind="var" path="M2_REPO/path/to/module1/module1-0.1.jar"/>
if you want to run your project 'module2' from eclipse it will look for its dependency 'module1' in the repository, that's mean any change you made in 'module1' won't be available for project module2 until you install it in the repository.
In the second case :
<classpathentry kind="src" path="/module1"/>
any change you made to project module1 will be immediately available for project module2, because the two projects are linked directly in the same workspace.