What plugin handles build path info, classpath variables, etc? [message #126789] |
Wed, 10 September 2003 14:44  |
Eclipse User |
|
|
|
Originally posted by: kduffey.marketron.com
We are looking to maybe add to the functionality of the classpath variable
mechanism. We have seveal projects that all use a "shared" set of
infragistic jar files. These are located in /projects/tools/infragistics/
where all their .jar files are. In each project, we don't want to include
these in the project dir itself. We just want them to be part of the build
path, and when we package, we'll pull them from that one shared dir. If we
right-click on a project, choose build path, library, there is Add Jars that
uses local projects. There is Add External Jars which uses absolute paths.
We want a relative path to the jars, and we want to specify only the
directory, not each individual jar file in the dir. If you choose Variable,
you have to assign each jar file in the dir we want to its own variable.
What we would like to look at is seeing if we can specify a variable to a
directory and all the .jar/.zip files in that dir are automatically part of
the classpath via a relative path to that dir. It seems that if you select a
dir it uses it to find classes, not .jar/.zip files.
So is this even possible? Maybe we are doing something wrong, and there is a
way to select a path to be relative to our main project path, to use all
..jar/.zip files in the dir? If not, what plugin(s) in the Eclipse IDE would
actually control this/these featrue(s).
Thanks.
|
|
|
Re: What plugin handles build path info, classpath variables, etc? [message #126914 is a reply to message #126789] |
Wed, 10 September 2003 16:09   |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
Kevin wrote:
> We are looking to maybe add to the functionality of the classpath variable
> mechanism. We have seveal projects that all use a "shared" set of
> infragistic jar files. These are located in /projects/tools/infragistics/
> where all their .jar files are. In each project, we don't want to include
> these in the project dir itself. We just want them to be part of the build
> path, and when we package, we'll pull them from that one shared dir. If we
> right-click on a project, choose build path, library, there is Add Jars that
> uses local projects. There is Add External Jars which uses absolute paths.
> We want a relative path to the jars, and we want to specify only the
> directory, not each individual jar file in the dir. If you choose Variable,
> you have to assign each jar file in the dir we want to its own variable.
You can share a single variable with multiple .jar files. On the
Libraries tab of the Java Build Path property, select Add Variable and
select the variable that points to your common directory. Click on Extend
to pull up a list of all .jars/folders under the directory. Select as
many .jar files as you like by holding down SHIFT or CTRL and clicking on
them. Each .jar file selected will create an entry in you build path.
The variable provides a reference point to the relative location. The
specific .jar files to include uniquely identify each .jar for the build
path.
> What we would like to look at is seeing if we can specify a variable to a
> directory and all the .jar/.zip files in that dir are automatically part of
> the classpath via a relative path to that dir. It seems that if you select a
> dir it uses it to find classes, not .jar/.zip files.
> So is this even possible? Maybe we are doing something wrong, and there is a
> way to select a path to be relative to our main project path, to use all
> ..jar/.zip files in the dir? If not, what plugin(s) in the Eclipse IDE would
> actually control this/these featrue(s).
Another alternative is to create a separate project that simply holds the
jar files. This is a simpler solution if the same set of .jar files is
used by multiple projects. Define a new Java project, the location isn't
really important unless you want to share it through CVS, etc. Add the
jar files by adding a variable as described above. Go to the Order and
Export page and check to make sure that all libraries are checked to
export them to dependent projects. Go to each of the projects that depend
on these .jar files and select the library project from the Projects tab
of the Java Build Properties dialog.
> Thanks.
|
|
|
|
Re: What plugin handles build path info, classpath variables, etc? [message #127052 is a reply to message #126991] |
Wed, 10 September 2003 19:21  |
Eclipse User |
|
|
|
Originally posted by: kduffey.marketron.com
Thanks guys. The variable works well. I did actually suggest to my team to
use the project and just do it that way, and that apparently was not what
they wanted.
"Richard L. Kulp" <richkulp@NO--SPAM.us.ibm.com> wrote in message
news:bjo4pq$im2$1@eclipse.org...
> You can create a Classpath Container Initializer to do this. You will
> need to create a plugin that has the container initializer with the
> appropriate extension to describe it.
>
> Your container initializer can be be set to point to a directory and it
> would automatically return all of the jars in that directory for the
> build path.
>
> You need to look up Classpath Container Initializer extension in the
> help, and look at the JRE container initializer as an example.
>
> Rich
>
|
|
|
Powered by
FUDForum. Page generated in 0.03806 seconds