JAVA-2154: Create guava-parent module and organize guava modules (#9782)

* JAVA-2154: Removed module, now split into guava-utilities and guava-core

* JAVA-2154: Removed module, articles moved to new module guava-core

* JAVA-2154: Moved module inside guava-modules

* JAVA-2154: Moved module inside guava-modules

* JAVA-2154: Moved module inside guava-modules

* JAVA-2154: Moved module inside guava-modules

* JAVA-2154: Moved 1 article to guava-collections

* JAVA-2154: New module guava-collections-list

* JAVA-2154: New module guava-core

* JAVA-2154: New module guava-utilities

* JAVA-2154: Updated README, removed extra article reference

* JAVA-2154: parent module pom changes

* JAVA-2154: main pom changes - removed guava related modules as they have
been shifted inside guava-modules

* JAVA-2154: rearranged and moved module inside guava-modules folder
This commit is contained in:
Sampada 2020-07-28 17:34:46 +05:30 committed by GitHub
parent 0423536cf4
commit 0cade733ca
100 changed files with 184 additions and 79 deletions

View File

@ -1,7 +0,0 @@
## Guava
This module contains articles a Google Guava
### Relevant Articles:
- [Guava CharMatcher](https://www.baeldung.com/guava-string-charmatcher)

View File

@ -1,8 +1,5 @@
=========
## Guava and Hamcrest Cookbooks and Examples
## Guava 18
### Relevant Articles:
- [Guava Functional Cookbook](http://www.baeldung.com/guava-functions-predicates)
- [Guava 18: Whats New?](http://www.baeldung.com/whats-new-in-guava-18)

View File

@ -1,5 +1,3 @@
=========
## Guava 19

View File

@ -1,4 +1,6 @@
## Guava 21
### Relevant articles:
- [New Stream, Comparator and Collector in Guava 21](http://www.baeldung.com/guava-21-new)
- [New in Guava 21 common.util.concurrent](http://www.baeldung.com/guava-21-util-concurrent)
- [Zipping Collections in Java](http://www.baeldung.com/java-collections-zip)

View File

@ -13,17 +13,8 @@
<relativePath>../</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jool</artifactId>
<version>${jool.version}</version>
</dependency>
</dependencies>
<properties>
<guava.version>21.0</guava.version>
<jool.version>0.9.12</jool.version>
</properties>
</project>

View File

@ -0,0 +1,8 @@
## Guava Collections List examples
This module contains articles about list collections in Guava
### Relevant Articles:
- [Partition a List in Java](https://www.baeldung.com/java-list-split)
- [Guava Lists](https://www.baeldung.com/guava-lists)

View File

@ -4,15 +4,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>guava-collections</artifactId>
<artifactId>guava-collections-list</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>guava-collections</name>
<name>guava-collections-list</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -9,9 +9,9 @@
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -8,9 +8,9 @@
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -8,9 +8,8 @@ This module contains articles about Google Guava collections
- [Guava Ordering Cookbook](https://www.baeldung.com/guava-order)
- [Guide to Guavas Ordering](https://www.baeldung.com/guava-ordering)
- [Hamcrest Collections Cookbook](https://www.baeldung.com/hamcrest-collections-arrays)
- [Partition a List in Java](https://www.baeldung.com/java-list-split)
- [Filtering and Transforming Collections in Guava](https://www.baeldung.com/guava-filter-and-transform-a-collection)
- [Guava Join and Split Collections](https://www.baeldung.com/guava-joiner-and-splitter-tutorial)
- [Guava Lists](https://www.baeldung.com/guava-lists)
- [Guide to Guava MinMaxPriorityQueue and EvictingQueue](https://www.baeldung.com/guava-minmax-priority-queue-and-evicting-queue)
- [Guide to Guava Table](https://www.baeldung.com/guava-table)
- [Zipping Collections in Java](http://www.baeldung.com/java-collections-zip)

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>guava-collections</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>guava-collections</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<dependencies>
<!-- utils -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections4.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jool</artifactId>
<version>${jool.version}</version>
</dependency>
<!-- test scoped -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/java-hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${java-hamcrest.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>guava-collections</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
</build>
<properties>
<!-- util -->
<commons-collections4.version>4.1</commons-collections4.version>
<jool.version>0.9.12</jool.version>
<!-- testing -->
<assertj.version>3.6.1</assertj.version>
<java-hamcrest.version>2.0.0.0</java-hamcrest.version>
<junit-jupiter.version>5.6.2</junit-jupiter.version>
</properties>
</project>

View File

@ -0,0 +1,10 @@
## Guava Core
This module contains articles about core or base functionality provided by Google Guava
### Relevant Articles:
- [Introduction to Guava Throwables](https://www.baeldung.com/guava-throwables)
- [Guava CharMatcher](https://www.baeldung.com/guava-string-charmatcher)
- [Guide to Guavas PreConditions](https://www.baeldung.com/guava-preconditions)
- [Introduction to Guava Memoizer](https://www.baeldung.com/guava-memoizer)
- [Guava Functional Cookbook](https://www.baeldung.com/guava-functions-predicates)

View File

@ -4,15 +4,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>guava-2</artifactId>
<artifactId>guava-core</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>guava-2</name>
<name>guava-core</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.functional;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.memoizer;
import com.google.common.base.Suppliers;
import com.baeldung.guava.memoizer.CostlySupplier;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.preconditions;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.Arrays;

View File

@ -11,9 +11,9 @@
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -1,17 +1,12 @@
## Guava
## Guava Utilities
This module contains articles a Google Guava
This module contains articles about utilities provided by Google Guava
### Relevant Articles:
- [Guava Functional Cookbook](https://www.baeldung.com/guava-functions-predicates)
- [Guide to Guavas PreConditions](https://www.baeldung.com/guava-preconditions)
- [Introduction to Guava CacheLoader](https://www.baeldung.com/guava-cacheloader)
- [Introduction to Guava Memoizer](https://www.baeldung.com/guava-memoizer)
- [Guide to Guavas EventBus](https://www.baeldung.com/guava-eventbus)
- [Guide to Guavas Reflection Utilities](https://www.baeldung.com/guava-reflection)
- [Guide to Mathematical Utilities in Guava](https://www.baeldung.com/guava-math)
- [Bloom Filter in Java using Guava](https://www.baeldung.com/guava-bloom-filter)
- [Quick Guide to the Guava RateLimiter](https://www.baeldung.com/guava-rate-limiter)
- [Guava Cache](https://www.baeldung.com/guava-cache)
- [Introduction to Guava Throwables](https://www.baeldung.com/guava-throwables)

View File

@ -4,15 +4,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>guava</artifactId>
<artifactId>guava-utilities</artifactId>
<version>0.1.0-SNAPSHOT</version>
<name>guava</name>
<name>guava-utilities</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<artifactId>guava-modules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-java</relativePath>
<relativePath>../</relativePath>
</parent>
<dependencies>

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.eventbus;
public class CustomEvent {
private String action;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.eventbus;
import com.google.common.eventbus.DeadEvent;
import com.google.common.eventbus.Subscribe;

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<logger name="org.springframework" level="WARN" />
<logger name="org.springframework.transaction" level="WARN" />
<!-- in order to debug some marshalling issues, this needs to be TRACE -->
<logger name="org.springframework.web.servlet.mvc" level="WARN" />
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.bloomfilter;
import com.google.common.hash.BloomFilter;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.cache;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.cacheloader;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;

View File

@ -1,5 +1,7 @@
package com.baeldung.guava;
package com.baeldung.guava.eventbus;
import com.baeldung.guava.eventbus.CustomEvent;
import com.baeldung.guava.eventbus.EventListener;
import com.google.common.eventbus.EventBus;
import org.junit.After;
import org.junit.Before;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.mathutils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.mathutils;
import static org.junit.Assert.*;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.mathutils;
import static org.junit.Assert.*;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.mathutils;
import static org.junit.Assert.*;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.mathutils;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.*;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.ratelimiter;
import com.google.common.util.concurrent.RateLimiter;

View File

@ -1,4 +1,4 @@
package com.baeldung.guava;
package com.baeldung.guava.reflectionutils;
import com.google.common.collect.Lists;

View File

@ -17,9 +17,16 @@
</parent>
<modules>
<module>guava-utilities</module>
<module>guava-core</module>
<module>guava-18</module>
<module>guava-19</module>
<module>guava-21</module>
<module>guava-collections</module>
<module>guava-collections-list</module>
<module>guava-collections-map</module>
<module>guava-collections-set</module>
<module>guava-io</module>
</modules>
<dependencies>

11
pom.xml
View File

@ -416,12 +416,6 @@
<module>graphql/graphql-java</module>
<module>grpc</module>
<module>gson</module>
<module>guava</module>
<module>guava-2</module>
<module>guava-collections</module>
<module>guava-collections-map</module>
<module>guava-collections-set</module>
<module>guava-io</module>
<module>guava-modules</module>
<!-- <module>guest</module> --> <!-- not to be built as its for guest articles -->
<module>guice</module>
@ -934,11 +928,6 @@
<module>graphql/graphql-java</module>
<module>grpc</module>
<module>gson</module>
<module>guava</module>
<module>guava-collections</module>
<module>guava-collections-map</module>
<module>guava-collections-set</module>
<module>guava-io</module>
<module>guava-modules</module>
<!-- <module>guest</module> --> <!-- not to be built as its for guest articles -->
<module>guice</module>