I had to do a similar thing. Here is what I did.
First, I create a new workspace and in there create a new, empty project of the same name. I exited Eclipse and zipped up the workspace directory.
Then, during a build, I performed these steps:
1) Extracted the source for my project from Subversion (actually,
Jenkins did this for me)
2) Unzipped the workspace with the empty project into another location.
3) Copied my project's sources to the empty project in the unzipped workspace.
4) Ran the following Eclipse command to build the project:
cmd /c ${eclipse.exe} -nosplash -refresh -application org.eclipse.jdt.apt.core.aptBuild -data ${workspace_dir}
where ${eclipse.exe} was the full path to exclipsec.exe and ${workspace_dir} was the full path where I unzipped the workspace with the empty project.
By the way, I had to run n this command three times because the "-refresh" option did not fully work the first time around. On some PCs it worked on the second time, but on a few PCs it required a third try.
After this, I copied the source to the original project location and let
Maven build them from there. I did it this way because the project made use a a plugin that generated
Java sources as part of build time - the data used to generate those source was stored in XML files (the plugin provided a graphics editor, and stored the graphics in the XML files) and we stored the XML files in Subversion. This build process was ugly, but it worked. Fortunately we are replacing this Eclipse plugin with other software and won;t have to go through these gyrations in the future.
I hope this helps you.