geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r834094 - in /geronimo/javamail/trunk/geronimo-javamail_1.4: geronimo-javamail_1.4_mail/ geronimo-javamail_1.4_provider/ geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/
Date Mon, 09 Nov 2009 15:02:32 GMT
Author: rickmcguire
Date: Mon Nov  9 15:02:30 2009
New Revision: 834094

URL: http://svn.apache.org/viewvc?rev=834094&view=rev
Log:
yet another attempt at getting the OSGi manifest information correct

Modified:
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_mail/pom.xml
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml
    geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/AuthenticatorFactory.java

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_mail/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_mail/pom.xml?rev=834094&r1=834093&r2=834094&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_mail/pom.xml (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_mail/pom.xml Mon Nov
 9 15:02:30 2009
@@ -70,6 +70,13 @@
                                     <artifact>org.apache.geronimo.specs:geronimo-javamail_1.4_spec</artifact>
                                     <excludes>
                                         <exclude>javax/**</exclude>
+                                        <exclude>org/apache/geronimo/mail/**</exclude>
+                                    </excludes>
+                                </filter>
+                                <filter>
+                                    <artifact>org.apache.geronimo.javamail:geronimo-javamail_1.4_provider</artifact>
+                                    <excludes>
+                                        <exclude>org/apache/geronimo/javamail/**</exclude>
                                     </excludes>
                                 </filter>
                             </filters>
@@ -84,8 +91,25 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
-                        <Export-Package>javax.mail*;version=1.4</Export-Package>
-                        <Import-Package>!org.apache.geronimo.mail.util,javax.activation,javax.mail*</Import-Package>
+                        <Private-Package>
+                            org.apache.geronimo.mail.util,
+                            org.apache.geronimo.javamail.util,
+                            org.apache.geronimo.javamail.authentication
+                        </Private-Package>
+                        <Export-Package>
+                            javax.mail*;version=1.4,
+                            org.apache.geronimo.javamail.store*;version=1.4,
+                            org.apache.geronimo.javamail.transport*;version=1.4,
+                            org.apache.geronimo.javamail.handlers;version=1.4
+                        </Export-Package>
+                        <Import-Package>
+                            javax.activation,
+                            javax.mail*,
+                            javax.imageio*;resolution:="optional",
+                            javax.net.ssl*;resolution:="optional",
+                            javax.security.sasl*;resolution:="optional",
+                            javax.security.auth.callback*;resolution:="optional"
+                        </Import-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml?rev=834094&r1=834093&r2=834094&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml (original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/pom.xml Mon
Nov  9 15:02:30 2009
@@ -31,6 +31,7 @@
     </parent>
 
     <artifactId>geronimo-javamail_1.4_provider</artifactId>
+    <packaging>bundle</packaging>
     <name>Geronimo JavaMail 1.4 :: Provider</name>
 
     <dependencies>
@@ -45,7 +46,7 @@
             <artifactId>geronimo-javamail_1.4_spec</artifactId>
             <scope>provided</scope>
         </dependency>
-        
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
@@ -75,4 +76,36 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
+                            org.apache.geronimo.javamail.util,
+                            org.apache.geronimo.javamail.authentication
+                        </Private-Package>
+                        <Export-Package>
+                            org.apache.geronimo.javamail.store*;version=1.4,
+                            org.apache.geronimo.javamail.transport*;version=1.4,
+                        </Export-Package>
+                        <Import-Package>
+                            javax.activation,
+                            javax.mail*,
+                            org.apache.geronimo.mail.util,
+                            org.apache.geronimo.javamail.handlers*;version=1.4
+                            javax.imageio*;resolution:="optional",
+                            javax.net.ssl*;resolution:="optional",
+                            javax.security.sasl*;resolution:="optional",
+                            javax.security.auth.callback*;resolution:="optional"
+                        </Import-Package>
+                    </instructions>
+                    <unpackBundle>true</unpackBundle>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

Modified: geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/AuthenticatorFactory.java
URL: http://svn.apache.org/viewvc/geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/AuthenticatorFactory.java?rev=834094&r1=834093&r2=834094&view=diff
==============================================================================
--- geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/AuthenticatorFactory.java
(original)
+++ geronimo/javamail/trunk/geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/authentication/AuthenticatorFactory.java
Mon Nov  9 15:02:30 2009
@@ -21,50 +21,50 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.geronimo.javamail.util.ProtocolProperties; 
+import org.apache.geronimo.javamail.util.ProtocolProperties;
 
 public class AuthenticatorFactory {
-    // the list of authentication mechanisms we have direct support for.  Others come from

-    // SASL, if it's available. 
-    
+    // the list of authentication mechanisms we have direct support for.  Others come from
+    // SASL, if it's available.
+
     public static final String AUTHENTICATION_PLAIN = "PLAIN";
     public static final String AUTHENTICATION_LOGIN = "LOGIN";
     public static final String AUTHENTICATION_CRAMMD5 = "CRAM-MD5";
     public static final String AUTHENTICATION_DIGESTMD5 = "DIGEST-MD5";
-     
+
     static public ClientAuthenticator getAuthenticator(ProtocolProperties props, List mechanisms,
String host, String username, String password, String authId, String realm)
     {
-        // if the authorization id isn't given, then this is the same as the logged in user
name. 
+        // if the authorization id isn't given, then this is the same as the logged in user
name.
         if (authId == null) {
-            authId = username; 
+            authId = username;
         }
-        
-        // if SASL is enabled, try getting a SASL authenticator first 
+
+        // if SASL is enabled, try getting a SASL authenticator first
         if (props.getBooleanProperty("sasl.enable", false)) {
-            // we need to convert the mechanisms map into an array of strings for SASL. 
-            String [] mechs = (String [])mechanisms.toArray(new String[mechanisms.size()]);

-            
+            // we need to convert the mechanisms map into an array of strings for SASL.
+            String [] mechs = (String [])mechanisms.toArray(new String[mechanisms.size()]);
+
             try {
-                // need to try to load this using reflection since it has references to 
-                // the SASL API.  That's only available with 1.5 or later. 
-                Class authenticatorClass = Class.forName("org.apache.geronimo.javamal.authentication.SASLAuthenticator");

+                // need to try to load this using reflection since it has references to
+                // the SASL API.  That's only available with 1.5 or later.
+                Class authenticatorClass = Class.forName("org.apache.geronimo.javamail.authentication.SASLAuthenticator");
                 Constructor c = authenticatorClass.getConstructor(new Class[] {
-                    (new String[0]).getClass(), 
-                    Properties.class, 
-                    String.class, 
-                    String.class, 
-                    String.class, 
-                    String.class, 
-                    String.class, 
+                    (new String[0]).getClass(),
+                    Properties.class,
+                    String.class,
+                    String.class,
+                    String.class,
+                    String.class,
+                    String.class,
                     String.class
-                }); 
-                
+                });
+
                 Object[] args = { mechs, props.getProperties(), props.getProtocol(), host,
realm, authId, username, password };
-                
-                return (ClientAuthenticator)c.newInstance(args); 
+
+                return (ClientAuthenticator)c.newInstance(args);
             } catch (Throwable e) {
-                // Any exception is likely because we're running on 1.4 and can't use the
Sasl API.  
-                // just ignore and use our fallback implementations. 
+                // Any exception is likely because we're running on 1.4 and can't use the
Sasl API.
+                // just ignore and use our fallback implementations.
             }
         }
 
@@ -85,4 +85,4 @@
         }
     }
 }
-     
+



Mime
View raw message