Skip to main content



      Home
Home » Newcomers » Newcomers » Seeing JARs in other plugins in M6
Seeing JARs in other plugins in M6 [message #63089] Wed, 11 May 2005 14:09
Eclipse UserFriend
I am using Eclipse 3 M6:
Version: 3.1.0
Build id: I20050401-1645

I am running a tutorial explaining how to use Spring to work with
Hibernate. In the tutorial, the author sets up two separate "helper"
plugins, one for Hibernate and one for Spring. The goal here is to put
the product's JAR files in separate plugins so that you could swap them
out for newer versions of the product as they become available. The
tutorial goes on to create a third plugin showing how to use these tools
to make your life easier, etc.

I cannot get the third plugin to see the JARs contained in the other two
plugins. The first two plugins have all their JARs listed in the Runtime
and Binary Build tabs, so I am led to understand that they are available
for use by other plugins. The third plugin has the first two plugins
listed as required plugins in the dependencies tab.

NOTE:
I know the code itself is correct for the versions of Spring and Hibernate
I am using because I set up another plugin where I dumped the JARs of both
products directly into the plugin and the code works fine -- it can see
the classes in the JARs and refer to them whenever I run Organize Imports
on the java classes I create.


So, back to the problem - I can't get the third plugin to see the contents
of the other two plugins. First of all, here is the plugin.xml from the
Hibernate plugin:


<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="Hibernate_Core"
name="Hibernate_Core Plug-in"
version="3.0.2"
provider-name="">
<runtime>
<library name="ant-1.6.2.jar">
<export name="*"/>
</library>
<library name="ant-antlr-1.6.2.jar">
<export name="*"/>
</library>
<library name="ant-junit-1.6.2.jar">
<export name="*"/>
</library>
<library name="ant-launcher-1.6.2.jar">
<export name="*"/>
</library>
<library name="antlr-2.7.5H3.jar">
<export name="*"/>
</library>
<library name="ant-swing-1.6.2.jar">
<export name="*"/>
</library>
<library name="asm.jar">
<export name="*"/>
</library>
<library name="asm-attrs.jar">
<export name="*"/>
</library>
<library name="c3p0-0.8.5.2.jar">
<export name="*"/>
</library>
<library name="cglib-2.1.jar">
<export name="*"/>
</library>
<library name="cleanimports.jar">
<export name="*"/>
</library>
<library name="commons-collections-2.1.1.jar">
<export name="*"/>
</library>
<library name="commons-logging-1.0.4.jar">
<export name="*"/>
</library>
<library name="concurrent-1.3.2.jar">
<export name="*"/>
</library>
<library name="connector.jar">
<export name="*"/>
</library>
<library name="dom4j-1.6.jar">
<export name="*"/>
</library>
<library name="ehcache-1.1.jar">
<export name="*"/>
</library>
<library name="jaas.jar">
<export name="*"/>
</library>
<library name="jacc-1_0-fr.jar">
<export name="*"/>
</library>
<library name="jaxen-1.1-beta-4.jar">
<export name="*"/>
</library>
<library name="jboss-cache.jar">
<export name="*"/>
</library>
<library name="jboss-common.jar">
<export name="*"/>
</library>
<library name="jboss-jmx.jar">
<export name="*"/>
</library>
<library name="jboss-system.jar">
<export name="*"/>
</library>
<library name="jdbc2_0-stdext.jar">
<export name="*"/>
</library>
<library name="jgroups-2.2.7.jar">
<export name="*"/>
</library>
<library name="jta.jar">
<export name="*"/>
</library>
<library name="junit-3.8.1.jar">
<export name="*"/>
</library>
<library name="log4j-1.2.9.jar">
<export name="*"/>
</library>
<library name="oscache-2.1.jar">
<export name="*"/>
</library>
<library name="proxool-0.8.3.jar">
<export name="*"/>
</library>
<library name="swarmcache-1.0rc2.jar">
<export name="*"/>
</library>
<library name="versioncheck.jar">
<export name="*"/>
</library>
<library name="xerces-2.6.2.jar">
<export name="*"/>
</library>
<library name="xml-apis.jar">
<export name="*"/>
</library>
</runtime>

</plugin>


OK, here is the plugin.xml for the Spring plugin:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="Spring_1_2_RC2_Core"
name="Spring_1_2_RC2_Core Plug-in"
version="1.0.0"
provider-name="">
<runtime>
<library name="spring.jar">
<export name="*"/>
</library>
<library name="spring-aop.jar">
<export name="*"/>
</library>
<library name="spring-beans.jar">
<export name="*"/>
</library>
<library name="spring-context.jar">
<export name="*"/>
</library>
<library name="spring-core.jar">
<export name="*"/>
</library>
<library name="spring-dao.jar">
<export name="*"/>
</library>
<library name="spring-hibernate.jar">
<export name="*"/>
</library>
<library name="spring-jdbc.jar">
<export name="*"/>
</library>
<library name="spring-mock.jar">
<export name="*"/>
</library>
<library name="spring-orm.jar">
<export name="*"/>
</library>
<library name="spring-remoting.jar">
<export name="*"/>
</library>
<library name="spring-support.jar">
<export name="*"/>
</library>
<library name="spring-web.jar">
<export name="*"/>
</library>
<library name="spring-webmvc.jar">
<export name="*"/>
</library>
</runtime>

</plugin>


Finally, here is the plugin.xml for the example project that should be
able to use the JAR files listed in the previous two plugins:


<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="Spring_Test"
name="Spring_Test Plug-in"
version="1.0.0"
provider-name=""
class="spring_Test.Spring_TestPlugin">

<runtime>
<library name="Spring_Test.jar"/>
</runtime>

<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="Hibernate_Core"/>
<import plugin="Spring_1_2_RC2_Core"/>
</requires>

<extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="spring_Test.rcp.Application">
</run>
</application>
</extension>
<extension
point="org.eclipse.ui.perspectives">
<perspective
name="Perspective"
class="spring_Test.rcp.Perspective"
id="Spring_Test.perspective">
</perspective>
</extension>
<extension
point="org.eclipse.ui.views">
<view
name="View"
class="spring_Test.rcp.View"
id="Spring_Test.view">
</view>
</extension>

</plugin>


What did I miss here? I realize that I can do it the "dumb" way and just
drop all the JARs in the project that uses these tools. Replacing those
JARs when a new version of the product (Spring or Hibernate) would be a
pain.

--PK
Previous Topic:javadoc comments for packages
Next Topic:Just a test
Goto Forum:
  


Current Time: Thu Jul 17 04:31:21 EDT 2025

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

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

Back to the top