Results 1 to 4 of 4

Thread: <import resource> and lib

  1. #1

    Default <import resource> and lib

    In my application, I have the following:

    Code:
    <import resource="classpath:com/fmr/commons/cs203/config/spring-defs.xml" />
    The XML file specified resides in a JAR that is on my classpath: <project-root>\war\web-inf\lib\fmr-commons-cs203.jar

    My .springBeans file contains:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beansProjectDescription>
    	<configExtensions>
    		<configExtension>xml</configExtension>
    	</configExtensions>
    	<configs>
    		<config>src/config/main/cs203/cs203Context.xml</config>
    		<config>src/config/main/spring/aopContext.xml</config>
    		<config>src/config/main/spring/miscContext.xml</config>
    		<config>src/config/main/spring/serviceContext.xml</config>
    		<config>src/config/main/spring/dal/daoContext.xml</config>
    		<config>src/config/main/spring/dal/hibernateContext.xml</config>
    		<config>src/config/main/spring/dal/datasource/dataContext.xml</config>
    		<config>src/config/main/spring/flows/serviceProviderElection-beans.xml</config>
    		<config>src/config/main/spring/security/acegiContext.xml</config>
    		<config>src/config/main/spring/web/shares-servlet.xml</config>
    		<config>src/config/main/spring/web/shares-swf-config.xml</config>
    		<config>src/config/test/spring/dal/datasource/environmentContext.xml</config>
    		<config>src/config/main/spring/flows/electronicFormsElection-beans.xml</config>
    		<config>war/WEB-INF/lib/fmr-commons-cs203.jar!/com/fmr/commons/cs203/config/spring-defs.xml</config>
    	</configs>
    	<configSets>
    		<configSet>
    			<name><![CDATA[Beans]]></name>
    			<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
    			<incomplete>true</incomplete>
    			<configs>
    				<config>src/config/main/cs203/cs203Context.xml</config>
    				<config>src/config/main/spring/aopContext.xml</config>
    				<config>src/config/main/spring/dal/daoContext.xml</config>
    				<config>src/config/main/spring/dal/datasource/dataContext.xml</config>
    				<config>src/config/main/spring/dal/hibernateContext.xml</config>
    				<config>src/config/main/spring/flows/serviceProviderElection-beans.xml</config>
    				<config>src/config/main/spring/miscContext.xml</config>
    				<config>src/config/main/spring/security/acegiContext.xml</config>
    				<config>src/config/main/spring/serviceContext.xml</config>
    				<config>src/config/main/spring/web/shares-servlet.xml</config>
    				<config>src/config/main/spring/web/shares-swf-config.xml</config>
    				<config>src/config/test/spring/dal/datasource/environmentContext.xml</config>
    				<config>src/config/main/spring/flows/electronicFormsElection-beans.xml</config>
    				<config>war/WEB-INF/lib/fmr-commons-cs203.jar!/com/fmr/commons/cs203/config/spring-defs.xml</config>
    			</configs>
    		</configSet>
    	</configSets>
    </beansProjectDescription>
    The application starts up and deploys with no issue, however I am receiving a warning in Eclipse for all beans being referenced that exist in that spring-defs.xml file.

    I've read through the forums and Jiras. It appears this Jira is the closest to my problem:

    http://jira.springframework.org/browse/IDE-653

    Does Spring IDE support bean discovery when the context is located in a JAR?

    Thanks,
    Leo

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    Hi Leo,

    that is exactly the usecase that is covered by the issue you are referencing. So yes, this should be supported in the latest nightly builds and in the upcoming 2.0.3.

    Prior to 2.0.3 Spring IDE does not handle imported resources. If you are able to test the nightly build with your setup, that would be great as this new feature needs to more testing and feedback from the community.

    Let me know if that works for you.

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3

    Default

    Christian,

    Thanks for your reply. I'll definitely download the nightly build, give it a shot and let you know how it works.

    Thanks!

  4. #4

    Default

    I updated to the latest nightly build:



    The warning messages went away, which is good news, but now it looks like Web Flow support is missing. I can no longer set up my flows through project properties. Not sure if this is expected behavior at this point in development or not, but figured I'd share:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •