First thing, example code you have written is fine. The error is not because of the code.
Please verify few things to resolve the issue:
1. Make sure you are using the "run as Scala application" option in Eclipse.
2. Cleaned the project once or delete .m2 directory.
3. Rename the demo1 to demo2 or something else. It will force the compiler to reset the package once.
Please try above and let me know if any of the above work for you or not.