Setting up a Workspace for large projects and libraries [message #1538] |
Mon, 21 April 2003 15:35  |
Eclipse User |
|
|
|
Originally posted by: pedro.escapeartist.com
Hello Everyone,
I'm not sure if this is the correct forum. But I couldn't find a better
place and the FAQ didn't seem to list these questions.
I copied the complete directory tree into the Eclipse Workspace. But I
run into the problem of the package name not matching the directory
structure. For example, a package (com.company.helpclass) is located in
"package/java/src/com/company/helpclass". How do I tell Eclipse that the
root package directory starts in: package/java/src/?
2. How does one setup projects and libraries so they are cross-referenced
while developing? I know I can link the libraries as external jar files.
But if I want to extend a library while developing on a project. I need
to create a new project for the library, change it, build a jar file and
copy to the final location. Is there a way of having an Eclipse Workspace
that will let me link other projects directly?
3. I also looking for Eclipse Best Practices with project files, build
environment and source code management. Currently we are using MS Visual
Source Safe (VSS) to hold our code, documentation and build environment
(ANT).
Here is an example of the filesystem layout:
The sharedProjects are helper utilities that are used by a variety of
other Work Projects.
sharedLibraries\
..............\DBUtils\documents
..............\.........\java\build.xml
..............\.........\java\bin
..............\.........\java\src\com\company\DBUtils\*.java
..............\.........\XML\configFiles
..............\XMLParser\documents
..............\XMLParser\java\build.xml
..............\XMLParser\java\src\com\company\XMLParser\*.ja va
..............\XMLParser\extLIBS
..............\GUILibrary\documents
WorkProjects\
............\SchemaComp\documents
............\SchemaComp\java\build.xml
............\SchemaComp\src\com\company\SchemaComp.java
............\SchemaComp\SQL\*.sql
Thanks for any insight!
Pedro
|
|
|
Re: Setting up a Workspace for large projects and libraries [message #1552 is a reply to message #1538] |
Mon, 21 April 2003 17:10   |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
Pedro F wrote:
> Hello Everyone,
> I'm not sure if this is the correct forum. But I couldn't find a better
> place and the FAQ didn't seem to list these questions.
> I copied the complete directory tree into the Eclipse Workspace. But I
> run into the problem of the package name not matching the directory
> structure. For example, a package (com.company.helpclass) is located in
> "package/java/src/com/company/helpclass". How do I tell Eclipse that the
> root package directory starts in: package/java/src/?
When creating a new project, you aren't required to copy the directory
tree into the workspace. On the initial New Project wizard page, you can
uncheck the Use Default option and use Browse to navigate to an existing
directory structure in your file system.
The solution to your problem is to define source directories for your
project. If no source directories are defined, Eclipse uses the base of
the project as the root for all packages. Open the Properties dialog for
your project and go to the Java Build Path. On the Source tab, select Add
Folder. Browse to the package/java/src folder and select it.
> 2. How does one setup projects and libraries so they are cross-referenced
> while developing? I know I can link the libraries as external jar files.
> But if I want to extend a library while developing on a project. I need
> to create a new project for the library, change it, build a jar file and
> copy to the final location. Is there a way of having an Eclipse Workspace
> that will let me link other projects directly?
Based on the directory structure outlined below, you have a couple of
options for projects. If you actively perform development on all shared
libraries, or if they are relatively small and stable, you might want to
create a single project for all of them. Using the source directories
mentioned above, each ..\java\src directory would be a source directory in
the project. If you normally only work on a subset of all projects, you
might want to set up individual projects for each "library" under the
shared libraries.
You probably want to define seperate projects for each of your other Work
Projects.
You can use the Projects tab on the Java Build Path page to set up
relationships between your Work Projects and the shared library projects.
Select the shared library projects that you are performing development on
from this page. You can then go to the Order and Export page to position
them appropriately in your build path.
Since you have mentioned external jar files, I assume that you have
already defined some. You can continue along this route and keep the
external jar files defined for your Work Projects. You can use the Order
and Exports tab to switch between the version you are developing on and
the released version.
It is also possible to define a project that simply contains jar files on
the build path. This project can then be referenced by other projects to
pick up all jars defined for the project. In this case, you need to make
sure that you check the box on the Order and Exports tab in this libraries
project. A check mark here makes the library available to any project
that you make dependent on this project.
> 3. I also looking for Eclipse Best Practices with project files, build
> environment and source code management. Currently we are using MS Visual
> Source Safe (VSS) to hold our code, documentation and build environment
> (ANT).
> Here is an example of the filesystem layout:
> The sharedProjects are helper utilities that are used by a variety of
> other Work Projects.
> sharedLibraries\
> ..............\DBUtils\documents
> ..............\.........\java\build.xml
> ..............\.........\java\bin
> ..............\.........\java\src\com\company\DBUtils\*.java
> ..............\.........\XML\configFiles
> ..............\XMLParser\documents
> ..............\XMLParser\java\build.xml
> ..............\XMLParser\java\src\com\company\XMLParser\*.ja va
> ..............\XMLParser\extLIBS
> ..............\GUILibrary\documents
> WorkProjects\
> ............\SchemaComp\documents
> ............\SchemaComp\java\build.xml
> ............\SchemaComp\src\com\company\SchemaComp.java
> ............\SchemaComp\SQL\*.sql
> Thanks for any insight!
> Pedro
|
|
|
Re: Setting up a Workspace for large projects and libraries [message #6022 is a reply to message #1552] |
Wed, 23 April 2003 00:21  |
Eclipse User |
|
|
|
Originally posted by: pedro.escapeartist.com
Dave,
Thanks for the response, it was exactly what I needed to know. :)
Pedro
Dave Wegener wrote:
> Pedro F wrote:
> > Hello Everyone,
> > I\\\'m not sure if this is the correct forum. But I couldn\\\'t find a
better
> > place and the FAQ didn\\\'t seem to list these questions.
> > I copied the complete directory tree into the Eclipse Workspace. But I
> > run into the problem of the package name not matching the directory
> > structure. For example, a package (com.company.helpclass) is located in
> > \\\"package/java/src/com/company/helpclass\\\". How do I tell Eclipse
that the
> > root package directory starts in: package/java/src/?
> When creating a new project, you aren\\\'t required to copy the directory
> tree into the workspace. On the initial New Project wizard page, you can
> uncheck the Use Default option and use Browse to navigate to an existing
> directory structure in your file system.
> The solution to your problem is to define source directories for your
> project. If no source directories are defined, Eclipse uses the base of
> the project as the root for all packages. Open the Properties dialog for
> your project and go to the Java Build Path. On the Source tab, select Add
> Folder. Browse to the package/java/src folder and select it.
> > 2. How does one setup projects and libraries so they are cross-referenced
> > while developing? I know I can link the libraries as external jar files.
> > But if I want to extend a library while developing on a project. I need
> > to create a new project for the library, change it, build a jar file and
> > copy to the final location. Is there a way of having an Eclipse Workspace
> > that will let me link other projects directly?
> Based on the directory structure outlined below, you have a couple of
> options for projects. If you actively perform development on all shared
> libraries, or if they are relatively small and stable, you might want to
> create a single project for all of them. Using the source directories
> mentioned above, each ..\\\\java\\\\src directory would be a source
directory in
> the project. If you normally only work on a subset of all projects, you
> might want to set up individual projects for each \\\"library\\\" under the
> shared libraries.
> You probably want to define seperate projects for each of your other Work
> Projects.
> You can use the Projects tab on the Java Build Path page to set up
> relationships between your Work Projects and the shared library projects.
> Select the shared library projects that you are performing development on
> from this page. You can then go to the Order and Export page to position
> them appropriately in your build path.
> Since you have mentioned external jar files, I assume that you have
> already defined some. You can continue along this route and keep the
> external jar files defined for your Work Projects. You can use the Order
> and Exports tab to switch between the version you are developing on and
> the released version.
> It is also possible to define a project that simply contains jar files on
> the build path. This project can then be referenced by other projects to
> pick up all jars defined for the project. In this case, you need to make
> sure that you check the box on the Order and Exports tab in this libraries
> project. A check mark here makes the library available to any project
> that you make dependent on this project.
> > 3. I also looking for Eclipse Best Practices with project files, build
> > environment and source code management. Currently we are using MS Visual
> > Source Safe (VSS) to hold our code, documentation and build environment
> > (ANT).
> > Here is an example of the filesystem layout:
> > The sharedProjects are helper utilities that are used by a variety of
> > other Work Projects.
> > sharedLibraries\\\\
> > ..............\\\\DBUtils\\\\documents
> > ..............\\\\.........\\\\java\\\\build.xml
> > ..............\\\\.........\\\\java\\\\bin
> >
..............\\\\.........\\\\java\\\\src\\\\com\\\\company \\\\DBUtils\\\\*.java
> > ..............\\\\.........\\\\XML\\\\configFiles
> > ..............\\\\XMLParser\\\\documents
> > ..............\\\\XMLParser\\\\java\\\\build.xml
> >
..............\\\\XMLParser\\\\java\\\\src\\\\com\\\\company \\\\XMLParser\\\\*.java
> > ..............\\\\XMLParser\\\\extLIBS
> > ..............\\\\GUILibrary\\\\documents
> > WorkProjects\\\\
> > ............\\\\SchemaComp\\\\documents
> > ............\\\\SchemaComp\\\\java\\\\build.xml
> > ............\\\\SchemaComp\\\\src\\\\com\\\\company\\\\Schem aComp.java
> > ............\\\\SchemaComp\\\\SQL\\\\*.sql
> > Thanks for any insight!
> > Pedro
|
|
|
Powered by
FUDForum. Page generated in 0.04591 seconds