geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r551566 [5/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....
Date Thu, 28 Jun 2007 14:14:56 GMT
Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/err/mail-service.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/err/mail-service.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/err/mail-service.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/err/mail-service.xml Thu Jun 28 07:14:50 2007
@@ -52,3 +52,57 @@
   </mbean>
 
 </server>
+<?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 server -->
+ <!-- $Id$ -->
+<server>
+
+  <!-- ==================================================================== -->
+  <!-- Mail Connection Factory                                              -->
+  <!-- ==================================================================== -->
+
+  <mbean code="org.jboss.mail.MailService"
+         name="jboss:service=Mail">
+    <attribute name="JNDIName">java:/Mail</attribute>
+    <attribute name="User">nobody</attribute>
+    <attribute name="Password">password</attribute>
+    <attribute name="Configuration">
+       <!-- Test -->
+       <configuration>
+          <!-- Change to your mail server prototocol -->
+          <property name="mail.store.protocol" value="pop3"/>
+          <property name="mail.transport.protocol" value="smtp"/>
+
+          <!-- Change to the user who will receive mail  -->
+          <property name="mail.user" value="nobody"/>
+
+          <!-- Change to the mail server  -->
+          <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
+
+          <!-- Change to the SMTP gateway server -->
+          <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>
+
+          <!-- Change to the address mail will be from  -->
+          <property name="mail.from" value="nobody@nosuchhost.nosuchdomain.com"/>
+
+          <!-- Enable debugging output from the javamail classes -->
+          <property name="mail.debug" value="false"/>
+       </configuration>
+    </attribute>
+  </mbean>
+
+</server>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/geronimo-mail-service.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/geronimo-mail-service.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/geronimo-mail-service.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/geronimo-mail-service.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. -->
- <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-  <environment>
-    <moduleId>
-      <groupId>j2g</groupId>
-      <artifactId>Mail</artifactId>
-      <version>1.0</version>
-      <type>car</type>
-    </moduleId>
-    <dependencies>
-      <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>javamail</artifactId>
-      </dependency>
-    </dependencies>
-  </environment>
-  <gbean name="mailSession" class="org.apache.geronimo.mail.MailGBean">
-    <attribute name="properties">
-mail.store.protocol=pop3
-mail.transport.protocol=smtp
-mail.user=nobody
-mail.pop3.host=pop3.nosuchhost.nosuchdomain.com
-mail.smtp.host=smtp.nosuchhost.nosuchdomain.com
-mail.from=nobody@nosuchhost.nosuchdomain.com
-mail.debug=false
-    </attribute>   
-  </gbean>
-</module>
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-  <environment>
-    <moduleId>
-      <groupId>j2g</groupId>
-      <artifactId>Mail</artifactId>
-      <version>1.0</version>
-      <type>car</type>
-    </moduleId>
-    <dependencies>
-      <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>javamail</artifactId>
-        <version>1.1</version>
-        <type>car</type>
-      </dependency>
-    </dependencies>
-  </environment>
-  <gbean name="mailSession" class="org.apache.geronimo.mail.MailGBean">
-    <attribute name="properties"><![CDATA[
-mail.store.protocol=pop3
-mail.transport.protocol=smtp
-mail.user=nobody
-mail.pop3.host=pop3.nosuchhost.nosuchdomain.com
-mail.smtp.host=smtp.nosuchhost.nosuchdomain.com
-mail.from=nobody@nosuchhost.nosuchdomain.com
-mail.debug=false]]></attribute>
-  </gbean>
-</module>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-service.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-service.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-service.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test-apps/mail/mail-service.xml Thu Jun 28 07:14:50 2007
@@ -54,3 +54,59 @@
   </mbean>
 
 </server>
+<?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 server
+    PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd"-->
+<!-- $Id$ -->
+
+<server>
+
+  <!-- ==================================================================== -->
+  <!-- Mail Connection Factory                                              -->
+  <!-- ==================================================================== -->
+
+  <mbean code="org.jboss.mail.MailService"
+         name="jboss:service=Mail">
+    <attribute name="JNDIName">java:/Mail</attribute>
+    <attribute name="User">nobody</attribute>
+    <attribute name="Configuration">
+       <!-- Test -->
+       <configuration>
+          <!-- Change to your mail server prototocol -->
+          <property name="mail.store.protocol" value="pop3"/>
+          <property name="mail.transport.protocol" value="smtp"/>
+
+          <!-- Change to the user who will receive mail  -->
+          <property name="mail.user" value="nobody"/>
+
+          <!-- Change to the mail server  -->
+          <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
+
+          <!-- Change to the SMTP gateway server -->
+          <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>
+
+          <!-- Change to the address mail will be from  -->
+          <property name="mail.from" value="nobody@nosuchhost.nosuchdomain.com"/>
+
+          <!-- Enable debugging output from the javamail classes -->
+          <property name="mail.debug" value="false"/>
+       </configuration>
+    </attribute>
+  </mbean>
+
+</server>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test/org/apache/geronimo/j2g/resources/mail/test/MailResouresToolTestCase.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test/org/apache/geronimo/j2g/resources/mail/test/MailResouresToolTestCase.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test/org/apache/geronimo/j2g/resources/mail/test/MailResouresToolTestCase.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.mail/test/org/apache/geronimo/j2g/resources/mail/test/MailResouresToolTestCase.java Thu Jun 28 07:14:50 2007
@@ -1,70 +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.resources.mail.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.resources.ResourcesTool;
-import org.apache.geronimo.j2g.resources.mail.MailResourcesTool;
-import org.apache.geronimo.j2g.util.resources.xml.XMLConversionHelper;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-
-/**
- * Test Case for the MailResouresTool
- */
-public class MailResouresToolTestCase extends TestCase {
-
-     
-    protected void setUp() throws Exception {
-        // To set the IOutput intialize the DescripterTool
-        ResourcesTool resTool = new ResourcesTool();
-        super.setUp();
-    }
-    
-    // Test for mail service migration
-    public void testMailResourcesFileMigration() {
-        File file = new File("test-apps/mail/mail-service.xml");
-        MailResourcesTool mailResourcesTool = new MailResourcesTool();
-        boolean result = mailResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-
-    // Test for mail service migration (with plain text password authentication)
-    public void testMailResourcesFileMigration_withPassword() {
-        File file = new File("test-apps/mail/err/mail-service.xml");
-        MailResourcesTool mailResourcesTool = new MailResourcesTool();
-        boolean result = mailResourcesTool.migrate(file);
-        assertTrue(!result);
-    }
-    
-    // Test for mail service migration (with plain text password authentication)
-    public void testCDATA_Section() {
-        File file = new File("test-apps/mail/mail-geronimo-plan.xml");
-        try {
-            Document document = XMLConversionHelper.getJbossDocument(file);
-            Element element =XMLConversionHelper.obtainSubElementWithAttribute( document.getRootElement(), "gbean", "name", "mailSession");
-            Element element1 =XMLConversionHelper.obtainSubElementWithAttribute(element, "attribute", "name", "properties");
-            System.out.println(element1.getText());
-        } catch (DocumentException e) {
-            e.printStackTrace();
-        }
-    }
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.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.resources.security/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/.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.resources.security</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.resources.security/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/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 Security Plug-in
-Bundle-SymbolicName: org.apache.geronimo.j2g.resources.security; 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.resources,
- org.apache.geronimo.j2g.util
-Bundle-ClassPath: .
-Export-Package: org.apache.geronimo.j2g.resources.security,
- org.apache.geronimo.j2g.resources.security.test

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/build.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/build.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/build.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/build.properties Thu Jun 28 07:14:50 2007
@@ -1,22 +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/,\
-           test/
-output.. = classes/
-bin.includes = plugin.xml,\
-               META-INF/,\
-               .,\

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/plugin.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/plugin.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/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.resources.migrations">
-      	<migration class="org.apache.geronimo.j2g.resources.security.SecurityResourcesTool"/>
-   </extension>
-</plugin>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/pom.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/pom.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/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.resources.security</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.resources</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.resources.security/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/commons-logging.properties?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/commons-logging.properties (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/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.
-commons-logging.rootLogger=INFO
-
-#define loggers
-#pluging logger
-lcommons-logging.logger.com.ibm.j2g= DEBUG,console
-
-# console is set to be a ConsoleAppender.
-commons-logging.appender.console=org.apache.log4j.ConsoleAppender
-
-# console uses PatternLayout.
-commons-logging.appender.console.layout=org.apache.log4j.PatternLayout
-#commons-logging.appender.console.layout.ConversionPattern=[%t] %-5p %l - %m%n
-commons-logging.appender.console.layout.ConversionPattern=[%t] %-5p - %m%n
\ No newline at end of file

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/src/org/apache/geronimo/j2g/resources/security/SecurityResourcesTool.java Thu Jun 28 07:14:50 2007
@@ -1,575 +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.resources.security;
-
-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.IFileMigration;
-import org.apache.geronimo.j2g.common.IOutput;
-import org.apache.geronimo.j2g.common.Tool;
-import org.apache.geronimo.j2g.util.resources.Constants;
-import org.apache.geronimo.j2g.util.resources.xml.XMLConversionHelper;
-import org.dom4j.Attribute;
-import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-
-/**
- * Class which implement the Security Resource File Migration 
- */
-public class SecurityResourcesTool implements IFileMigration {
-
-    // Initialization of the IOutput for SecurityResourcesTool class
-    IOutput out = Tool.getCurrent().getOutput();
-    // Initialization of the logger for SecurityResourcesTool class
-    Log logger = LogFactory.getLog(SecurityResourcesTool.class);
-
-    /**
-     * mgration method from data source jboss discripters to geronimo
-     * discriptors
-     * 
-     * @param sourceFile :data source jboss discriptor file
-     * @return status of the migration
-     */
-    public boolean migrate(File sourceFile) {
-        // read the login-config.xml file and then make the changes to the
-        // geronimo side
-        boolean migrated = false;
-            String fileName = sourceFile.getPath();
-            String directoryName = fileName.substring(0, fileName.lastIndexOf(File.separator));
-            String jbossSecirityFileName = sourceFile.getName();
-            logger.debug("Directory Name ==> " + directoryName);
-            logger.debug("jboss security file Name ==> " + jbossSecirityFileName);
-            // Checking wether file is a valid login-config.xml file
-            if (jbossSecirityFileName.equals(Constants.JBOSS_VALID_SECURITY_XML_FILE)) {
-                out.info("Converting Jboss login-config.xml file in " + directoryName);
-                try {
-                    Document jbossDocument = XMLConversionHelper.getJbossDocument(sourceFile);
-                    Document geronimoDocument = migrationFromJboss2Geronimo(jbossDocument
-                            .getRootElement());
-                    String geronimoSecurityFileName = directoryName + File.separator
-                            + Constants.GERONIMO_SECURITY_PLAN_FILE;
-                    // Check whether the file already exists if so back up
-                    // that and save that or check the req
-                    // This was done at upper level of the tool
-                    XMLConversionHelper.saveGeronimoDocument(geronimoSecurityFileName,
-                            geronimoDocument);
-                    migrated = true;
-                    out.info("The Security Resource File Migration Complete !!!\n");
-                } catch (DocumentException e) {
-                	out.error("Errors occurs while reading xml descriptor "
-    						+ sourceFile.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());
-                }
-            }
-
-        return migrated;
-    }
-
-    /**
-     * Accepts the jboss side Elements that holdes the discripter infomation and
-     * return the geronimo discripter
-     * 
-     * @param jbossRootElement
-     * @return geronimo plan
-     */
-    private Document migrationFromJboss2Geronimo(Element jbossRootElement) {
-        Document geronimoDocument = XMLConversionHelper.createNewGeronimoDocument(
-                Constants.NAMESPACE_ENV, "module", Constants.SECURITY_RESOURCE_TOOL, "", "");
-        Document geronimoNewDocument = createGBeanElement(jbossRootElement, geronimoDocument);
-        return geronimoNewDocument;
-    }
-
-    /**
-     * Create the GBeanElement by refering the jboss side elamanets
-     * 
-     * @param jbossRootElement
-     * @param geronimoDocument
-     * @return geronimo security plan which contains the GBean Element
-     */
-    private Document createGBeanElement(Element jbossRootElement, Document geronimoDocument) {
-        Namespace rootNamespace = geronimoDocument.getRootElement().getNamespace();
-        Element gbeanElement = DocumentHelper.createElement(new QName("gbean", rootNamespace));
-        gbeanElement.add(DocumentHelper.createAttribute(gbeanElement, "name", "SecurityRealm"));
-        gbeanElement.add(DocumentHelper.createAttribute(gbeanElement, "class",
-                "org.apache.geronimo.security.realm.GenericSecurityRealm"));
-        Element attributeElement = DocumentHelper.createElement(new QName("attribute",
-                rootNamespace));
-        attributeElement.add(DocumentHelper.createAttribute(gbeanElement, "name", "realmName"));
-        attributeElement.addText("SecurityRealm");
-        gbeanElement.add(createReferenceElement("ServerInfo", "ServerInfo", rootNamespace));
-        gbeanElement.add(createReferenceElement("LoginService", "JaasLoginService", rootNamespace));
-        Element xml_referenceElement = DocumentHelper.createElement(new QName("xml-reference",
-                rootNamespace));
-        xml_referenceElement.add(DocumentHelper.createAttribute(xml_referenceElement, "name",
-                "LoginModuleConfiguration"));
-        Element loginConfigElement = createLoginConfigElement();
-        Element newLoginConfigElement = createLoginModulesByReferingJbossDocument(
-                loginConfigElement, jbossRootElement);
-        xml_referenceElement.add(newLoginConfigElement);
-        gbeanElement.add(xml_referenceElement);
-        geronimoDocument.getRootElement().add(gbeanElement);
-        return geronimoDocument;
-    }
-
-    /**
-     * create the reference element
-     * 
-     * @param name
-     * @param contain
-     * @param rootNamespace
-     * @return return the reference element
-     */
-    private Element createReferenceElement(String name, String contain, Namespace rootNamespace) {
-        Element referenceElement = DocumentHelper.createElement(new QName("reference",
-                rootNamespace));
-        referenceElement.add(DocumentHelper.createAttribute(referenceElement, "name", name));
-        Element nameElement = DocumentHelper.createElement(new QName("name", rootNamespace));
-        nameElement.addText(contain);
-        referenceElement.add(nameElement);
-        return referenceElement;
-
-    }
-
-    /**
-     * create the login config elament
-     * 
-     * @return login config element
-     */
-    private Element createLoginConfigElement() {
-        Namespace loginNamespace = new Namespace("log", Constants.NAMESPACE_GERONIMO_LOGGIN);
-        Element login_configElement = DocumentHelper.createElement(new QName("login-config",
-                loginNamespace));
-        return login_configElement;
-    }
-
-    /**
-     * create the login module by referencing the jboss document
-     * 
-     * @param loginConfigElement
-     * @param jbossRootElement
-     * @return the login module
-     */
-    private Element createLoginModulesByReferingJbossDocument(Element loginConfigElement,
-            Element jbossRootElement) {
-        String login_domain_name = null;
-        String control_flag = null;
-        String login_module_class = null;
-        Element login_moduleElement = null;
-        Iterator elementIterator = jbossRootElement.elementIterator();
-        while (elementIterator.hasNext()) {
-            Element itElement = (Element) elementIterator.next();
-            if (itElement.getName().equals("application-policy")) {
-                out.info("Starting Module Migration");
-                if (validateSecurityPolicy(itElement)) {
-                    login_domain_name = obtainLoginDomainName(itElement);
-                    if (XMLConversionHelper.containSubElement(itElement, "authentication")) {
-                        Element authenticationElement = XMLConversionHelper.obtainSubElement(
-                                itElement, "authentication");
-                        if (XMLConversionHelper.containSubElement(authenticationElement,
-                                "login-module")) {
-                            login_moduleElement = XMLConversionHelper.obtainSubElement(
-                                    authenticationElement, "login-module");
-                            control_flag = obtainControlFlagFromLoginModuleElement(login_moduleElement);
-                            login_module_class = obtainLoginModuleClassFromLoginModuleElement(login_moduleElement);
-                        }
-                    }
-                    Element geronimo_login_moduleElement = createLoginModuleElementbyReferingJbossApplicationPolicyElement(
-                            login_moduleElement, loginConfigElement, control_flag,
-                            login_domain_name, login_module_class);
-                    loginConfigElement.add(geronimo_login_moduleElement);
-                    out.info("Finishing Module Migration");
-                } else {
-                    out.error("The security resource conversion tool does not support module functionality");
-                    out.info("Finishing Module Migration");
-                }
-            }
-        }
-        return loginConfigElement;
-    }
-
-    /**
-     * return the login module class from the login module element
-     * 
-     * @param login_moduleElement
-     * @return String version of the login module class
-     */
-    private String obtainLoginModuleClassFromLoginModuleElement(Element login_moduleElement) {
-        String login_module_class = null;
-        Iterator attribIterator = login_moduleElement.attributeIterator();
-        while (attribIterator.hasNext()) {
-            Attribute itAttribute = (Attribute) attribIterator.next();
-            if (itAttribute.getName().equals("code")) {
-                login_module_class = itAttribute.getText();
-                if (login_module_class.equals(Constants.JBOSS_LOGIN_MODULE_IDELTITY)) {
-                    return Constants.GERONIMO_LOGIN_MODULE_IDELTITY;
-                } else if (login_module_class.equals(Constants.JBOSS_LOGIN_MODULE_LDAP)) {
-                    return Constants.GERONIMO_LOGIN_MODULE_LDAP;
-                } else if (login_module_class.equals(Constants.JBOSS_LOGIN_MODULE_DATABASE_SERVER)) {
-                    return Constants.GERONIMO_LOGIN_MODULE_DATABASE_SERVER;
-                } else if (login_module_class.equals(Constants.JBOSS_LOGIN_MODULE_USERS_ROLES)) {
-                    return Constants.GERONIMO_LOGIN_MODULE_USERS_ROLES;
-                }
-            }
-        }
-        return login_module_class;
-    }
-
-    /**
-     * obtain the login domain name from the element
-     * 
-     * @param application_policyElement
-     * @return String version of the login domain name
-     */
-    private String obtainLoginDomainName(Element application_policyElement) {
-        String login_domain_name = null;
-        Iterator attribIterator = application_policyElement.attributeIterator();
-        while (attribIterator.hasNext()) {
-            Attribute itAttribute = (Attribute) attribIterator.next();
-            if (itAttribute.getName().equals("name")) {
-                login_domain_name = itAttribute.getText();
-            }
-        }
-        return login_domain_name;
-    }
-
-    /**
-     * creates the mudule elements by referencing the jboss side apllication
-     * policy elamentsS
-     * 
-     * @param jbossLoginModuleElement
-     * @param geronimoLoginConfigElement
-     * @param control_flag
-     * @param login_domain_name
-     * @param login_module_class
-     * @return login module element
-     */
-    private Element createLoginModuleElementbyReferingJbossApplicationPolicyElement(
-            Element jbossLoginModuleElement, Element geronimoLoginConfigElement,
-            String control_flag, String login_domain_name, String login_module_class) {
-        Element login_moduleElement = DocumentHelper.createElement(new QName("login-module",
-                geronimoLoginConfigElement.getNamespace()));
-        login_moduleElement.add(DocumentHelper.createAttribute(login_moduleElement, "control-flag",
-                control_flag.toUpperCase()));
-        // Adding this defaults
-        login_moduleElement.add(DocumentHelper.createAttribute(login_moduleElement, "server-side",
-                "true"));
-        login_moduleElement.add(DocumentHelper.createAttribute(login_moduleElement,
-                "wrap-principals", "false"));
-        login_moduleElement.add(XMLConversionHelper.createSibling("login-domain-name",
-                login_domain_name, geronimoLoginConfigElement.getNamespace()));
-        login_moduleElement.add(XMLConversionHelper.createSibling("login-module-class",
-                login_module_class, geronimoLoginConfigElement.getNamespace()));
-        if (XMLConversionHelper.containSubElement(jbossLoginModuleElement, "module-option")) {
-            login_moduleElement = addAppropriateOptionToAppropriateLoginModule(
-                    jbossLoginModuleElement, login_moduleElement, login_module_class);
-        }
-        return login_moduleElement;
-    }
-
-    /**
-     * adding the appropriate options for the appropriate login modules
-     * 
-     * @param jbossLoginModuleElement
-     * @param geronimoLoginmoduleElement
-     * @param login_module_class
-     * @return returns the login module
-     */
-    private Element addAppropriateOptionToAppropriateLoginModule(Element jbossLoginModuleElement,
-            Element geronimoLoginmoduleElement, String login_module_class) {
-        String option_value = null;
-        String option_attrib_name_value = null;
-        Element[] extraOptionsElement = new Element[4];
-        int countIterations = 0;
-        Iterator elementIterator = jbossLoginModuleElement.elementIterator();
-        while (elementIterator.hasNext()) {
-            Element itElement = (Element) elementIterator.next();
-            if (itElement.getName().equals("module-option")) {
-                option_value = itElement.getText();
-                Iterator attribIterator = itElement.attributeIterator();
-                while (attribIterator.hasNext()) {
-                    Attribute itAttribute = (Attribute) attribIterator.next();
-                    if (itAttribute.getName().equals("name")) {
-                        option_attrib_name_value = itAttribute.getText();
-                    }
-                }
-                Element optionElement = null;
-                if (login_module_class.equals(Constants.GERONIMO_LOGIN_MODULE_DATABASE_SERVER)) {
-                    if (option_attrib_name_value.equals("principalsQuery")) {
-                        option_attrib_name_value = "userSelect";
-                    }
-                    if (option_attrib_name_value.equals("rolesQuery")) {
-                        option_attrib_name_value = "groupSelect";
-                    }
-                    if (option_attrib_name_value.equals("dsJndiName")) {
-                        option_attrib_name_value = "dataSourceName";
-                        // This is to be modified to the algorithm that
-                        // cuts only the last tocken
-                        option_value = option_value.substring(option_value.indexOf(File.separator) + 1,
-                                option_value.length());
-                    }
-                    if (!(option_attrib_name_value.equals("unauthenticatedIdentity"))) {
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                }
-                // No Need , because of no Geronimo side support
-                // else if
-                // (login_module_class.equals(Constants.GERONIMO_LOGIN_MODULE_IDELTITY)){
-                // optionElement =
-                // XMLConversionHelper.createSiblingWithAttrib("option",
-                // option_value, "name", option_attrib_name_value,
-                // geronimoLoginmoduleElement.getNamespace());
-                // }
-                else if (login_module_class.equals(Constants.GERONIMO_LOGIN_MODULE_LDAP)) {
-
-                    if (option_attrib_name_value.equals("java.naming.factory.initial")) {
-                        option_attrib_name_value = "initialContextFactory";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("java.naming.provider.url")) {
-                        String connectionURLString = "ldap://localhost:";
-                        if (XMLConversionHelper.containSubElementWithAttribute(
-                                jbossLoginModuleElement, "module-option", "name",
-                                "java.naming.security.protocol")) {
-                            Element securityProtocolElement = XMLConversionHelper
-                                    .obtainSubElementWithAttribute(jbossLoginModuleElement,
-                                            "module-option", "name",
-                                            "java.naming.security.protocol");
-                            String securityProtocolElementString = securityProtocolElement
-                                    .getText();
-                            if (securityProtocolElementString.equals("ssl")) {
-                                connectionURLString += "636";
-                            } else {
-                                connectionURLString += "389";
-                            }
-                        }
-                        option_attrib_name_value = "connectionURL";
-                        option_value = connectionURLString;
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("java.naming.security.protocol")) {
-                        option_attrib_name_value = "connectionProtocol";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("java.naming.security.authentication")) {
-                        option_attrib_name_value = "authentication";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("roleAttributeID")) {
-                        option_attrib_name_value = "roleName";
-                        option_value = "roles";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("java.naming.security.protocol")) {
-                        option_attrib_name_value = "connectionProtocol";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("principalDNPrefix")) {
-                        if (XMLConversionHelper.containSubElementWithAttribute(
-                                jbossLoginModuleElement, "module-option", "name",
-                                "principalDNSuffix")) {
-                            Element principalDNSuffixElement = XMLConversionHelper
-                                    .obtainSubElementWithAttribute(jbossLoginModuleElement,
-                                            "module-option", "name", "principalDNSuffix");
-                            String principalDNSuffixElementString = principalDNSuffixElement
-                                    .getText();
-                            if (principalDNSuffixElementString != null) {
-                                // option_value+=principalDNSuffixElementString.substring(0,
-                                // principalDNSuffixElementString.indexOf(","));
-                                option_value += "{0}" + principalDNSuffixElementString;
-                            } else {
-                                option_value += "{0}";
-                            }
-                        }
-                        option_attrib_name_value = "userSearchMatching";
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    if (option_attrib_name_value.equals("rolesCtxDN")) {
-                        option_attrib_name_value = "roleSearchMatching";
-                        if (XMLConversionHelper.containSubElementWithAttribute(
-                                jbossLoginModuleElement, "module-option", "name", "matchOnUserDN")) {
-                            Element matchOnUserDNElement = XMLConversionHelper
-                                    .obtainSubElementWithAttribute(jbossLoginModuleElement,
-                                            "module-option", "name", "matchOnUserDN");
-                            String matchOnUserDNString = matchOnUserDNElement.getText();
-                            if (XMLConversionHelper.containSubElementWithAttribute(
-                                    jbossLoginModuleElement, "module-option", "name",
-                                    "matchOnUserDN")) {
-                                Element uidAttributeIDElement = XMLConversionHelper
-                                        .obtainSubElementWithAttribute(jbossLoginModuleElement,
-                                                "module-option", "name", "uidAttributeID");
-                                String uidAttributeIDString = uidAttributeIDElement.getText();
-                                // String first_part_of_option_value =
-                                // option_value.substring(0,
-                                // option_value.indexOf(","));
-                                // String secoend_part_of_option_value =
-                                // first_part_of_option_value.substring(0,
-                                // option_value.indexOf(","));
-                                String first_part_of_option_value = "{0}";
-                                String secoend_part_of_option_value = "{1}";
-                                option_value = option_value
-                                        + "???("
-                                        + uidAttributeIDString
-                                        + "="
-                                        + (matchOnUserDNString.equals("true") ? first_part_of_option_value
-                                                : secoend_part_of_option_value) + ")";
-                            }
-                        }
-                        optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                                option_value, "name", option_attrib_name_value,
-                                geronimoLoginmoduleElement.getNamespace());
-                    }
-                    extraOptionsElement[0] = XMLConversionHelper.createSiblingWithAttrib("option",
-                            "", "name", "userBase", geronimoLoginmoduleElement.getNamespace());
-                    extraOptionsElement[1] = XMLConversionHelper.createSiblingWithAttrib("option",
-                            "", "name", "roleBase", geronimoLoginmoduleElement.getNamespace());
-                    extraOptionsElement[2] = XMLConversionHelper.createSiblingWithAttrib("option",
-                            "true", "name", "userSearchSubtree", geronimoLoginmoduleElement
-                                    .getNamespace());
-                    extraOptionsElement[3] = XMLConversionHelper.createSiblingWithAttrib("option",
-                            "true", "name", "roleSearchSubtree", geronimoLoginmoduleElement
-                                    .getNamespace());
-                } else if (login_module_class.equals(Constants.GERONIMO_LOGIN_MODULE_USERS_ROLES)) {
-                    if (option_attrib_name_value.equals("usersProperties")) {
-                        option_attrib_name_value = "usersURI";
-                        option_value = Constants.USER_PROPERTIES_FILE_PATH;
-                        out
-                           .info("Sesurity Resources Tool Assumes user properties are in location =>"
-                                    + Constants.USER_PROPERTIES_FILE_PATH);
-                    }
-                    if (option_attrib_name_value.equals("rolesProperties")) {
-                        option_attrib_name_value = "groupsURI";
-                        option_value = Constants.GROUP_PROPERTIES_FILE_PATH;
-                        out
-                           .info("Sesurity Resources Tool Assumes groups properties are in location =>"
-                                    + Constants.GROUP_PROPERTIES_FILE_PATH);
-                    }
-                    optionElement = XMLConversionHelper.createSiblingWithAttrib("option",
-                            option_value, "name", option_attrib_name_value,
-                            geronimoLoginmoduleElement.getNamespace());
-                }
-                if (optionElement != null)
-                    geronimoLoginmoduleElement.add(optionElement);
-                if (countIterations == 0) {
-                    for (int i = 0; i < extraOptionsElement.length; i++) {
-                        if (extraOptionsElement[i] != null)
-                            geronimoLoginmoduleElement.add(extraOptionsElement[i]);
-                    }
-                }
-                countIterations += 1;
-            }
-        }
-        return geronimoLoginmoduleElement;
-    }
-
-    /**
-     * validate the wether the jeronimo side policy is a valid policy
-     * 
-     * @param application_policyElement
-     * @return boolean status of the check
-     */
-    private boolean validateSecurityPolicy(Element application_policyElement) {
-        String jbossLoginModule = null;
-        if (XMLConversionHelper.containSubElement(application_policyElement, "authentication")) {
-            Element authenticationElement = XMLConversionHelper.obtainSubElement(
-                    application_policyElement, "authentication");
-            if (XMLConversionHelper.containSubElement(authenticationElement, "login-module")) {
-                Element login_moduleElement = XMLConversionHelper.obtainSubElement(
-                        authenticationElement, "login-module");
-                Iterator attribIterator = login_moduleElement.attributeIterator();
-                while (attribIterator.hasNext()) {
-                    Attribute itAttribute = (Attribute) attribIterator.next();
-                    if (itAttribute.getName().equals("code")) {
-                        jbossLoginModule = itAttribute.getText();
-                        boolean return_value = validateJbossLoginModule(jbossLoginModule);
-                        return return_value;
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-    /**
-     * obtain the control flag from the login module element
-     * 
-     * @param login_moduleElement
-     * @return String version of the control flag
-     */
-    private String obtainControlFlagFromLoginModuleElement(Element login_moduleElement) {
-        String control_flag = null;
-        Iterator attribIterator = login_moduleElement.attributeIterator();
-        while (attribIterator.hasNext()) {
-            Attribute itAttribute = (Attribute) attribIterator.next();
-            if (itAttribute.getName().equals("flag")) {
-                control_flag = itAttribute.getText();
-                return control_flag;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * validate the jboss security modules wethere these are acceptable for the
-     * geronimo side
-     * 
-     * @param jbossLoginModule
-     * @return boolean status of the validation
-     */
-    private boolean validateJbossLoginModule(String jbossLoginModule) {
-        boolean status = false;
-        logger.debug("Jboss login module class name => " + jbossLoginModule);
-        if (jbossLoginModule.equals(Constants.JBOSS_LOGIN_MODULE_DATABASE_SERVER)) {
-            status = true;
-        } else if (jbossLoginModule.equals(Constants.JBOSS_LOGIN_MODULE_LDAP)) {
-            status =  true;
-        } else if (jbossLoginModule.equals(Constants.JBOSS_LOGIN_MODULE_USERS_ROLES)) {
-            status =  true;
-        }else {
-            out.error("The security resource conversion tool does not support "+
-                       jbossLoginModule+" module functionality");
-        }
-        return status;
-    }
-
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/geronimo-secutiry-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/geronimo-secutiry-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/geronimo-secutiry-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/geronimo-secutiry-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,120 +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. -->
- <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-    <environment>
-        <moduleId>
-            <groupId>console</groupId>
-            <artifactId>realm-SecurityRealm</artifactId>
-            <version>1.0</version>
-            <type>car</type>
-        </moduleId>
-        <dependencies>
-            <dependency>
-                <groupId>geronimo</groupId>
-                <artifactId>j2ee-security</artifactId>
-                <type>car</type>
-            </dependency>
-        </dependencies>
-    </environment>
-    <gbean name="SecurityRealm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
-        <attribute name="realmName">SecurityRealm</attribute>
-        <reference name="ServerInfo">
-            <name>ServerInfo</name>
-        </reference>
-        <reference name="LoginService">
-            <name>JaasLoginService</name>
-        </reference>
-        <xml-reference name="LoginModuleConfiguration">
-            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
-                <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>SecurityRealm</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.LDAPLoginModule</log:login-module-class>
-                    <log:option name="roleSearchMatching">test</log:option>
-                    <log:option name="roleName">test</log:option>
-                    <log:option name="userSearchSubtree">test</log:option>
-                    <log:option name="roleBase">test</log:option>
-                    <log:option name="userRoleName">test</log:option>
-                    <log:option name="authentication">simple</log:option>
-                    <log:option name="connectionUsername">testname</log:option>
-                    <log:option name="connectionURL">ldap://localhost:1389</log:option>
-                    <log:option name="userBase">test</log:option>
-                    <log:option name="initialContextFactory">test</log:option>
-                    <log:option name="roleSearchSubtree">test</log:option>
-                    <log:option name="connectionPassword">testpwd</log:option>
-                    <log:option name="userSearchMatching">test</log:option>
-                </log:login-module>
-                <log:login-module control-flag="OPTIONAL" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>SecurityRealm-Password</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.GeronimoPasswordCredentialLoginModule</log:login-module-class>
-                </log:login-module>
-                <log:login-module control-flag="OPTIONAL" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>SecurityRealm-Audit</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.FileAuditLoginModule</log:login-module-class>
-                    <log:option name="file">~/tmp/test.log</log:option>
-                </log:login-module>
-                <log:login-module control-flag="REQUISITE" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>SecurityRealm-Lockout</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.RepeatedFailureLockoutLoginModule</log:login-module-class>
-                    <log:option name="lockoutDurationSecs">80</log:option>
-                    <log:option name="failurePeriodSecs">80</log:option>
-                    <log:option name="failureCount">80</log:option>
-                </log:login-module>
-				<!-- test -->
-				   <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>geronimo-properties-realm</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
-                    <log:option name="usersURI">var/security/users.properties</log:option>
-                    <log:option name="groupsURI">var/security/groups.properties</log:option>
-                </log:login-module>
-				<!-- database-->
-				 <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>TestDBSR</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
-                    <log:option name="userSelect">user select sql</log:option>
-                    <log:option name="jdbcDriver">com.mysql.jdbc.Driver</log:option>
-                    <log:option name="jdbcUser">jdbc user name</log:option>
-                    <log:option name="groupSelect">group select sql</log:option>
-                    <log:option name="jdbcPassword">jdbc user name</log:option>
-                    <log:option name="jdbcURL">jdbc url</log:option>
-				</log:login-module>
-				<!-- LDAP -->
-					<log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>NameLdapSR</log:login-domain-name>
-                    <log:login-module-class>org.apache.geronimo.security.realm.providers.LDAPLoginModule</log:login-module-class>
-                    <log:option name="connectionProtocol">protocol</log:option>
-                    <log:option name="roleSearchMatching">RoleUserSearchiString</log:option>
-                    <log:option name="roleName">RoleName</log:option>
-                    <log:option name="userSearchSubtree">uesrsSearchSubTree</log:option>
-                    <log:option name="roleBase">RoleBase</log:option>
-                    <log:option name="userRoleName">UserRoleSearch</log:option>
-                    <log:option name="connectionUsername">usename</log:option>
-                    <log:option name="connectionURL">ConnectionURL</log:option>
-                    <log:option name="userBase">userbase</log:option>
-                    <log:option name="initialContextFactory">InitialContextFactory</log:option>
-                    <log:option name="roleSearchSubtree">RoleSearch</log:option>
-                    <log:option name="connectionPassword">passeotd</log:option>
-                    <log:option name="userSearchMatching">userSearchMatching</log:option>
-                </log:login-module>
-				<!-- Other -->
-				<log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-                    <log:login-domain-name>NameSR</log:login-domain-name>
-                    <log:login-module-class>org.geronimo.test</log:login-module-class>
-                </log:login-module>
-					 
-            </log:login-config>
-        </xml-reference>
-    </gbean>
-</module>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/login-config.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/login-config.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/login-config.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/login-config.xml Thu Jun 28 07:14:50 2007
@@ -204,3 +204,209 @@
 
 </policy>
 
+<?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 policy PUBLIC
+      "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+      "http://www.jboss.org/j2ee/dtd/security_config.dtd" -->
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+  <authentication>
+    <login-module code="login.module1.class.name" flag="control_flag">
+      <module-option name = "option1-name">option1-value</module-option>
+      <module-option name = "option2-name">option2-value</module-option>
+      ...
+    </login-module>
+
+    <login-module code="login.module2.class.name" flag="control_flag">
+      ...
+    </login-module>
+    ...
+  </authentication>
+</application-policy>
+
+$Revision$
+-->
+
+<policy>
+    <!-- Used by clients within the application server VM such as
+    mbeans and servlets that access EJBs.
+    -->
+    <application-policy name = "client-login">
+       <authentication>
+          <login-module code = "org.jboss.security.ClientLoginModule"
+             flag = "required">
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <!-- Security domain for JBossMQ -->
+    <application-policy name = "jbossmq">
+       <authentication>
+          <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
+             flag = "required">
+             <module-option name = "unauthenticatedIdentity">guest</module-option>
+             <module-option name = "dsJndiName">java:/DefaultDS/Test</module-option>
+             <module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
+             <module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <!-- Security domain for JBossMQ when using file-state-service.xml
+    <application-policy name = "jbossmq">
+       <authentication>
+          <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
+             flag = "required">
+             <module-option name = "unauthenticatedIdentity">guest</module-option>
+             <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+    -->
+
+    <!-- Security domains for testing new jca framework -->
+    <application-policy name = "HsqlDbRealm">
+       <authentication>
+          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
+             flag = "required">
+             <module-option name = "principal">sa</module-option>
+             <module-option name = "userName">sa</module-option>
+             <module-option name = "password"></module-option>
+             <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <application-policy name = "JmsXARealm">
+       <authentication>
+          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
+             flag = "required">
+             <module-option name = "principal">guest</module-option>
+             <module-option name = "userName">guest</module-option>
+             <module-option name = "password">guest</module-option>
+             <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <!-- A template configuration for the jmx-console web application. This
+      defaults to the UsersRolesLoginModule the same as other and should be
+      changed to a stronger authentication mechanism as required.
+    -->
+    <application-policy name = "jmx-console">
+       <authentication>
+          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+             flag = "required">
+           <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+           <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <!-- A template configuration for the web-console web application. This
+      defaults to the UsersRolesLoginModule the same as other and should be
+      changed to a stronger authentication mechanism as required.
+    -->
+    <application-policy name = "web-console">
+       <authentication>
+          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+             flag = "required">
+             <module-option name="usersProperties">web-console-users.properties</module-option>
+             <module-option name="rolesProperties">web-console-roles.properties</module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+    <!-- A template configuration for the JBossWS web application (and transport layer!).
+      This defaults to the UsersRolesLoginModule the same as other and should be
+      changed to a stronger authentication mechanism as required.
+    -->
+    <application-policy name="JBossWS">
+      <authentication>
+        <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+          flag="required">
+          <module-option name="unauthenticatedIdentity">anonymous</module-option>
+        </login-module>
+      </authentication>
+    </application-policy>
+
+    <!-- The default login configuration used by any security domain that
+    does not have a application-policy entry with a matching name
+    -->
+    <application-policy name = "other">
+       <!-- A simple server login module, which can be used when the number 
+       of users is relatively small. It uses two properties files:
+       users.properties, which holds users (key) and their password (value).
+       roles.properties, which holds users (key) and a comma-separated list of
+       their roles (value).
+       The unauthenticatedIdentity property defines the name of the principal
+       that will be used when a null username and password are presented as is
+       the case for an unuathenticated web client or MDB. If you want to
+       allow such users to be authenticated add the property, e.g.,
+       unauthenticatedIdentity="nobody"
+       -->
+       <authentication>
+          <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+             flag = "required" />
+       </authentication>
+    </application-policy>
+	
+	    <!-- This is the test 1 LDAP JBoss Configuration    -->
+	    <application-policy name="testLDAP1"> 
+        <authentication>
+         <login-module code="org.jboss.security.auth.spi.LdapLoginModule" flag="required">
+                <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
+                <module-option name="java.naming.provider.url">ldap://ldaphost.jboss.org:1389/</module-option>
+                <module-option name="java.naming.security.protocol">ssl</module-option>
+                <module-option name="java.naming.security.authentication">simple</module-option>
+                <module-option name="principalDNPrefix">uid=</module-option>                    
+                <module-option name="principalDNSuffix">test=test,ou=People,dc=jboss,dc=org</module-option>
+                <module-option name="rolesCtxDN">ou=Roles,dc=jboss,dc=org</module-option>
+                <module-option name="uidAttributeID">member</module-option>
+                <module-option name="matchOnUserDN">true</module-option>
+                <module-option name="roleAttributeID">cn</module-option>
+                <module-option name="roleAttributeIsDN">false </module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+	
+		    <!-- This is the test 2 LDAP JBoss Configuration    -->
+	    <application-policy name="testLDAP2"> 
+        <authentication>
+         <login-module code="org.jboss.security.auth.spi.LdapLoginModule" flag="required">
+                <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
+                <module-option name="java.naming.provider.url">ldap://ldaphost.jboss.org:1389/</module-option>
+                <module-option name="java.naming.security.protocol">tcp</module-option>
+                <module-option name="java.naming.security.authentication">simple</module-option>
+                <module-option name="principalDNPrefix">uid=</module-option>                    
+                <module-option name="principalDNSuffix">,ou=People,dc=jboss,dc=org</module-option>
+                <module-option name="rolesCtxDN">ou=Roles,dc=jboss,dc=org</module-option>
+                <module-option name="uidAttributeID">member</module-option>
+                <module-option name="matchOnUserDN">true</module-option>
+                <module-option name="roleAttributeID">cn</module-option>
+                <module-option name="roleAttributeIsDN">false </module-option>
+          </login-module>
+       </authentication>
+    </application-policy>
+
+</policy>
+

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/security-geronimo-plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/security-geronimo-plan.xml?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/security-geronimo-plan.xml (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test-apps/security/security-geronimo-plan.xml Thu Jun 28 07:14:50 2007
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-  <environment>
-    <moduleId>
-      <groupId>j2g</groupId>
-      <artifactId>security</artifactId>
-      <version>1.0</version>
-      <type>rar</type>
-    </moduleId>
-    <dependencies>
-      <dependency>
-        <groupId>geronimo</groupId>
-        <artifactId>j2ee-security</artifactId>
-        <type>car</type>
-      </dependency>
-    </dependencies>
-  </environment>
-  <gbean name="SecurityRealm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
-    <reference name="ServerInfo">
-      <name>ServerInfo</name>
-    </reference>
-    <reference name="LoginService">
-      <name>JaasLoginService</name>
-    </reference>
-    <xml-reference name="LoginModuleConfiguration">
-      <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>jbossmq</log:login-domain-name>
-          <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
-          <log:option name="dataSourceName">DefaultDS/Test</log:option>
-          <log:option name="userSelect">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</log:option>
-          <log:option name="groupSelect">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</log:option>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>jmx-console</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
-          <log:option name="usersURI">var/security/user.properties</log:option>
-          <log:option name="groupsURI">var/security/user.properties</log:option>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>web-console</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
-          <log:option name="usersURI">var/security/user.properties</log:option>
-          <log:option name="groupsURI">var/security/user.properties</log:option>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>JBossWS</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
-          <log:option name="unauthenticatedIdentity">anonymous</log:option>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>other</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.PropertiesFileLoginModule</log:login-module-class>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>testLDAP1</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.LDAPLoginModule</log:login-module-class>
-          <log:option name="initialContextFactory">com.sun.jndi.ldap.LdapCtxFactory</log:option>
-          <log:option name="userBase"></log:option>
-          <log:option name="roleBase"></log:option>
-          <log:option name="userSearchSubtree">true</log:option>
-          <log:option name="roleSearchSubtree">true</log:option>
-          <log:option name="connectionURL">ldap://localhost:636</log:option>
-          <log:option name="connectionProtocol">ssl</log:option>
-          <log:option name="authentication">simple</log:option>
-          <log:option name="userSearchMatching">uid={0}test=test,ou=People,dc=jboss,dc=org</log:option>
-          <log:option name="roleSearchMatching">ou=Roles,dc=jboss,dc=org???(member={0})</log:option>
-          <log:option name="roleName">roles</log:option>
-        </log:login-module>
-        <log:login-module control-flag="REQUIRED" server-side="true" wrap-principals="false">
-          <log:login-domain-name>testLDAP2</log:login-domain-name>
-          <log:login-module-class>org.apche.geronimo.security.realm.providers.LDAPLoginModule</log:login-module-class>
-          <log:option name="initialContextFactory">com.sun.jndi.ldap.LdapCtxFactory</log:option>
-          <log:option name="userBase"></log:option>
-          <log:option name="roleBase"></log:option>
-          <log:option name="userSearchSubtree">true</log:option>
-          <log:option name="roleSearchSubtree">true</log:option>
-          <log:option name="connectionURL">ldap://localhost:389</log:option>
-          <log:option name="connectionProtocol">tcp</log:option>
-          <log:option name="authentication">simple</log:option>
-          <log:option name="userSearchMatching">uid={0},ou=People,dc=jboss,dc=org</log:option>
-          <log:option name="roleSearchMatching">ou=Roles,dc=jboss,dc=org???(member={0})</log:option>
-          <log:option name="roleName">roles</log:option>
-        </log:login-module>
-      </log:login-config>
-    </xml-reference>
-  </gbean>
-</module>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test/org/apache/geronimo/j2g/resources/security/test/SecurityResouresToolTestCase.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test/org/apache/geronimo/j2g/resources/security/test/SecurityResouresToolTestCase.java?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test/org/apache/geronimo/j2g/resources/security/test/SecurityResouresToolTestCase.java (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources.security/test/org/apache/geronimo/j2g/resources/security/test/SecurityResouresToolTestCase.java Thu Jun 28 07:14:50 2007
@@ -1,45 +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.resources.security.test;
-
-import java.io.File;
-
-import junit.framework.TestCase;
-
-import org.apache.geronimo.j2g.resources.ResourcesTool;
-import org.apache.geronimo.j2g.resources.security.SecurityResourcesTool;
-
-/**
- * Test Case for the SecurityResouresTool
- */
-public class SecurityResouresToolTestCase extends TestCase {
-
-    @Override //the setup method 
-    protected void setUp() throws Exception {
-        // To set the IOutput intialize the ResourcesTool
-        ResourcesTool  resTool = new ResourcesTool();
-        super.setUp();
-    }
-    
-    // Test for login-config.xml file loading
-    public void testSecurityResourcesFileMigration_file() {
-        File file = new File("test-apps/security/login-config.xml");
-        SecurityResourcesTool securityResourcesTool = new SecurityResourcesTool();
-        boolean result = securityResourcesTool.migrate(file);
-        assertTrue(result);
-    }
-}

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.classpath
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.classpath?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.classpath (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.classpath Thu Jun 28 07:14:50 2007
@@ -1,7 +1,8 @@
-<?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>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="test"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="/org.apache.geronimo.j2g.common"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.project
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.project?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.project (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/.project Thu Jun 28 07:14:50 2007
@@ -1,28 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.apache.geronimo.j2g.resources</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.resources</name>
+  <comment>JBoss to Geronimo Conversion Tool</comment>
+  <projects>
+    <project>org.apache.geronimo.j2g.common</project>
+  </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.resources/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/META-INF/MANIFEST.MF?view=diff&rev=551566&r1=551565&r2=551566
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/META-INF/MANIFEST.MF (original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.resources/META-INF/MANIFEST.MF Thu Jun 28 07:14:50 2007
@@ -6,5 +6,6 @@
 Bundle-Vendor: Apache.org
 Bundle-Localization: plugin
 Require-Bundle: org.apache.geronimo.j2g.common,
+ org.apache.geronimo.j2g.util,
  org.eclipse.core.runtime
-Export-Package: org.apache.geronimo.j2g.resources
+Bundle-ClassPath: .



Mime
View raw message