I have commited 开发者_如何转开发just the src folder and pom.xml of maven project into SVN repository in order to make it independent of IDE (As .settings, .project etc are files specific to eclipse ide)
Then when I'm trying to import the src folder in a newly created maven project (as it has the other files which are needed to run the project in eclipse), basically I only want to synchronize the src folder and pom.xml with the repository, I get a warning while I import the src folder 'as a folder in existing project' AS 'Destination project is detached from the source control. So please take into consideration that the plug-in won't provide any SVN actions for these resources' and then I'm not able to use Compare with and Team Options. It doesn't even show the revision no. besides the imported class files and folders.
Is there a way to do this ?? What is/are the usual industry practice/s ??
There're 2 options.
1.) Check out the SVN files using some other tool e.g. (TortoiseSVN) and then import the maven project using 'Materialize Maven Project'. This will create necessary metadata for eclipse and will also maintain the version info for the checked out project. See this reference http://www.sonatype.com/books/m2eclipse-book/reference/creating-sect-importing-projects.html
2.) The (better) other way is to download 'Maven SVN Integration' plugin using update site http://m2eclipse.sonatype.org/sites/m2e-extras/. Once you install the plugin, you would be able to see option 'Check out as Maven Project' in SVN repository exploring perspective.
Thanks, Prabhjot
精彩评论