Reputation: 1409
I have imported mvn project but not able to run and compile any files
i have dir structure like project name/src/com/test/java
but my all classes have package name "com.test" but residing on path "/src/com/test/java"
so my question is how to exclude last folder, here is "java" in my project.
Upvotes: 2
Views: 1158
Reputation: 13858
You'll need to move some directories.
Maven project structure sais you have directory
src/main/java/ for application files and
src/test/java/ for test cases.
And your packages within that.
So you'll need yoir classes in
src/main/java/com/test/ or
src/main/java/com/test/
In project properties you can then set source dirs to src/main/java (remove src first if you still have that)
Check your eclipse Path settings:
Be sure to include the root-folders to your packages. So if your packages are com/test you'll want src/main/java/ as root folder.
If unclear, please share how your project is configured.
Upvotes: 1