|
Sorry, closed the ticket prematurely,
Still facing the problem. Even though I was able to add the dependent files from jar B to the configset in jar A, spring ide is still not able to resolve it. I am also getting the same problem in plugin version 1.2.5 and thanks, What do you mean by "spring ide is still not able to resolve it"?
Do you mean the <import> tag isn't resolved then this is correct because Spring IDE doesn't support this tag. You have to use project references and a BeansConfigSet here (please refer to the wiki:SpringideGuide#AddreferencestootherSpringprojectsoptional Spring IDE Guide on how to do this). Or do you mean the BeansConfigValidator complains about unresolved bean references? Please elaborate on the topic "The ide doesnt resolve the imported resource". What should Spring IDE do here? Let me give an example setup:
Config file "mainContext.xml" in jar A. Config file "dependentContext.xml" in jar B. Both jars are spring enabled and all the config files are added to the spring file list. Jar B has a config set which contains mainContext.xml from jar A. The file dependentContext.xml contains the following import: <?xml version=3D"1.0" encoding=3D"utf-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <import resource=3D"mainContext.xml"/> </beans> Now springIDE reports an error next to the import tag saying it cant Here is my .springBeans file on Jar B. <?xml version=3D"1.0" encoding=3D"UTF-8"?> <beansProjectDescription> <configs> <config>src/dependentContext.xml</config> </configs> <configSets> <configSet> <name>mainConfigSet</name> <allowBeanDefinitionOverriding>false</allowBeanDefinitionOverriding> <incomplete>true</incomplete> <configs> <config>/A/src/mainContext.xml</config> </configs> </configSet> </configSets> </beansProjectDescription> Am I missing any step here ? thanks, Sreeni,
in your example you should create in Jar B a BeansConfigSet containing the externally referenced "/A/src/mainContext.xml" '''and''' the local "src/dependentContext.xml". This way the BeansConfigValidator knows about the dependency of "src/dependentContext.xml" from "/A/src/mainContext.xml" and creates internally a !BeanFactory with all beans defined in both config files. This !BeanFactory will be used for validation. If all bean references are solved by including both config files into the BeansConfigSet then you can deselect the checkbox "Is incomplete". Torsten PS Please don't reply on mails sent from the bug tracker. Instead enter your anwser as a comment to the corresponding ticket. Makes sense, I now added the dependent config in other jar inside the config set that I had created.
Still getting the same error:
Here is my updated .springBeans file :- <?xml version="1.0" encoding="UTF-8"?> <beansProjectDescription> <configs> <config>src/dependentContext.xml</config> </configs> <configSets> <configSet> <name>configSet</name> <allowBeanDefinitionOverriding>false</allowBeanDefinitionOverriding> <incomplete>false</incomplete> <configs> <config>/A/src/mainContext.xml</config> <config>src/dependentContext.xml</config> </configs> </configSet> </configSets> </beansProjectDescription> This will now be covered in
|
||||||||||||||||||||||||||||||||||||||||||||||||||
<importHave you tried configuring the BeansConfigSet containing both Spring configuration files?