You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by pm...@apache.org on 2007/06/28 16:14:56 UTC
svn commit: r551566 [1/7] - in /geronimo/sandbox/j2g: configurator/ plugins/
plugins/org.apache.geronimo.j2g.common/
plugins/org.apache.geronimo.j2g.descriptors.app/
plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/
plugins/org.apache.geronimo....
Author: pmcmahan
Date: Thu Jun 28 07:14:50 2007
New Revision: 551566
URL: http://svn.apache.org/viewvc?view=rev&rev=551566
Log:
GERONIMO-3255 combine redundant J2G eclipse plugins. Patch submitted by Jason Warner.
Modified:
geronimo/sandbox/j2g/configurator/.classpath
geronimo/sandbox/j2g/configurator/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/geronimo-application.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/jboss-app.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test/org/apache/geronimo/j2g/descriptors/app/test/TestApplicationDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPEntityBeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/EJBJarXmlProcessor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/dto/EJBRelation.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/dto/EJBRelationshipRole.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/dto/Relationships.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/test-resources/ejb-jar.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/test-resources/jbosscmp-jdbc.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/test/org/apache/geronimo/j2g/descriptors/cmp/test/TestCMPDescriptorsTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/test/org/apache/geronimo/j2g/descriptors/cmp/test/TestEJBjarXmlProcessor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/common-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/EJBDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/bean/BeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/bean/EntityBeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/bean/JNDIBeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/bean/MessageDrivenBeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/src/org/apache/geronimo/j2g/descriptors/ejb/bean/SessionBeanMigrator.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/test-resources/jboss.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.ejb/test/org/apache/geronimo/j2g/descriptors/ejb/test/TestEJBDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/src/org/apache/geronimo/j2g/descriptors/web/WebDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test-resources/jboss-web.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.web/test/org/apache/geronimo/j2g/descriptors/web/test/TestWebDescriptorTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/src/org/apache/geronimo/j2g/resources/datasource/DSResourcesTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-ds.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/hsqldb-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-ds.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/mysql-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-ds.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test-apps/ds/oracle-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.datasource/test/org/apache/geronimo/j2g/resources/datasource/test/DSResouresToolTestCase.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/src/org/apache/geronimo/j2g/resources/jms/JMSResourcesTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/geronimo-jms-resource-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jbossmq-destinations-service.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-ds.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test-apps/jms/jms-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.jms/test/org/apache/geronimo/j2g/resources/jms/test/JMSResouresToolTestCase.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/src/org/apache/geronimo/j2g/resources/mail/MailResourcesTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/err/mail-service.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/geronimo-mail-service.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-service.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test/org/apache/geronimo/j2g/resources/mail/test/MailResouresToolTestCase.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/commons-logging.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/geronimo-secutiry-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/login-config.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/security-geronimo-plan.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test/org/apache/geronimo/j2g/resources/security/test/SecurityResouresToolTestCase.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/APIReplaceVisitor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/DependenceJavaMigration.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/NodesVisitor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/Anybody.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/DigestCallback.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/GeronimoLoginModule.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/GeronimoSimpleGroup.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/Nobody.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.dependence/src/org/apache/geronimo/j2g/sources/dependence/compatibility/PasswordHasher.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/AbsoluteNameSolver.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/BlockVisitor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/EjbEnvJavaMigration.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/MethodsVisitor.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/NameSolvingException.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources.environment/src/org/apache/geronimo/j2g/sources/environment/VarContext.java
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/.project
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/META-INF/MANIFEST.MF
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/build.properties
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/plugin.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.sources/pom.xml
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.util/.classpath
geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.util/.project
geronimo/sandbox/j2g/plugins/pom.xml
Modified: geronimo/sandbox/j2g/configurator/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/configurator/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/configurator/.classpath (original)
+++ geronimo/sandbox/j2g/configurator/.classpath Thu Jun 28 07:14:50 2007
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Modified: geronimo/sandbox/j2g/configurator/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/configurator/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/configurator/.project (original)
+++ geronimo/sandbox/j2g/configurator/.project Thu Jun 28 07:14:50 2007
@@ -1,17 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>configurator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<projectDescription>
+ <name>configurator</name>
+ <comment>JBoss to Geronimo Conversion Tool</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.classpath Thu Jun 28 07:14:50 2007
@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<classpath>
+ <classpathentry kind="src" path="." including="plugin.xml" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.common/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.apache.geronimo.j2g.common</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+ <name>org.apache.geronimo.j2g.common</name>
+ <comment>JBoss to Geronimo Conversion Tool</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.classpath Thu Jun 28 07:14:50 2007
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="test"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.apache.geronimo.j2g.descriptors.app</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: J2G Enterprise Migration Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.descriptors.app; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.geronimo.j2g.common,
- org.apache.geronimo.j2g.descriptors,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.descriptors.app
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/build.properties Thu Jun 28 07:14:50 2007
@@ -1,21 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- source.. = src/
-output.. = classes/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/plugin.xml Thu Jun 28 07:14:50 2007
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<plugin>
- <extension point="org.apache.geronimo.j2g.descriptors.migrations">
- <migration class="org.apache.geronimo.j2g.descriptors.app.ApplicationDescriptorTool"/>
- </extension>
-</plugin>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/pom.xml Thu Jun 28 07:14:50 2007
@@ -60,3 +60,65 @@
</dependency>
</dependencies>
</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<!-- $Rev$ $Date$ -->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.descriptors.app</artifactId>
+ <packaging>jar</packaging>
+ <name>${artifactId}</name>
+ <parent>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>j2g-plugins</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.geronimo.devtools</groupId>
+ <artifactId>maven-eclipsepde-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.descriptors</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.util</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.common</artifactId>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+</project>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/commons-logging.properties Thu Jun 28 07:14:50 2007
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- # Set root logger level to DEBUG and its only appender to console.
-log4j.rootLogger=INFO
-
-#define loggers
-#pluging logger
-log4j.logger.com.ibm.j2g= DEBUG,console
-
-# console is set to be a ConsoleAppender.
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-
-# console uses PatternLayout.
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern=[%t] %-5p %l - %m%n
-log4j.appender.console.layout.ConversionPattern=[%t] %-5p - %m%n
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/src/org/apache/geronimo/j2g/descriptors/app/ApplicationDescriptorTool.java Thu Jun 28 07:14:50 2007
@@ -1,151 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geronimo.j2g.descriptors.app;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.j2g.common.ConsoleOutput;
-import org.apache.geronimo.j2g.common.IFileMigration;
-import org.apache.geronimo.j2g.common.IOutput;
-import org.apache.geronimo.j2g.common.Tool;
-import org.apache.geronimo.j2g.util.descriptors.Constants;
-import org.apache.geronimo.j2g.util.descriptors.security.SecurityElementProcessor;
-import org.apache.geronimo.j2g.util.descriptors.xml.XMLConversionHelper;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.QName;
-
-public class ApplicationDescriptorTool implements IFileMigration {
-
- private IOutput out;
-
- private String directoryName;
-
- private Log logger = LogFactory.getLog(ApplicationDescriptorTool.class);
-
- private SecurityElementProcessor securityElementProcessor;
-
- public ApplicationDescriptorTool() {
- Tool currentTool = Tool.getCurrent();
- if (currentTool != null) {
- out = currentTool.getOutput();
- } else {
- out = new ConsoleOutput();
- }
- securityElementProcessor = new SecurityElementProcessor();
- }
-
- public boolean migrate(File file) {
- boolean migrated = false;
- directoryName = file.getParent();
- String jbossFileName = file.getName();
- logger.debug("Directory Name ==> " + directoryName + " jboss file Name ==> "
- + jbossFileName);
-
- if (jbossFileName.equals(Constants.JBOSS_JBOSS_APPLICATION_XML_FILE)) {
- out.info("Converting Jboss-app.xml file in " + directoryName);
- try {
- // check whether the jbosscmp-jdbc.xml file is present and
- // if so load it and process it.
- Document jbossDocument = XMLConversionHelper.getDocument(file);
- Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
- Constants.APPLICATION_NAME_SPACE, "application");
- migrate(jbossDocument.getRootElement(), geronimoDocument.getRootElement());
- String geronimoOpenEjbJarFileName = directoryName + File.separator
- + Constants.GERONIMO_APPLICATION_XML_FILE;
- XMLConversionHelper.saveGeronimoDocument(geronimoOpenEjbJarFileName,
- geronimoDocument);
- migrated = true;
- out.info("Successfully migrated the Jboss-app.xml file in "
- + directoryName + ", with the error and warning messages as shown");
- } catch (DocumentException e) {
- out.error("Errors occurs while reading xml descriptor "
- + file.getAbsolutePath()
- + ". It is possible that the migrator cannot download an xml schema or xml file has a wrong syntax. Nested exception:"
- + e.getMessage());
- } catch (IOException e) {
- out.error("IO exception " + e.getMessage());
- }
- } else if (jbossFileName.equals(Constants.APPLICATION_XML_FILE)){
- out.info("Converting application.xml file in " + directoryName);
- out.info("Nothing to convert. Keep the file as it is");
- }
- return migrated;
- }
-
- private void migrate(Element jbossRootElement, Element geronimoRootElement) {
-
- Element jbossRootChildElement;
- for (Iterator iter = jbossRootElement.elements().iterator(); iter.hasNext();) {
- jbossRootChildElement = (Element) iter.next();
- if (jbossRootChildElement.getName().equals("security-domain")) {
- securityElementProcessor.setSecurityDomain(jbossRootChildElement.getText());
- } else if (jbossRootChildElement.getName().equals("unauthenticated-principal")) {
- // set the default principal in security element processor
- securityElementProcessor.setDefaultPrincipal(jbossRootChildElement.getText());
- } else if (jbossRootChildElement.getName().equals("security-role")) {
- Element geronimoRoleMapping = securityElementProcessor
- .getGeronimoSecurityRoleElement(geronimoRootElement);
- securityElementProcessor.migrateSecurityRole(jbossRootChildElement,
- geronimoRoleMapping);
- } else {
- out.warn("The Element '" + jbossRootChildElement.getName() + "' does not support ",
- XMLConversionHelper.getLineNumber(jbossRootChildElement),
- XMLConversionHelper.getColumnNumber(jbossRootChildElement));
- logger.debug("The Element '" + jbossRootChildElement.getName()
- + "' does not support ");
- }
- }
- }
-
- private void migrateModule(Element jbossModule, Element geronimoModule) {
-
- Element jbossModuleChildElement;
- for (Iterator iter = jbossModule.elements().iterator(); iter.hasNext();) {
- jbossModuleChildElement = (Element) iter.next();
- if (jbossModuleChildElement.getName().equals("service")) {
- // TODO: figure out properly
- // for the moment we add connector element to replace the
- // service
- String serviceName = jbossModuleChildElement.getText();
- String firstPart = serviceName.substring(0, serviceName.lastIndexOf("."));
- // add conector element
- QName qname = new QName("connector", geronimoModule.getNamespace());
- Element connectorElement = geronimoModule.addElement(qname);
- connectorElement.setText(firstPart + ".rar");
-
- // add alt-dd element
- qname = new QName("alt-dd", geronimoModule.getNamespace());
- Element altDDElement = geronimoModule.addElement(qname);
- altDDElement.setText(firstPart + ".xml");
- } else {
- out.warn("The Element '" + jbossModuleChildElement.getName()
- + "' does not support ", XMLConversionHelper
- .getLineNumber(jbossModuleChildElement), XMLConversionHelper
- .getColumnNumber(jbossModuleChildElement));
- logger.debug("The Element '" + jbossModuleChildElement.getName()
- + "' does not support ");
- }
- }
- }
-}
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/geronimo-application.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/geronimo-application.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/geronimo-application.xml Thu Jun 28 07:14:50 2007
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
- <sys:environment>
- <sys:moduleId>
- <sys:groupId>j2g</sys:groupId>
- <sys:artifactId>application</sys:artifactId>
- <sys:version>1.0</sys:version>
- <sys:type>ear</sys:type>
- </sys:moduleId>
- <sys:dependencies/>
- </sys:environment>
- <security:security>
- <security:default-principal>
- <security:realm-principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="amila" domain-name="securiyDomain" realm-name="securiyDomain"/>
- </security:default-principal>
- <security:role-mappings>
- <security:role role-name="admin">
- <security:realm-principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="amila" domain-name="securiyDomain" realm-name="securiyDomain"/>
- <security:realm-principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="rasika" domain-name="securiyDomain" realm-name="securiyDomain"/>
- </security:role>
- <security:role role-name="manager">
- <security:realm-principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="sandakith" domain-name="securiyDomain" realm-name="securiyDomain"/>
- <security:realm-principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="sris" domain-name="securiyDomain" realm-name="securiyDomain"/>
- </security:role>
- </security:role-mappings>
- </security:security>
-</application>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/jboss-app.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/jboss-app.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/jboss-app.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test-resources/jboss-app.xml Thu Jun 28 07:14:50 2007
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License. -->
-
-<!--DOCTYPE ejb-jar PUBLIC
- "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
- "http://java.sun.com/dtd/ejb-jar_2_0.dtd" -->
-
-<jboss-app>
- <security-domain>securiyDomain</security-domain>
- <unauthenticated-principal>amila</unauthenticated-principal>
- <jmx-name>messaging</jmx-name>
- <module>
- <service>mailservice.sar</service>
- </module>
- <module>
- <har>hibanate.sar</har>
- </module>
- <security-role>
- <role-name>admin</role-name>
- <principal-name>amila</principal-name>
- <principal-name>rasika</principal-name>
- </security-role>
- <security-role>
- <role-name>manager</role-name>
- <principal-name>sandakith</principal-name>
- <principal-name>sris</principal-name>
- </security-role>
-
-</jboss-app>
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test/org/apache/geronimo/j2g/descriptors/app/test/TestApplicationDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test/org/apache/geronimo/j2g/descriptors/app/test/TestApplicationDescriptorTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test/org/apache/geronimo/j2g/descriptors/app/test/TestApplicationDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.app/test/org/apache/geronimo/j2g/descriptors/app/test/TestApplicationDescriptorTool.java Thu Jun 28 07:14:50 2007
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- package org.apache.geronimo.j2g.descriptors.app.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.descriptors.app.ApplicationDescriptorTool;
-
-public class TestApplicationDescriptorTool extends TestCase {
-
- public void testMigrate() {
- String jbossApplicatinXmlFile = "test-resources/jboss-app.xml";
- ApplicationDescriptorTool applicationDescriptorTool = new ApplicationDescriptorTool();
- applicationDescriptorTool.migrate(new File(jbossApplicatinXmlFile));
- }
-
-}
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.classpath Thu Jun 28 07:14:50 2007
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="test"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.apache.geronimo.j2g.descriptors.cmp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: J2G Cmp Migration Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.descriptors.cmp; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Vendor: Apache.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.apache.geronimo.j2g.common,
- org.apache.geronimo.j2g.descriptors,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.descriptors.comp,
- org.apache.geronimo.j2g.descriptors.comp.dto
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/build.properties Thu Jun 28 07:14:50 2007
@@ -1,21 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- source.. = src/
-output.. = classes/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/plugin.xml Thu Jun 28 07:14:50 2007
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<plugin>
- <extension point="org.apache.geronimo.j2g.descriptors.migrations">
- <migration class="org.apache.geronimo.j2g.descriptors.comp.CMPDescriptorTool"/>
- </extension>
-</plugin>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/pom.xml Thu Jun 28 07:14:50 2007
@@ -60,3 +60,65 @@
</dependency>
</dependencies>
</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<!-- $Rev$ $Date$ -->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.descriptors.cmp</artifactId>
+ <packaging>jar</packaging>
+ <name>${artifactId}</name>
+ <parent>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>j2g-plugins</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.geronimo.devtools</groupId>
+ <artifactId>maven-eclipsepde-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.descriptors</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.util</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.tools</groupId>
+ <artifactId>org.apache.geronimo.j2g.common</artifactId>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+</project>
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/commons-logging.properties Thu Jun 28 07:14:50 2007
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- # Set root logger level to DEBUG and its only appender to console.
-log4j.rootLogger=INFO
-
-#define loggers
-#pluging logger
-log4j.logger.com.ibm.j2g=DEBUG,console
-
-# console is set to be a ConsoleAppender.
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-
-# console uses PatternLayout.
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-#log4j.appender.console.layout.ConversionPattern=[%t] %-5p %l - %m%n
-log4j.appender.console.layout.ConversionPattern=[%t] %-5p - %m%n
\ No newline at end of file
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.descriptors.cmp/src/org/apache/geronimo/j2g/descriptors/comp/CMPDescriptorTool.java Thu Jun 28 07:14:50 2007
@@ -1,447 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.geronimo.j2g.descriptors.comp;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.j2g.common.ConsoleOutput;
-import org.apache.geronimo.j2g.common.IFileMigration;
-import org.apache.geronimo.j2g.common.IOutput;
-import org.apache.geronimo.j2g.common.Tool;
-import org.apache.geronimo.j2g.descriptors.comp.dto.EJBRelation;
-import org.apache.geronimo.j2g.descriptors.comp.dto.EJBRelationshipRole;
-import org.apache.geronimo.j2g.descriptors.comp.dto.Relationships;
-import org.apache.geronimo.j2g.util.descriptors.Constants;
-import org.apache.geronimo.j2g.util.descriptors.env.EnvirionmentElementProcessor;
-import org.apache.geronimo.j2g.util.descriptors.xml.XMLConversionHelper;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.dom4j.QName;
-
-public class CMPDescriptorTool implements IFileMigration {
-
- private IOutput out;
-
- private Log logger = LogFactory.getLog(CMPDescriptorTool.class);
-
- private EnvirionmentElementProcessor envirionmentElementProcessor;
-
- private CMPEntityBeanMigrator cmpEntityBeanMigrator;
-
- private String directoryName;
-
- private Map ejbKeyColumnMapper;
-
- public CMPDescriptorTool() {
- Tool currentTool = Tool.getCurrent();
- if (currentTool != null){
- out = currentTool.getOutput();
- } else {
- out = new ConsoleOutput();
- }
- envirionmentElementProcessor = new EnvirionmentElementProcessor();
- cmpEntityBeanMigrator = new CMPEntityBeanMigrator();
- ejbKeyColumnMapper = new HashMap();
- }
-
- public boolean migrate(File file) {
- boolean migrated = false;
- directoryName = file.getParent();
- String jbossFileName = file.getName();
- logger.debug("Directory Name ==> " + directoryName + " jboss file Name ==> "
- + jbossFileName);
-
- if (jbossFileName.equals(Constants.JBOSS_JBOSS_CMP_JDBC_XML_FILE)) {
- out.info("Converting file " + file.getAbsolutePath() + ".");
- try {
- // check whether the jbosscmp-jdbc.xml file is present and
- // if so load it and process it.
- String geronimoOpenEjbJarFileName = directoryName + File.separator
- + Constants.GERONIMO_OPEN_EJB_XML_FILE;
- File tempFile = new File(geronimoOpenEjbJarFileName);
- if (tempFile.exists()) {
- System.out.println("Deleting the pre-existing openejb-jar.xml file");
- tempFile.delete();
- }
- Document jbossDocument = XMLConversionHelper.getDocument(file);
- Document geronimoDocument = XMLConversionHelper.getOpenEJBJarDocument(directoryName);
- migrate(jbossDocument.getRootElement(), geronimoDocument.getRootElement());
- XMLConversionHelper.saveOpenEJBDocument(geronimoOpenEjbJarFileName,
- geronimoDocument);
- migrated = true;
- out.info("Successfully migrated the Jbosscmp-jdbc.xml file in "
- + directoryName + ", with the error and warning messages as shown");
- } catch (DocumentException e) {
- out.error("Errors occurs while reading xml descriptor "
- + file.getAbsolutePath()
- + ". It is possible that the migrator cannot download the xml schema or the xml file has incorrect syntax. Nested exception:"
- + e.getMessage());
- } catch (IOException e) {
- out.error("IO exception " + e.getMessage());
- }
- }
- return migrated;
- }
-
- private void migrate(Element jbossRootElement, Element geronimoRootElement) {
- Element jbossRootChildElement;
- logger.debug("migrating the root elements");
- for (Iterator iter = jbossRootElement.elements().iterator(); iter.hasNext();) {
- jbossRootChildElement = (Element) iter.next();
- if (jbossRootChildElement.getName().equals("defaults")) {
- logger.debug("migrating the defaults");
- migrateDefaults(jbossRootChildElement, geronimoRootElement);
- } else if (jbossRootChildElement.getName().equals("enterprise-beans")) {
- logger.debug("migrating the enterprise beans");
- // process the enterprise bean element
- // add enterprise beans element to geronimo
- // this element is in the same name space as the root element
- Element geronimoEnterpriseBean = XMLConversionHelper.getGeronimoElement(
- geronimoRootElement, "//ejb:enterprise-beans", "enterprise-beans",
- geronimoRootElement.getNamespace());
- migrateEnterpriseBeans(jbossRootChildElement, geronimoEnterpriseBean);
- } else if (jbossRootChildElement.getName().equals("relationships")) {
- QName qname = new QName("relationships", geronimoRootElement.getNamespace());
- Element geronimoReleationship = geronimoRootElement.addElement(qname);
- migrateRelationships(jbossRootChildElement, geronimoReleationship);
- } else {
- out.warn("The Element '" + jbossRootChildElement.getName() + "' is not supported ",
- XMLConversionHelper.getLineNumber(jbossRootChildElement),
- XMLConversionHelper.getColumnNumber(jbossRootChildElement));
- logger.debug("The Element '" + jbossRootChildElement.getName()
- + "' is not supported ");
- }
- }
- }
-
- private void migrateRelationships(Element jbossRelationships, Element geronimoRelationships) {
-
- Element jbossRelationshipsChildElement;
- String fileName = directoryName + File.separator + Constants.EJB_JAR_XML_FILE;
- EJBJarXmlProcessor ejbJarXmlProcessor = new EJBJarXmlProcessor(fileName);
- try {
- Relationships relationships = ejbJarXmlProcessor.getRelationships();
- for (Iterator iter = jbossRelationships.elements().iterator(); iter.hasNext();) {
- jbossRelationshipsChildElement = (Element) iter.next();
- if (jbossRelationshipsChildElement.getName().equals("ejb-relation")) {
- QName qname = new QName("ejb-relation", geronimoRelationships.getNamespace());
- Element geronimoEJBRelation = geronimoRelationships.addElement(qname);
-
- Element ejbRelationName = jbossRelationshipsChildElement
- .element("ejb-relation-name");
- migrateEJBRelation(jbossRelationshipsChildElement, geronimoEJBRelation,
- relationships.getEJBRelation(ejbRelationName.getText().trim()));
- }
- }
- } catch (DocumentException e) {
- out.error("No ejb-jar.xml file exists can not migrate ralationships");
- }
- }
-
- private void migrateEJBRelation(Element jbossEJBRelation, Element geronimoEJBRelation,
- EJBRelation ejbRelation) {
-
- Element jbossEJBRelationChildElement;
- Element noKeyFieldsRelationshipRole = null;
- Element noCmrFieldRelationshipRole = null;
- boolean isRelationshipRoleMigrated = false;
- for (Iterator iter = jbossEJBRelation.elements().iterator(); iter.hasNext();) {
- jbossEJBRelationChildElement = (Element) iter.next();
- if (jbossEJBRelationChildElement.getName().equals("ejb-relation-name")) {
- QName qname = new QName("ejb-relation-name", geronimoEJBRelation.getNamespace());
- Element geronimoEJBRelationName = geronimoEJBRelation.addElement(qname);
- geronimoEJBRelationName.setText(jbossEJBRelationChildElement.getText());
- } else if (jbossEJBRelationChildElement.getName().equals("relation-table-mapping")) {
- QName qname = new QName("many-to-many-table-name", geronimoEJBRelation
- .getNamespace());
- Element geronimoManyToMany = geronimoEJBRelation.addElement(qname);
- migrateRelationTableMapping(jbossEJBRelationChildElement, geronimoManyToMany);
- } else if (jbossEJBRelationChildElement.getName().equals("ejb-relationship-role")) {
- Element keyFields = jbossEJBRelationChildElement.element("key-fields");
- if ((keyFields == null) || (keyFields.elements().isEmpty())) {
- logger.debug("Key field is empty no neet to convert this element");
- // we store this element to process later if other ejb-relationship-role
- // does not have a cmr field.
- noKeyFieldsRelationshipRole = jbossEJBRelationChildElement;
- } else {
- QName qname = new QName("ejb-relationship-role", geronimoEJBRelation
- .getNamespace());
- Element ejbRelationshipRoleName = jbossEJBRelationChildElement
- .element("ejb-relationship-role-name");
- EJBRelationshipRole ejbRelationshipRole =
- ejbRelation.getEJBRelationshipRole(ejbRelationshipRoleName.getText().trim());
- if (ejbRelationshipRole.getCmrFieldName() != null) {
- Element geronimoEJBRelationshipRole = geronimoEJBRelation.addElement(qname);
-
- migrateEJBRelationshipRole(jbossEJBRelationChildElement,
- geronimoEJBRelationshipRole, ejbRelationshipRole);
- isRelationshipRoleMigrated = true;
- } else {
- // we store this ejb-relationship-role element to process later
- noCmrFieldRelationshipRole = jbossEJBRelationChildElement;
- }
- }
- }
- }
-
- if (!isRelationshipRoleMigrated) {
- // i.e. the ejbrelationship role which has the key fields does not contain a cmr field.
- QName qname = new QName("ejb-relationship-role", geronimoEJBRelation
- .getNamespace());
- Element geronimoEJBRelationshipRole = geronimoEJBRelation.addElement(qname);
- migrateEJBRelationshipRole(noKeyFieldsRelationshipRole,
- noCmrFieldRelationshipRole,
- geronimoEJBRelationshipRole,
- ejbRelation);
- }
- }
-
- private void migrateEJBRelationshipRole(Element jbossNoKeyEJBRelationshipRole,
- Element jbossNoCmrEJBRelationshipRole,
- Element geronimoEJBRelationshipRole,
- EJBRelation ejbRelation) {
-
- // adding ejb-relationship-role element
- Element jbossNoKeyEJBRelationshipRoleName =
- jbossNoKeyEJBRelationshipRole.element("ejb-relationship-role-name");
- QName qname = new QName("ejb-relationship-role-name", geronimoEJBRelationshipRole
- .getNamespace());
- Element ejbRoleNameElement = geronimoEJBRelationshipRole.addElement(qname);
- ejbRoleNameElement.setText(jbossNoKeyEJBRelationshipRoleName.getText());
-
- EJBRelationshipRole ejbNoKeyRelationshipRole =
- ejbRelation.getEJBRelationshipRole(jbossNoKeyEJBRelationshipRoleName.getText().trim());
-
- // add the relationship role source
- qname = new QName("relationship-role-source", geronimoEJBRelationshipRole
- .getNamespace());
- Element ejbRoleSourceElement = geronimoEJBRelationshipRole.addElement(qname);
-
- qname = new QName("ejb-name", geronimoEJBRelationshipRole.getNamespace());
- Element ejbNameElement = ejbRoleSourceElement.addElement(qname);
- ejbNameElement.setText(ejbNoKeyRelationshipRole.getSource());
-
- // add cmr field
- // add the cmr field name field
- if (ejbNoKeyRelationshipRole.getCmrFieldName() != null) {
- qname = new QName("cmr-field", geronimoEJBRelationshipRole.getNamespace());
- Element cmrFieldElement = geronimoEJBRelationshipRole.addElement(qname);
-
- qname = new QName("cmr-field-name", geronimoEJBRelationshipRole.getNamespace());
- Element cmrFieldName = cmrFieldElement.addElement(qname);
- cmrFieldName.setText(ejbNoKeyRelationshipRole.getCmrFieldName());
- } else {
- out.error("No cmr field given to relation ship " + ejbRelation.getEjbRelationName());
- }
-
- // put foreign-key-column-on-source
- if (ejbNoKeyRelationshipRole.getMultiplicity().equals("Many")){
- qname = new QName("foreign-key-column-on-source", geronimoEJBRelationshipRole.getNamespace());
- geronimoEJBRelationshipRole.addElement(qname);
- }
-
-
- // add role mapping
- Element jbossNoCMREJBRelationshipRoleName =
- jbossNoKeyEJBRelationshipRole.element("ejb-relationship-role-name");
- EJBRelationshipRole ejbNoCmrRelationshipRole =
- ejbRelation.getEJBRelationshipRole(jbossNoCMREJBRelationshipRoleName.getText().trim());
-
- // add key fields
- Element jbossNoCMRKeyFieles = jbossNoCmrEJBRelationshipRole.element("key-fields");
- qname = new QName("role-mapping", geronimoEJBRelationshipRole.getNamespace());
- Element geronimoRoleMapping = geronimoEJBRelationshipRole.addElement(qname);
- migrateKeyFields(jbossNoCMRKeyFieles, geronimoRoleMapping,
- (Map) ejbKeyColumnMapper.get(ejbNoCmrRelationshipRole.getSource()));
-
-
- }
-
- private void migrateEJBRelationshipRole(Element jbossEJBRelationshipRole,
- Element geronimoEJBRelationshipRole, EJBRelationshipRole ejbRelationshipRole) {
- Element jbossRelationshipChildElement;
- String ejbName = null;
- for (Iterator iter = jbossEJBRelationshipRole.elements().iterator(); iter.hasNext();) {
- jbossRelationshipChildElement = (Element) iter.next();
-
- if (jbossRelationshipChildElement.getName().equals("ejb-relationship-role-name")) {
- // add ejb relationship element
- QName qname = new QName("ejb-relationship-role-name", geronimoEJBRelationshipRole
- .getNamespace());
- Element ejbRoleNameElement = geronimoEJBRelationshipRole.addElement(qname);
- ejbRoleNameElement.setText(jbossRelationshipChildElement.getText());
-
- // add the relationship role source
- qname = new QName("relationship-role-source", geronimoEJBRelationshipRole
- .getNamespace());
- Element ejbRoleSourceElement = geronimoEJBRelationshipRole.addElement(qname);
-
- qname = new QName("ejb-name", geronimoEJBRelationshipRole.getNamespace());
- Element ejbNameElement = ejbRoleSourceElement.addElement(qname);
- ejbNameElement.setText(ejbRelationshipRole.getSource());
-
- // add the cmr field name field
- qname = new QName("cmr-field", geronimoEJBRelationshipRole.getNamespace());
- Element cmrFieldElement = geronimoEJBRelationshipRole.addElement(qname);
-
- qname = new QName("cmr-field-name", geronimoEJBRelationshipRole.getNamespace());
- Element cmrFieldName = cmrFieldElement.addElement(qname);
- cmrFieldName.setText(ejbRelationshipRole.getCmrFieldName());
-
- ejbName = ejbRelationshipRole.getSource();
-
-
- } else if (jbossRelationshipChildElement.getName().equals("key-fields")) {
- QName qname = new QName("role-mapping", geronimoEJBRelationshipRole.getNamespace());
- Element geronimoRoleMapping = geronimoEJBRelationshipRole.addElement(qname);
- migrateKeyFields(jbossRelationshipChildElement, geronimoRoleMapping,
- (Map) ejbKeyColumnMapper.get(ejbName));
- }
- }
-
- }
-
- private void migrateKeyFields(Element jbossKeyField, Element geronimoRoleMapping,
- Map keyFieldMap) {
-
- Element jbossKeyFieldChild;
- for (Iterator iter = jbossKeyField.elements().iterator(); iter.hasNext();) {
- jbossKeyFieldChild = (Element) iter.next();
- if (jbossKeyFieldChild.getName().equals("key-field")) {
- QName qname = new QName("cmr-field-mapping", geronimoRoleMapping.getNamespace());
- Element geronimoCMRFieldMapping = geronimoRoleMapping.addElement(qname);
- migrateKeyField(jbossKeyFieldChild, geronimoCMRFieldMapping, keyFieldMap);
- }
- }
- }
-
- private void migrateKeyField(Element jbossKeyField, Element geronimoCMRFieldMapping,
- Map keyFieldMap) {
- Element jbossKeyFieldChild;
- for (Iterator iter = jbossKeyField.elements().iterator(); iter.hasNext();) {
- jbossKeyFieldChild = (Element) iter.next();
- if (jbossKeyFieldChild.getName().equals("field-name")) {
- QName qname = new QName("key-column", geronimoCMRFieldMapping.getNamespace());
- Element geronimoKeyColumn = geronimoCMRFieldMapping.addElement(qname);
- // get the table column name
- geronimoKeyColumn.setText((String) keyFieldMap.get(jbossKeyFieldChild.getText().trim()));
- } else if (jbossKeyFieldChild.getName().equals("column-name")) {
- QName qname = new QName("foreign-key-column", geronimoCMRFieldMapping
- .getNamespace());
- Element geronimoForegnKeyColumn = geronimoCMRFieldMapping.addElement(qname);
- geronimoForegnKeyColumn.setText(jbossKeyFieldChild.getText());
- }
- }
- }
-
- /**
- * this method may be use ful in future
- *
- * @param jbossTableMappingElement
- * @param geronimoManytoManyTable
- */
-
- private void migrateRelationTableMapping(Element jbossTableMappingElement,
- Element geronimoManytoManyTable) {
-
- Element jbossTableMappingChildElement;
- for (Iterator iter = jbossTableMappingElement.elements().iterator(); iter.hasNext();) {
- jbossTableMappingChildElement = (Element) iter.next();
- if (jbossTableMappingChildElement.getName().equals("table-name")) {
- geronimoManytoManyTable.setText(jbossTableMappingChildElement.getText());
- }
- }
- }
-
- /**
- * this migrates the enterprise-beans part
- *
- * @param jbossEnterpriseBeans
- * @param geronimoEnterpriseBeans
- */
- private void migrateEnterpriseBeans(Element jbossEnterpriseBeans,
- Element geronimoEnterpriseBeans) {
-
- Element jbossEnterpriseBeanChildElement;
- for (Iterator iter = jbossEnterpriseBeans.elements().iterator(); iter.hasNext();) {
- jbossEnterpriseBeanChildElement = (Element) iter.next();
- if (jbossEnterpriseBeanChildElement.getName().equals("entity")) {
-
- // get the entity ejb name
- Element ejbNameElement = jbossEnterpriseBeanChildElement.element("ejb-name");
- String ejbName = ejbNameElement.getText().trim();
- logger.debug("Converting ejb session with name ==> " + ejbName);
- // create a session bean in geronimo
- String xpath = "//ejb:enterprise-beans/ejb:entity[ejb:ejb-name/text() = '"
- + ejbName + "']";
- logger.debug("Find existing ejb using query ==>" + xpath);
- Element geronimoEntity = XMLConversionHelper.getGeronimoElement(
- geronimoEnterpriseBeans, xpath, "entity", geronimoEnterpriseBeans
- .getNamespace());
- cmpEntityBeanMigrator.migrateBean(jbossEnterpriseBeanChildElement, geronimoEntity);
- // put the key columns to hash map
- ejbKeyColumnMapper.put(ejbName, cmpEntityBeanMigrator.getKeyColumnMap());
- }
- }
- }
-
- private void migrateDefaults(Element jbossDefaultsElement, Element geronimoRootElement) {
-
- Element jbossDefaultsChildElement;
- for (Iterator iter = jbossDefaultsElement.elements().iterator(); iter.hasNext();) {
- jbossDefaultsChildElement = (Element) iter.next();
- if (jbossDefaultsChildElement.getName().equals("datasource")) {
- // creates the cmp connection factory element
- logger.debug("migrating the datasource");
- QName qname = new QName("cmp-connection-factory", geronimoRootElement
- .getNamespaceForPrefix(Constants.NAMING_NAME_SPACE_PREFIX));
- Element geronimoCMPConnectionFactoryElement = geronimoRootElement.addElement(qname);
- logger.debug("cmp-connection-factory added to geromimo");
- String jndiName = jbossDefaultsChildElement.getText();
- String artifactID;
- if (!envirionmentElementProcessor.isJndiNameProcessed(jndiName)) {
- artifactID = envirionmentElementProcessor.addDependencyModule(jndiName,
- geronimoCMPConnectionFactoryElement.getDocument().getRootElement());
- } else {
- artifactID = envirionmentElementProcessor.getArtifactID(jndiName);
- }
- qname = new QName("resource-link", geronimoCMPConnectionFactoryElement
- .getNamespaceForPrefix(Constants.NAMING_NAME_SPACE_PREFIX));
- Element geronimoResourceLink = geronimoCMPConnectionFactoryElement
- .addElement(qname);
- geronimoResourceLink.setText(artifactID);
- logger.debug("resource-link added to geronimo");
- } else {
- out.warn("The Element '" + jbossDefaultsChildElement.getName()
- + "' is not supported", XMLConversionHelper
- .getLineNumber(jbossDefaultsChildElement), XMLConversionHelper
- .getColumnNumber(jbossDefaultsChildElement));
- logger.debug("The Element '" + jbossDefaultsChildElement.getName()
- + "' is not supported");
- }
- }
- }
-}