Skip to content

Commit

Permalink
JAMES-1644 move ImmutableCollectors to util-java8 project
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/james/project/trunk@1719388 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mbaechler committed Dec 11, 2015
1 parent 70c30fa commit 0f64df7
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 8 deletions.
7 changes: 6 additions & 1 deletion backends-common/cassandra/pom.xml
Expand Up @@ -125,7 +125,12 @@
<activation>
<jdk>[1.8,)</jdk>
</activation>
<dependencies>
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
<version>3.0.0-beta5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
Expand Down
Expand Up @@ -22,12 +22,13 @@
import java.util.Arrays;
import java.util.List;

import com.google.common.collect.ImmutableList;
import org.apache.james.backends.cassandra.components.CassandraIndex;
import org.apache.james.backends.cassandra.components.CassandraModule;
import org.apache.james.backends.cassandra.components.CassandraTable;
import org.apache.james.backends.cassandra.components.CassandraType;
import org.apache.james.backends.cassandra.utils.Collectors;
import org.apache.james.util.streams.Collectors;

import com.google.common.collect.ImmutableList;

public class CassandraModuleComposite implements CassandraModule {

Expand Down
Expand Up @@ -23,12 +23,13 @@

import javax.inject.Inject;

import org.apache.james.backends.cassandra.components.CassandraModule;
import org.apache.james.backends.cassandra.components.CassandraType;
import org.apache.james.util.streams.Collectors;

import com.datastax.driver.core.Session;
import com.datastax.driver.core.UserType;
import com.google.common.collect.ImmutableMap;
import org.apache.james.backends.cassandra.components.CassandraModule;
import org.apache.james.backends.cassandra.components.CassandraType;
import org.apache.james.backends.cassandra.utils.Collectors;

public class CassandraTypesProvider {
private final ImmutableMap<String, UserType> userTypes;
Expand Down
5 changes: 5 additions & 0 deletions backends-common/pom.xml
Expand Up @@ -39,6 +39,11 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
<version>3.0.0-beta5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
193 changes: 193 additions & 0 deletions server/container/util-java8/pom.xml
@@ -0,0 +1,193 @@
<?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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>james-server</artifactId>
<groupId>org.apache.james</groupId>
<version>3.0.0-beta5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
<packaging>bundle</packaging>

<name>Apache James :: Server :: Common Utilities :: Java 8</name>

<profiles>
<profile>
<id>disable-build-for-older-jdk</id>
<activation>
<jdk>(,1.8)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
<execution>
<id>jar</id>
<phase>none</phase>
</execution>
<execution>
<id>test-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>default-resources</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testResources</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>attach-descriptor</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-for-jdk-8</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>disable-animal-sniffer</id>
<activation>
<jdk>[1.6,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<executions>
<execution>
<id>check_java_6</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Expand Up @@ -17,7 +17,7 @@
* under the License. *
****************************************************************/

package org.apache.james.backends.cassandra.utils;
package org.apache.james.util.streams;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -45,3 +45,4 @@ public static <T, K, V> Collector<T, ImmutableMap.Builder<K, V>, ImmutableMap<K,
ImmutableMap.Builder::build);
}
}

Expand Up @@ -17,7 +17,7 @@
* under the License. *
****************************************************************/

package org.apache.james.backends.cassandra.utils;
package org.apache.james.util.streams;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.data.MapEntry.entry;
Expand Down Expand Up @@ -87,3 +87,4 @@ public void immutableMapCollectorShouldReturnAppliedImmutableMapWhen3ElementsStr
}

}

6 changes: 6 additions & 0 deletions server/pom.xml
Expand Up @@ -67,6 +67,7 @@
<module>container/mailbox-adapter</module>
<module>container/spring</module>
<module>container/util</module>
<module>container/util-java8</module>

<module>mailet/mailetcontainer-api</module>
<module>mailet/mailetcontainer-camel</module>
Expand Down Expand Up @@ -673,6 +674,11 @@
<artifactId>james-server-mailets</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.james</groupId>
Expand Down
4 changes: 4 additions & 0 deletions server/protocols/jmap/pom.xml
Expand Up @@ -149,6 +149,10 @@
<jdk>[1.8,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-util-java8</artifactId>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-james-mailbox-api</artifactId>
Expand Down

0 comments on commit 0f64df7

Please sign in to comment.