Author: rmannibucau
Date: Thu Nov 24 22:53:20 2011
New Revision: 1206009
URL: http://svn.apache.org/viewvc?rev=1206009&view=rev
Log:
special maven case: if both main and test are deployed as a module both will
have Comp bean and it will create a jndi name conflict, to avoid it we rename
the test bean suffixing it by _test but the separator test was only for UNIX OS
so using File.separator to make it work on windows. Note: it only manage
standard maven projects with test built in target/test-classes
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=1206009&r1=1206008&r2=1206009&view=diff
==============================================================================
---
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
(original)
+++
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Thu Nov 24 22:53:20 2011
@@ -1084,7 +1084,7 @@ public class AnnotationDeployer implemen
// passing jar location to be able to manage maven
classes/test-classes which have the same moduleId
String id = ejbModule.getModuleId();
- if (ejbModule.getJarLocation() != null &&
ejbModule.getJarLocation().contains(ejbModule.getModuleId() +
"/target/test-classes")) {
+ if (ejbModule.getJarLocation() != null &&
ejbModule.getJarLocation().contains(ejbModule.getModuleId() +
"/target/test-classes".replace("/", File.separator))) {
// with maven if both src/main/java and src/test/java
are deployed
// moduleId.Comp exists twice so it fails
// here we simply modify the test comp bean name to
avoid it