Announcement Announcement Module
Collapse
No announcement yet.
<import resource> and lib Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <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
    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

    Comment


    • #3
      Christian,

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

      Thanks!

      Comment


      • #4
        I updated to the latest nightly build:

        http://feb01.imgshare.us/Ho1.jpg

        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:

        http://feb01.imgshare.us/Hwk.jpg

        Comment

        Working...
        X