- This topic has 9 replies, 3 voices, and was last updated 11 years, 11 months ago by support-piotr.
-
AuthorPosts
-
tim5901ParticipantWhen checking out a maven project from subversion the project is not materializing properly. It does not set the classpath source directories correctly. It only sets “src” in the classpath. It does not set “src/main/java”, “src/main/resources”, src/test/java”, and “src/test/resources”.
I am using the following.
MyEclipse Bling 10.6
Maven SCM handler for Subclipse 0.14.0
Subclipse 1.8.14
support-swapnaModeratortim5901,
Sorry that you are seeing this issue.
Can you answer some more questions for us ?
1. Is the project in SVN a pure Maven project or a MyEclipse project ?
2. To check out maven projects, use File->Import->Maven4MyEclipse->Checkout Maven Projects from SCM.
3. Do you see any errors when importing the project from SVN ? Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log. Now replicate the issue and copy paste the contents of the .log file here for us.
4. Can you please also attach your .project file for the project that is causing problems, to help us investigate further ?
tim5901ParticipantWell, I sat down today to go through the process and get all the information you wanted but now all the projects I was having problems with are working.
If the problem crops up again I will gather all the information you asked for an re-post the question.
Thank you for taking the time to respond.
support-swapnaModeratortim5901,
Glad that you got them working.
Do let us know if you see any issues.
tim5901ParticipantWell I am having this problem again. I just imported about 5 different projects and they all materialized with just src as the build path. Here are the answers to the questions posted earlier.
1. The project is a pure Maven project. The pom.xml file and the src directory, thats it.
2. Normally I go into the SVN perspective and check them out from there using the “Checkout As Maven Project”. I just tried using the File->Import method but still had the build path problem.
3. Nope, no errors in the .log file
4. The .project file is attached.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratortim5901,
Sorry that you are seeing the issue.
1. Can you please use “Update Project Configuration” after importing the project and check if it fixes the issue? Right click on the project > Maven4MyEclipse > Update Project Configuration.
2. If the issue still persists, we need all .* files (.project, .classpath, .settings folder, etc.) and pom.xmls (you can remove dependencies lists) and all files should be aligned in folders as they are in the repository to investigate further.
tim5901Participant1. Update Project Configuration did not work.
2. The entire project is attached.
Attachments:
You must be logged in to view attached files.
support-piotrParticipanttim5901,
Thank you for sending an example project! I have checked it and I can suggest you a solution.
If I import the project (Import -> Maven -> Existing Maven project) as you have provided us (with eclipse specific files – .project, .classpath, .settings), the classpath (which describes source folders also) will not be updated. However, if I remove all eclipse project files (.project, .settings and especially .classpath), and import the projet, all of the files will be recreated and classpath will get properly updated to point correct Maven source folders.
Please check if the project is checked into your SVN repository with eclipse configuration files, especially .classpath file. If so, you have two options:
1. Import the project from SVN using Maven wizard, delete it from workspace (not removing contents on disk) and remove .classpath and .project files using windows explorer. Next import that project using Import -> Maven -> Existing Maven project wizard. That should create correct source folders layout. You can commit those changes to SVN.
2. Remove the .settings dir, .classpath and .project files from the repository and set svn-ignore for them and rely on pom.xml file for recreating the project’s eclipse metadata on import.More correct solution would be the second one, but it requires Maven plugin to be installed in the eclipse, so it’s not always possible.
Let us know if you have managed to solve the issue!
tim5901ParticipantAll my maven projects are stored in subversion with only the pom.xml and the src directory, no other files.
I have the Maven SCM plugin for subversion installed (see my initial post).
But this still is not working for me.
support-piotrParticipanttim5901,
Unfortunately, the Maven SCM plugin for subversion is not managed by us and we cannot do anything more here. For any further assistance, please refer to the developers of the plugin. However, we might take it and some more connectors under our support in a future.
For now, I can only propose a workaround. After checking out the project using SCM connector, please right click on the “src” folder -> Build path -> Remove from Build path. After that, update project configuration. I had to remove reference to parent pom from the example project you had sent me, before the update configuration worked, so I would suggest checking out parent project first. If you have hierarchical pom.xml structure, you should check out just the topmost project.
Let us know how it works for you!
-
AuthorPosts