Library Projects [message #319515] |
Thu, 23 August 2007 15:04  |
Eclipse User |
|
|
|
Good afternoon,
How do I create a "library" project that contains say all the jar files for
a framework that can then be referenced from various other Java project and
Dyanmic Web Projects.
Is there are
|
|
|
Re: Library Projects [message #319522 is a reply to message #319515] |
Thu, 23 August 2007 16:35   |
Eclipse User |
|
|
|
Originally posted by: Jim.Cooper.sas.com
Steve Whatmore wrote:
> Good afternoon,
>
> How do I create a "library" project that contains say all the jar files for
> a framework that can then be referenced from various other Java project and
> Dyanmic Web Projects.
Create a plugin project, and add, for instance, a 'jars' subdir.
Then on the 'Runtime' tab in the plugin.xml, in the lower right corner,
add your jars to the 'Classpath' box.
Once they're added, add the packages you want to expose to other plugins
to the 'Exported Packages' box.
If you have any actual code in your plugin, be sure to add '.' to the
'Classpath' box, or it won't be seen by Eclipse (as I found out through
trial & error).
|
|
|
Re: Library Projects [message #319533 is a reply to message #319515] |
Thu, 23 August 2007 23:48  |
Eclipse User |
|
|
|
Originally posted by: eclipse5.rizzoweb.com
Steve Whatmore wrote:
> Good afternoon,
>
> How do I create a "library" project that contains say all the jar files for
> a framework that can then be referenced from various other Java project and
> Dyanmic Web Projects.
There are a couple of options:
A) Define a User Library (search the Preferences dialog for "user") that
includes all the JARs. Projects can include a User Library on their
Build Path via the "Add Library..." button.
B) Create a regular Java Project that contains all the JARs (and nothing
else), includes them on its Build Path, and exports them (see the Order
and Export tab of Build Path). Then make other Projects include that
project on their Build Paths.
Option B has the benefits of easily attaching source and/or Javadoc for
the JARs that will get inherited by all projects and lauch configs that
depend on the library project, and also that it can be checked in to
source control for other developers to leverage.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03475 seconds