You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2011/06/29 20:06:46 UTC
svn commit: r1141185 - in /james/server/trunk: container-spring/ core/
fetchmail/ fetchmail/src/main/resources/META-INF/
fetchmail/src/main/resources/META-INF/spring/ mailets/ osgi/ osgi/target/
util/
Author: norman
Date: Wed Jun 29 18:06:46 2011
New Revision: 1141185
URL: http://svn.apache.org/viewvc?rev=1141185&view=rev
Log:
More work on to OSGI-fy JAMES. See JAMES-835
Added:
james/server/trunk/fetchmail/src/main/resources/META-INF/
james/server/trunk/fetchmail/src/main/resources/META-INF/spring/
james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-context.xml
james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-osgi.xml
james/server/trunk/osgi/
james/server/trunk/osgi/target/
Modified:
james/server/trunk/container-spring/pom.xml
james/server/trunk/core/pom.xml
james/server/trunk/fetchmail/pom.xml
james/server/trunk/mailets/pom.xml
james/server/trunk/util/pom.xml
Modified: james/server/trunk/container-spring/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/pom.xml?rev=1141185&r1=1141184&r2=1141185&view=diff
==============================================================================
--- james/server/trunk/container-spring/pom.xml (original)
+++ james/server/trunk/container-spring/pom.xml Wed Jun 29 18:06:46 2011
@@ -491,20 +491,44 @@ END Tanuki Software License ============
<dependencies>
<dependency>
- <groupId>commons-daemon</groupId>
- <artifactId>commons-daemon</artifactId>
+ <groupId>org.apache.james</groupId>
+ <artifactId>james-server-lifecycle-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>james-server-cli</artifactId>
+ <artifactId>james-server-filesystem-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>james-server-lifecycle-api</artifactId>
+ <artifactId>james-server-mailetcontainer-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>james-server-filesystem-api</artifactId>
+ <artifactId>james-server-data-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>james-server-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>apache-james-mailbox-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>apache-james-mailbox-tool</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james.protocols</groupId>
+ <artifactId>protocols-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>apache-mailet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-daemon</groupId>
+ <artifactId>commons-daemon</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -523,6 +547,11 @@ END Tanuki Software License ============
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
</dependency>
@@ -531,8 +560,21 @@ END Tanuki Software License ============
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
+ <groupId>${javax.mail.groupId}</groupId>
+ <artifactId>${javax.mail.artifactId}</artifactId>
+ </dependency>
+
+
+ <!-- Runtime dependencies which will get included in the generated binary distribution -->
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>james-server-cli</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -542,28 +584,7 @@ END Tanuki Software License ============
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-mailet</artifactId>
- </dependency>
- <dependency>
- <groupId>${javax.mail.groupId}</groupId>
- <artifactId>${javax.mail.artifactId}</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james.protocols</groupId>
- <artifactId>protocols-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.jcr</groupId>
- <artifactId>jcr</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>james-server-core</artifactId>
- <scope>compile</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
@@ -602,15 +623,6 @@ END Tanuki Software License ============
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>james-server-mailetcontainer-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-mailetcontainer-camel</artifactId>
<scope>runtime</scope>
@@ -634,6 +646,7 @@ END Tanuki Software License ============
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-protocols-library</artifactId>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
@@ -650,11 +663,7 @@ END Tanuki Software License ============
<artifactId>james-server-ldap</artifactId>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>james-server-data-api</artifactId>
- <scope>compile</scope>
- </dependency>
+
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-smtpserver</artifactId>
@@ -729,14 +738,6 @@ END Tanuki Software License ============
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>apache-james-mailbox-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-james-mailbox-tool</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
<artifactId>james-server-file</artifactId>
<scope>runtime</scope>
</dependency>
Modified: james/server/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/core/pom.xml?rev=1141185&r1=1141184&r2=1141185&view=diff
==============================================================================
--- james/server/trunk/core/pom.xml (original)
+++ james/server/trunk/core/pom.xml Wed Jun 29 18:06:46 2011
@@ -30,7 +30,7 @@
<properties>
<!-- OSGI stuff -->
<james.osgi.export>
- org.apache.james.*
+ org.apache.james.core.*
</james.osgi.export>
<james.osgi.import>
*
Modified: james/server/trunk/fetchmail/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/fetchmail/pom.xml?rev=1141185&r1=1141184&r2=1141185&view=diff
==============================================================================
--- james/server/trunk/fetchmail/pom.xml (original)
+++ james/server/trunk/fetchmail/pom.xml Wed Jun 29 18:06:46 2011
@@ -27,6 +27,15 @@
<groupId>org.apache.james</groupId>
<artifactId>james-server-fetchmail</artifactId>
<name>Apache James Server FetchMail</name>
+ <properties>
+ <!-- OSGI stuff -->
+ <james.osgi.export>
+ org.apache.james.fetchmail.*,
+ </james.osgi.export>
+ <james.osgi.import>
+ *
+ </james.osgi.import>
+ </properties>
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
Added: james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-context.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-context.xml?rev=1141185&view=auto
==============================================================================
--- james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-context.xml (added)
+++ james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-context.xml Wed Jun 29 18:06:46 2011
@@ -0,0 +1,33 @@
+<?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. !
+ -->
+
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+ <!-- Import PostBeanProcessors -->
+ <import resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
+
+ <!--
+ ===========================================================================
+ FetchMail
+ ===========================================================================
+ -->
+
+ <bean id="fetchmail" class="org.apache.james.fetchmail.FetchScheduler" />
+</beans>
Added: james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-osgi.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-osgi.xml?rev=1141185&view=auto
==============================================================================
--- james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-osgi.xml (added)
+++ james/server/trunk/fetchmail/src/main/resources/META-INF/spring/fetchmail-osgi.xml Wed Jun 29 18:06:46 2011
@@ -0,0 +1,35 @@
+<?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.
+-->
+<beans:beans
+ xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi-1.2.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+ <osgi:service ref="fetchmail">
+ <osgi:interfaces>
+ <beans:value> org.apache.james.fetchmail.FetchSchedulerMBean</beans:value>
+ </osgi:interfaces>
+ </osgi:service>
+</beans:beans>
Modified: james/server/trunk/mailets/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/mailets/pom.xml?rev=1141185&r1=1141184&r2=1141185&view=diff
==============================================================================
--- james/server/trunk/mailets/pom.xml (original)
+++ james/server/trunk/mailets/pom.xml Wed Jun 29 18:06:46 2011
@@ -28,6 +28,20 @@
<artifactId>james-server-mailets</artifactId>
<name>Apache James Server Mailets</name>
<packaging>jar</packaging>
+ <properties>
+ <!-- OSGI stuff -->
+ <james.osgi.export>
+ org.apache.james.transport.mailets.*,
+ org.apache.james.transport.matchers.*
+ </james.osgi.export>
+ <!-- Exclude JSPF as dnsjnio is not OSGI ready yet -->
+ <!-- TODO: Contribute a patch for this! -->
+ <james.osgi.import>
+ !org.apache.james.jspf.*,
+ *
+ </james.osgi.import>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -58,28 +72,6 @@ Parent pom build failure prevents inheri
<outputDirectory>target/mailetdocs</outputDirectory>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- </execution>
- </executions>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <!-- exclude jspf for now, cause dnsjnio is not osgi ready -->
- <Import-Package>!org.apache.james.jspf.*, *</Import-Package>
- <Export-Package>org.apache.james.transport.mailets.*,org.apache.james.transport.matchers</Export-Package>
- <Embed-Dependency>*;scope=runtime</Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
</plugins>
</build>
Modified: james/server/trunk/util/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/util/pom.xml?rev=1141185&r1=1141184&r2=1141185&view=diff
==============================================================================
--- james/server/trunk/util/pom.xml (original)
+++ james/server/trunk/util/pom.xml Wed Jun 29 18:06:46 2011
@@ -30,7 +30,7 @@
<properties>
<!-- OSGI stuff -->
<james.osgi.export>
- org.apache.james.*
+ org.apache.james.util.*
</james.osgi.export>
<james.osgi.import>
*
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org