Create eclipse project from svn when folder name in SVN is src/java/com
In my SVN java source files are under src/java/com/... location. When I create the project in Eclipse I get the package java.com.... but files in there have defined package location as com.something.something., witho开发者_如何学Cut java name. So it makes all project invalid. If I try to re factor the package name I losing connection with SVN, cannot update , see changes and so on. Changing package name in each file is not an option. This is big application running in production. So actually the question is how I can make Eclipse project to be in sync with SVN and still make it compile.
The problem is that in your classpath you referring to the src directory as the source directory. Change it to be src/java/com.
i.e
<classpathentry kind="src" path="src/java/com" including="**/*.java"/>
Or you can change it from the UI,
Right click project -> Build Path ->
Configure Build Path -> Click "Source" tab ->
Click "src" folder -> Click Edit -> Change it to src/java/com
Edit: You might need to remove the src folder then add a new one. Put the check only next to the one src folder you want. Or just edit it from the .classpath file.
精彩评论