You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Marcello Teodori (JIRA)" <ji...@apache.org> on 2008/05/12 16:35:43 UTC
[jira] Created: (SM-1350) Version resolving in spring itests does
not work when called from project dir
Version resolving in spring itests does not work when called from project dir
-----------------------------------------------------------------------------
Key: SM-1350
URL: https://issues.apache.org/activemq/browse/SM-1350
Project: ServiceMix
Issue Type: Bug
Components: tooling
Affects Versions: 3.3
Reporter: Marcello Teodori
Priority: Minor
If I create an itest project from the archetype and try to setup integration testin with spring as explained here:
http://servicemix.apache.org/integration-testing-in-spring.html
everything works if I run tests from the parent project directory, but not from the itest project directory.
The same happens for the itest projects provided as examples, ie for org.apache.servicemix.test.SpringWithNoVersionsTest:
cd samples/camel; mvn clean install
is ok, while:
cd samples/camel/camel-sa-itest; mvn clean install
tells me that versions are not resolved:
-------------------------------------------------------------------------------
Test set: org.apache.servicemix.test.SpringWithNoVersionsTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.874 sec <<< FAILURE!
testDeploy(org.apache.servicemix.test.SpringWithNoVersionsTest) Time elapsed: 2.788 sec <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.servicemix.jbi.container.SpringJBIContainer#0' defined in class path resource [test1-noversions.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: You must specify a version property as it could not be deduced for org.apache.servicemix:servicemix-shared
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
Everything works in both cases if I add explicitly the version info in the spring configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sm="http://servicemix.apache.org/config/1.0"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://servicemix.apache.org/config/1.0 http://incubator.apache.org/servicemix/schema/core/servicemix-core.xsd">
<sm:container generateRootDir="true">
<sm:deployments>
<sm:installSharedLibrary groupId="org.apache.servicemix" artifactId="servicemix-shared" version="3.3-SNAPSHOT}"/>
<sm:installComponent groupId="org.apache.servicemix" artifactId="servicemix-camel" version="3.3-SNAPSHOT}"/>
<sm:deployServiceAssembly groupId="org.apache.servicemix.samples" artifactId="camel-sa" version="3.3-SNAPSHOT}"/>
</sm:deployments>
</sm:container>
</beans>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.