Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Advice wanted on sharing projects
Advice wanted on sharing projects [message #237395] Thu, 11 October 2007 21:11 Go to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 65
Registered: July 2009
Member
Up until now we have not been basing our projects on existing source.
Recently we have started doing this so the .settings folder, .classpath,
fbprefs, .project files, etc are checked into source control. We use
perforce and not everyone has their client-spec set to root their source
at the same place.

So the problem is that when people try to create a project from existing
sources, the paths in the .classpath, .projects, etc do not point to the
same place.

Is there some way to specify a root directory for things in your project
so references to things like jar files is relative and not abolute?

What best practices do people use when sharing code from source
repositories?
Re: Advice wanted on sharing projects [message #237408 is a reply to message #237395] Thu, 11 October 2007 22:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

References to items contained within the projects hierarchy will have
relative paths. If you project references resources outside the project
hierarchy, you can run into absolute references. You can avoid this by
using ClassPath Variables or Linked Resource Variables. You set the
variable to a folder in your file system and then extend that location to
point to the resource you need to share. Other developers then define the
variable in their workspace and are able to access the resource.

Check out Linked Resource and Classpath Variables in the help documentation.


"Eric Kolotyluk" <eric@sfu.ca> wrote in message
news:4dd67223fb6b0f0837b957d051b064a3$1@www.eclipse.org...
> Up until now we have not been basing our projects on existing source.
> Recently we have started doing this so the .settings folder, .classpath,
> fbprefs, .project files, etc are checked into source control. We use
> perforce and not everyone has their client-spec set to root their source
> at the same place.
>
> So the problem is that when people try to create a project from existing
> sources, the paths in the .classpath, .projects, etc do not point to the
> same place.
>
> Is there some way to specify a root directory for things in your project
> so references to things like jar files is relative and not abolute?
>
> What best practices do people use when sharing code from source
> repositories?
>
Re: Advice wanted on sharing projects [message #237481 is a reply to message #237408] Fri, 12 October 2007 17:45 Go to previous messageGo to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 65
Registered: July 2009
Member
Great - thanks for the pointer.

Now I have a little problem. I previously defined a class folder for my
build path linked to the file system, but I want to delete it so I can
recreate it and extend it based on the class variable. Unfortunatly
Eclipse seems to give you no way to delete or edit a previously defined
class folder - why is that? It would be nice if there were "Edit" and
"Delete" buttons next to the "Create New Folder..." button in the 'Class
Folder Selection' dialog.

Cheers, Eric

Dave Wegener wrote:

> References to items contained within the projects hierarchy will have
> relative paths. If you project references resources outside the project
> hierarchy, you can run into absolute references. You can avoid this by
> using ClassPath Variables or Linked Resource Variables. You set the
> variable to a folder in your file system and then extend that location to
> point to the resource you need to share. Other developers then define the
> variable in their workspace and are able to access the resource.

> Check out Linked Resource and Classpath Variables in the help documentation.
Re: Advice wanted on sharing projects [message #237506 is a reply to message #237481] Fri, 12 October 2007 19:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

You should be able to delete the folder from the Navigator window of the
Resource perspective. Deleting a link only removes the link, it won't
delete the actual folder or its contents.

If you are playing with the classpath, you may want to make sure that
AutoBuild is turned off until you get things straight.

"Eric Kolotyluk" <eric@sfu.ca> wrote in message
news:c46a7d5d56467ac1bcc4d8c4937d74a4$1@www.eclipse.org...
> Great - thanks for the pointer.
>
> Now I have a little problem. I previously defined a class folder for my
> build path linked to the file system, but I want to delete it so I can
> recreate it and extend it based on the class variable. Unfortunatly
> Eclipse seems to give you no way to delete or edit a previously defined
> class folder - why is that? It would be nice if there were "Edit" and
> "Delete" buttons next to the "Create New Folder..." button in the 'Class
> Folder Selection' dialog.
>
> Cheers, Eric
>
> Dave Wegener wrote:
>
> > References to items contained within the projects hierarchy will have
> > relative paths. If you project references resources outside the project
> > hierarchy, you can run into absolute references. You can avoid this by
> > using ClassPath Variables or Linked Resource Variables. You set the
> > variable to a folder in your file system and then extend that location
to
> > point to the resource you need to share. Other developers then define
the
> > variable in their workspace and are able to access the resource.
>
> > Check out Linked Resource and Classpath Variables in the help
documentation.
>
Re: Advice wanted on sharing projects [message #237524 is a reply to message #237506] Fri, 12 October 2007 20:12 Go to previous messageGo to next message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 65
Registered: July 2009
Member
Great - that works. It would still be nice to be able to delete the folder
in the other place as well.

Question: when you define your classpath variable this gets stored in your
project file presumably? So if someone else creates the project from
existing sources, and changes the classpath variable to the correct spot
for their file system, and the .project file is under source control, when
other people sync up with the repository won't they get the new classpath
variable definition?

I noticed that the Classpath Variables are also in the global preferences,
so does that mean they are stored in the workspace and not the .project
file?

Cheers, Eric

Dave Wegener wrote:

> You should be able to delete the folder from the Navigator window of the
> Resource perspective. Deleting a link only removes the link, it won't
> delete the actual folder or its contents.

> If you are playing with the classpath, you may want to make sure that
> AutoBuild is turned off until you get things straight.
Re: Advice wanted on sharing projects [message #237549 is a reply to message #237524] Fri, 12 October 2007 23:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Class path and Link path variables are stored in the workspace. The
..project file only contains the variable name. You have to define the
variable in the workspace for the link to be resolvable.

Eric Kolotyluk wrote:
> Great - that works. It would still be nice to be able to delete the
> folder in the other place as well.
>
> Question: when you define your classpath variable this gets stored in
> your project file presumably? So if someone else creates the project
> from existing sources, and changes the classpath variable to the correct
> spot for their file system, and the .project file is under source
> control, when other people sync up with the repository won't they get
> the new classpath variable definition?
>
> I noticed that the Classpath Variables are also in the global
> preferences, so does that mean they are stored in the workspace and not
> the .project file?
>
> Cheers, Eric
>
> Dave Wegener wrote:
>
>> You should be able to delete the folder from the Navigator window of the
>> Resource perspective. Deleting a link only removes the link, it won't
>> delete the actual folder or its contents.
>
>> If you are playing with the classpath, you may want to make sure that
>> AutoBuild is turned off until you get things straight.
>
Re: Advice wanted on sharing projects [message #237596 is a reply to message #237549] Sat, 13 October 2007 18:13 Go to previous message
Eric Kolotyluk is currently offline Eric KolotylukFriend
Messages: 65
Registered: July 2009
Member
Thanks, that seems to be confirmed by my colleages who are creating
projects from existing sources (according to my new documentation) and
delighted with how much better it is than the old way of keeping the
classpath and .project files in the workspace.

This forum needs some sort of system like Sun's dukes for awarding people
who provide truely helpful answers.

Thanks again.

David Wegener wrote:

> Class path and Link path variables are stored in the workspace. The
> ..project file only contains the variable name. You have to define the
> variable in the workspace for the link to be resolvable.
Previous Topic:Listersupport?
Next Topic:Plugin using a library different than one loaded by JVM
Goto Forum:
  


Current Time: Sun Jun 30 10:11:33 GMT 2024

Powered by FUDForum. Page generated in 0.07950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top