Jump to: navigation, search

Difference between revisions of "FAQ How do I set up a Java project to share in a repository?"

 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
''
+
A number of steps are needed to get a Java project properly set up to share with teammates in a repository.
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
A number of steps are needed to get a Java project properly set up to
+
share with teammates in a repository.
+
 
+
 
+
* Make sure that the <tt>.project</tt> and <tt>.classpath</tt> files
+
are under version control. These files must be stored in the repository
+
so that other users checking out the projects for the first time will
+
get the correct type of project and will get the correct Java build path.</li>
+
 
+
 
+
 
+
 
+
 
+
* Avoid absolute paths in your <tt>.project</tt> and <tt>.classpath</tt>
+
files.  If you are using linked resources, make sure that they are created using <i>path
+
variables</i> (see the '''Workbench &gt; Linked Resources''' preference
+
page). If your project has references on its build path to external libraries,
+
make sure that they are specified using a classpath variable (see the '''Java &gt; Build Path
+
&gt; Classpath Variables''' preference page).</li>
+
 
+
 
+
 
+
 
+
 
+
* Make sure that the Java builder&#146;s output directory (conventionally called <tt>bin</tt>)
+
is not under version control. In CVS, you can do this by creating a <tt>.cvsignore</tt>
+
file in the project root directory containing the name of the output directory.
+
 
+
 
+
  
 +
* Make sure that the <tt>.project</tt> and <tt>.classpath</tt> files are under version control. These files must be stored in the repository so that other users checking out the projects for the first time will get the correct type of project and will get the correct Java build path.
  
 +
* Avoid absolute paths in your <tt>.project</tt> and <tt>.classpath</tt> files.  If you are using linked resources, make sure that they are created using <i>path variables</i> (see the '''Workbench &gt; Linked Resources''' preference page). If your project has references on its build path to external libraries, make sure that they are specified using a classpath variable (see the '''Java &gt; Build Path &gt; Classpath Variables''' preference page).
  
 +
* Make sure that the Java builder&#146;s output directory (conventionally called <tt>bin</tt>) is not under version control. In CVS, you can do this by creating a <tt>.cvsignore</tt> file in the project root directory containing the name of the output directory.
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ What is the advantage of sharing the project file in a repository?]]
 +
*[[FAQ What is the function of the .cvsignore file?]]
  
 
+
{{Template:FAQ_Tagline}}
[[FAQ_What_is_the_advantage_of_sharing_the_%3Ctt%3E.project%3C%2Ftt%3E_file_in_a_repository%3F]]
+
 
+
 
+
[[FAQ_What_is_the_function_of_the_%3Ctt%3E.cvsignore%3C%2Ftt%3E_file%3F]]
+

Latest revision as of 21:51, 30 May 2006

A number of steps are needed to get a Java project properly set up to share with teammates in a repository.

  • Make sure that the .project and .classpath files are under version control. These files must be stored in the repository so that other users checking out the projects for the first time will get the correct type of project and will get the correct Java build path.
  • Avoid absolute paths in your .project and .classpath files. If you are using linked resources, make sure that they are created using path variables (see the Workbench > Linked Resources preference page). If your project has references on its build path to external libraries, make sure that they are specified using a classpath variable (see the Java > Build Path > Classpath Variables preference page).
  • Make sure that the Java builder’s output directory (conventionally called bin) is not under version control. In CVS, you can do this by creating a .cvsignore file in the project root directory containing the name of the output directory.

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.