Java Reference
In-Depth Information
paths in 3.x projects that don't follow under the project root will be missing from
the updated project file. Fortunately, this is an uncommon configuration and is
easy to correct.
4.4.4
Sharing projects with others
All project files can be shared among a team of developers. Although you can cer-
tainly distribute copies of them, your best bet is to place these items under source
code control along with the rest of your project's files to ensure that they're always
up to date. You probably don't want to share workspace ( IWS ) files, because they
contain information specific to each developer's IDE .
By default, all path-related settings in the project file are stored relative to the
project file itself; the same is true for module files. This allows for easy relocation
of projects and modules and lets each developer use their project from any loca-
tion they choose. Any items outside the project or module directories (such as
third-party libraries and your JDK settings) are stored by IDEA as absolute paths.
This obviously can cause problems between machines. There are several possible
solutions:
Whenever possible, keep the content of your modules under the same path
as the module file itself.
In your project settings, set the option For files outside project directory
to Use relative paths . This will avoid the use of absolute path names, mak-
ing your project files easier to share between individuals. Modules have a
similar option. You still need to make sure that each developer's source
tree is arranged similarly in order for the paths to resolve correctly.
Use path variables, as described next.
4.4.5
Using path variables
Path variables are project-independent macros defined in your IDE Settings. Any
time IDEA encounters a path that includes a path variable reference (path refer-
ences, like other variables in IDEA , are delineated by a pair of dollar sign charac-
ters), it uses your path variable settings to resolve the actual path.
Path variables allow you to hide the locations of files outside of your project
or modules behind a named variable whose value can be changed on each instal-
lation of IDEA . This enables developers to share projects containing absolute
path references.
 
 
 
 
 
 
 
Search WWH ::




Custom Search