score:0
I recently started using Subclipse and have a method that works for me. We're working with PHP applications, so I create a new SVN project through the Eclipse project wizard, choosing to 'Checkout Projects through SVN'. I then configure that project using the project configuration wizard and select PHP as the project type. I name the project so that in my workspace I have the project name at the top-level of the project explorer.
I never commit anything that is created specifically for Eclipse, especially since not everybody on our team uses Eclipse. That means excluding the .project files and any other Eclipse-created files.
An additional benefit of using this method is that you can have more than one repository checked out into the workspace. We work with two repository locations for our project (for specific reasons that I won't go into), so this makes it easy and convenient for me to work on both 'projects' simultaneously.
I'm sure there are other ways to do this, but this is what I have found to be the easiest way to use Subversion and Eclipse.
score:1
Ickster says "...but as you know, they can be imported from an external source--the import is just a logical link."
Actually, this is not quite true. An import performs a copy, whereas a linked resource is a link to the outside source structure. See: Linked Resources and Creating Linked Resources
score:2
In both Macromedia Dreamweaver and Eclipse I've been doing the following:
Working folder:
C:\Development\
\ProjectA
\ProjectB
\ProjectC
Each project has its own repository, and each checkout is only of the /trunk/.
Note: For Eclipse, don't create a SVN Repository project, just create the "Java App" or "PHP App" project like you normally would, and use an external program to do the checkout into that folder. Eclipse will then automagically detect the .svn information and allow you to use the SVN tools, while still using the proper workspace.
score:2
I use, and strongly recommend the repository structure something like:
- Projects
- ProjectA
- trunk
- java
- html
- docs
- conf
- trunk
- ProjectA
- Vendor
- junit
- current
- 1.1
- 1.2
- junit
On disk use a layout like:
c:\dev\
\ProjectAtrunk\
\ProjectBbranch4\
Working this way you're branches and tags are near your trunks and you're unlikely to depend upon the structure of the projects in your repository to reference external libraries. All references to code outside the project trunk should use externals.
All this means that you're more likely to be able to keep the maxim that checking out trunk is all you need to be able to build your project. Shared code is kept in and managed as a separate project and referenced with externals.
You're more able to view changes on a project trunk and see a complete history of your project without garbage. You're less likely to have changes to your project that aren't visible when you look at your revision history on trunk.
When releasing, make use of stable branches and svn-merge.
score:4
We have a similar setup (Mac, Linux, and Windows users) and our folder structure is:
- trunk
- code
- projectA
- projectB
- code
We do check in the .project, .settings, and .classpath files as well the code but NOT the workspaces. The real gotchas have to do with the build path. If you solve these there is no headache and no requirement as to which directory things need to be checked out in.
Some tips:
- If your projects reference each other make sure they reference each other using the "Projects" tab of the build path. This will keep all references to other projects relative (../projectA rather than /opt/trunk/projectA which will break other peoples projects).
- If you have any external libraries that you reference, create user libraries and make everyone create one with the same name. We use JBoss so we make everyone create a user library called JBoss that references the jars in their local JBoss installation. This way, it doesn't matter where your JBoss is installed, as long as you have that user library, you'll be good to go. Your project will reference the user library name, but the actual user library information is local to each user.
- Make sure everyone knows about tips number 1 and 2. The only times things get screwed up around here is when someone forgets to make references via the Project tab instead of just linking to the jar directly.
All this works with Eclipse SVN plugins or without.
score:15
Workspaces and repositories shouldn't be related.
The workspace is really just where Eclipse stores a bunch of settings. Project files can (and usually do) live in the workspace, but as you know, they can be imported from an external source--the import is just a logical link.
You can create as many workspaces as you want for specific purposes; you could even import projects in one workspace into another if you had reason to do so.
The SVN layout should be separate from how your workspace is defined. They may end up looking similar, but that shouldn't imply that they're actually the same. I'd recommend each Eclipse project have its own SVN project, so that instead of having
- http://myrepo
- myworkspace
- trunk
- projectA
- projectB
- tags
- branches
- trunk
- myworkspace
you have
- http://myrepo
- projectA
- trunk
- tags
- branches
- projectB
- trunk
- tags
- branches
- projectA
What this does for you is give you the flexibility to lay out your workspace completely separate from how your repository is structured. You'll be able to check out individual projects into the workspace without having to checkout the entire codebase. You'll be able to have projects checked out on development branches while others are on the trunk, you can revert changes to one project while leaving another alone and so forth.
The last question about which artifacts to check into SVN is a matter of taste. I'd recommend checking in whatever artifacts are universal across the development team. If Eclipse is the standard IDE, go ahead and check in the .project and .classpath files so that a new developer will be able to checkout and build immediately. If certain plugins are universal and have config files of their own, go ahead and check those in as well. On the other hand, anything that isn't shared across the dev team should be left out of the repository.
Hope this helps.
EDIT
Further experience has taught me that the only things that should go into source control are the actual source files. Configuration and setup files should be regenerated by the developer when setting up a new project.
Source: stackoverflow.com
Related Query
- How to layout folders locally and in SVN when using eclipse
- Using autoprops in eclipse for all files and folders in an svn project
- How can I collaborate and code when someone is using Eclipse and another using Android Studio?
- How to avoid typing username and password again and again when using egit in eclipse on mac air?
- How add include and library paths in Eclipse when using Docker containers
- Using Coldfusion Builder and the Mercurial Eclipse plugin, how can you check in changes - including those in linked folders
- How and when are .metadata and .plugins folders created in eclipse
- How can eclipse find 'javax.servlet' when using the gradle with plugins 'war' and 'jetty'
- I am using eclipse and it stops responding when I open an android layout file
- How to debug Java code when using ANT script in Eclipse
- Why is Eclipse trying to copy my .svn folders from src to bin, and how can I make it stop?
- How can I check/upgrade Proguard version when using it in Eclipse for Android development?
- How to display console.log() output in PhoneGap app using Eclipse and HTC Desire HD?
- How can I make hidden files display in Eclipse Project explorer when using a RSE linked folder?
- How to set JVM arguments in tomcat that work both in eclipse and using the startup.bat
- ErrorListener missing when using maven-jaxb-plugin with eclipse and m2e
- When using Eclipse with FindBugs can you mark a bug as not a bug and have it removed from the bug list?
- How to compile and run C++ with MinGW using Eclipse and CDT?
- How can I view the outline in eclipse when using the revealing module pattern?
- How to set charset encoding property for SVN File and Eclipse
- How do I configure Eclipse to launch a browser when Run or Debug is selected using Pydev plugin
- How to convert jar to OSGi bundle using eclipse and bndtools
- How do you do merges using Git, Eclipse and Egit
- How do I debug properly using Eclipse and Pydev?
- Using Eclipse TableViewer, how do I navigate and edit cells with arrow keys?
- How do I use Eclipse Refactoring Tools and stay in sync with SVN through Subclipse?
- Fixing Eclipse errors when using Android NDK and std::vector
- When using Eclipse and Egit I can not push to upstream
- How to do clean and build in eclipse using Ant
- How can I make Eclipse CDT auto-indent properly when using BOOST_FOREACH?
More Query from same tag
- Java very slow on win7
- Format jsp page containing jstl tags
- Inline implemented interface indentation
- How to access the same eclipse workspaces from different OSs?
- Why I cannot install Android SDK r18? repository-6.xml cannot be found in Google Server
- How can I solve java.lang.NoClassDefFoundError, which is thrown in Eclipse plug-in development solution?
- my location point appears out of the street google maps eclipse
- Spark2.2.1 incompatible Jackson version 2.8.8
- Can I have individual Xtend files intermingled with my Java source files in a Spring project?
- Eclipse plugin trying to load icon from a deleted plugin project
- Qt Jambi Javadoc missing
- Error during open the eclipse
- Composite position and size - SWT
- How do I listen to changes in the size of a ViewPart in an Eclipse RCP application?
- Creating an Interface for JUnit
- Require() and include() not working in Eclipse for code assist and autocomplete
- how to Display HTMLs, PDFs, Imges inside same JSP page
- "java.lang.NoClassDefFoundError: org/hibernate/proxy/HibernateProxy" in Eclipse
- In Eclipse 3.5 : Rewrite xsl import/include location behind the scenes so it will properly validate files
- eclipse java.lang.NoClassDefFoundError for nonexisting class
- Using Radio buttons within a Dialog box
- Which sequence should be follow to synchronize code (commit and update) using Egit?
- Eclipse + Gradle + Spring Boot project (build error)
- Eclipse Mars JBoss EAP 6.2 - Remote connection failed
- "JBoss Tools Java Standard Tools AngularJS" will be ignored because it is already installed
- What does the red exclamation point icon in Eclipse mean?
- Resource META-INF does not exist
- eclipse pdt debugger won't terminate, it starts up on its own after finishing or manual termination
- Debugging Android NDK C/C++ code in Eclipse - breakpoints are not hit
- Can the Eclipse Java formatter be used stand-alone