This is an automated email from the ASF dual-hosted git repository. rgoers pushed a commit to branch spring-boot-4 in repository https://gitbox.apache.org/repos/asf/logging-flume-spring-boot.git
commit 80df66c0757156017153f9d602bf4248e34bcd4e Author: Ralph Goers <[email protected]> AuthorDate: Thu Jun 25 07:58:05 2026 -0700 Update to Spring Boot 4 --- .asf.yaml | 4 +- README.md | 16 +- flume-spring-boot-dist/pom.xml | 2 +- flume-spring-boot/pom.xml | 57 ++--- .../apache/flume/spring/boot/FlumeApplication.java | 19 +- .../boot/config/AbstractFlumeConfiguration.java | 283 +++++++++++++++------ .../spring/boot/config/SpringConfiguration.java | 51 ++-- .../boot/controller/FlumeMetricsController.java | 33 ++- .../flume/spring/boot/runner/SpringFlume.java | 64 +++-- .../apache/flume/spring/app/TestSpringFlume.java | 50 ++-- .../apache/flume/spring/app/config/AppConfig.java | 76 +++--- .../src/test/resources/application.yml | 16 ++ flume-spring-boot/src/test/resources/bootstrap.yml | 18 +- .../src/test/resources/log4j2-test.xml | 33 ++- pom.xml | 172 +++++++------ 15 files changed, 518 insertions(+), 376 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 6f32cad..b937bd2 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -1,7 +1,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 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 # @@ -12,6 +13,7 @@ # 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. +# # `.asf.yaml` is a branch-specific YAML configuration file for Git repositories to control features such as notifications, GitHub settings, etc. # See its documentation for details: https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features diff --git a/README.md b/README.md index 26a4e14..39fd233 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,19 @@ Apache Flume Spring Boot is open-sourced under the Apache Software Foundation Li Documentation is included in the binary distribution under the docs directory. In source form, it can be found in the flume-ng-doc directory. -The Flume 1.x guide and FAQ are available here: +In general, creating a Flume Spring Boot application requires creating a simple +project that contains the creation of the Sources, Sinks, and Channels with +the Sinks encapsulated in SinkRunners and the Sources in SourceRunners and then +then providing the bootstrap.yml and application.yml files. The Java class +containing the configuration must be named in the file: +META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +where each line in the file should contain the fully qualified class name of the +class to be autoconfigured.Note that Spring recommends that classes listed for +AutoConfiguration should NOT specify packages for component scanning. Instead, +the specific classes should be specified with @Import or they could also +be added the the AutoConfiguration import file. + +The Flume 2.x guide and FAQ are available here: * https://cwiki.apache.org/FLUME * https://cwiki.apache.org/confluence/display/FLUME/Getting+Started @@ -55,5 +67,5 @@ Bug and Issue tracker. Compiling Flume Spring Boot requires the following tools: -* Oracle Java JDK 11 +* Oracle Java JDK 17 * Apache Maven 3.x diff --git a/flume-spring-boot-dist/pom.xml b/flume-spring-boot-dist/pom.xml index b3b3d32..b3a2e9b 100644 --- a/flume-spring-boot-dist/pom.xml +++ b/flume-spring-boot-dist/pom.xml @@ -23,7 +23,7 @@ limitations under the License. <parent> <groupId>org.apache.flume</groupId> <artifactId>flume-spring-boot-parent</artifactId> - <version>2.1.0-SNAPSHOT.0</version> + <version>2.1.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> diff --git a/flume-spring-boot/pom.xml b/flume-spring-boot/pom.xml index 4601e12..47b72de 100644 --- a/flume-spring-boot/pom.xml +++ b/flume-spring-boot/pom.xml @@ -1,30 +1,28 @@ <?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/xsd/maven-4.0.0.xsd"> + ~ 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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>flume-spring-boot-parent</artifactId> <groupId>org.apache.flume</groupId> + <artifactId>flume-spring-boot-parent</artifactId> <version>2.1.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>flume-spring-boot</artifactId> <name>Flume Spring Boot Support</name> @@ -78,7 +76,10 @@ limitations under the License. <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> - + <dependency> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-annotations</artifactId> + </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> @@ -114,13 +115,7 @@ limitations under the License. <dependency> <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-1.2-api</artifactId> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> + <artifactId>log4j-slf4j2-impl</artifactId> <scope>test</scope> </dependency> <dependency> @@ -129,8 +124,6 @@ limitations under the License. <scope>test</scope> </dependency> </dependencies> - <build> - - </build> + <build /> -</project> \ No newline at end of file +</project> diff --git a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/FlumeApplication.java b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/FlumeApplication.java index d4a5146..c38c911 100644 --- a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/FlumeApplication.java +++ b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/FlumeApplication.java @@ -1,31 +1,30 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ - package org.apache.flume.spring.boot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** - * The application to run. + * The application to run. */ @SpringBootApplication public class FlumeApplication { - public static void main(String[] args) { - SpringApplication.run(FlumeApplication.class, args); - } + public static void main(String[] args) { + SpringApplication.run(FlumeApplication.class, args); + } } diff --git a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/AbstractFlumeConfiguration.java b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/AbstractFlumeConfiguration.java index 641aacc..962917b 100644 --- a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/AbstractFlumeConfiguration.java +++ b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/AbstractFlumeConfiguration.java @@ -1,21 +1,26 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.boot.config; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import org.apache.flume.Channel; import org.apache.flume.ChannelSelector; import org.apache.flume.Context; @@ -26,11 +31,10 @@ import org.apache.flume.SinkRunner; import org.apache.flume.Source; import org.apache.flume.SourceRunner; import org.apache.flume.channel.ChannelProcessor; +import org.apache.flume.channel.ReplicatingChannelSelector; import org.apache.flume.conf.Configurables; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import org.apache.flume.conf.channel.ChannelType; +import org.apache.flume.interceptor.Interceptor; /** * The primarily provides helper methods to create and configure the various Flume components. @@ -38,80 +42,170 @@ import java.util.Map; */ public abstract class AbstractFlumeConfiguration { - protected <T extends Channel> T configureChannel(final String name, final Class<T> clazz, - final Map<String, String> params) { - T channel; - try { - channel = clazz.newInstance(); - } catch (Exception ex) { - throw new FlumeException("Unable to create channel " + name, ex); + /** + * Create amd configure a Channel. + * @param name the Channel name. + * @param clazz the Channel Class to create. + * @param params parameters needed for configuration. + * @return The Channel. + * @param <T> The specific type of Channel. + */ + protected <T extends Channel> T configureChannel( + final String name, final Class<T> clazz, final Map<String, String> params) { + T channel; + try { + channel = clazz.getDeclaredConstructor().newInstance(); + } catch (Exception ex) { + throw new FlumeException("Unable to create channel " + name, ex); + } + channel.setName(name); + Configurables.configure(channel, createContext(params)); + return channel; + } + + /** + * Create and configure a Source and its SourcRunner. A ChannelSelector may be provided. + * @param name The name of the Source. + * @param clazz The Source class to be created and configured. + * @param selector The Channel Selector. + * @param params parameters required for configuration. + * @return The SourceRunner. + * @param <T> The Source Class. + */ + protected <T extends Source> SourceRunner configureSource( + final String name, final Class<T> clazz, final ChannelSelector selector, final Map<String, String> params) { + return configureSource(name, clazz, selector, null, params); } - channel.setName(name); - Configurables.configure(channel, createContext(params)); - return channel; - } - protected <T extends Source> SourceRunner configureSource(final String name, final Class<T> clazz, - final ChannelSelector selector, final Map<String, String> params) { - T source; - try { - source = clazz.newInstance(); - } catch (Exception ex) { - throw new FlumeException("Unable to create source " + name, ex); + /** + * Create and configure a Source and its SourcRunner. A ChannelSelector and Interceptors may be provided. + * @param name The name of the Source. + * @param clazz The Source class to be created and configured. + * @param selector The Channel Selector. + * @param interceptors A List of Interceptors. + * @param params parameters required for configuration. + * @return The SourceRunner. + * @param <T> The Source Class. + */ + protected <T extends Source> SourceRunner configureSource( + final String name, + final Class<T> clazz, + final ChannelSelector selector, + final List<Interceptor> interceptors, + final Map<String, String> params) { + T source; + try { + source = clazz.getDeclaredConstructor().newInstance(); + } catch (Exception ex) { + throw new FlumeException("Unable to create source " + name, ex); + } + source.setName(name); + ChannelSelector channelSelector = selector != null ? selector : new ReplicatingChannelSelector(); + Configurables.configure(source, createContext(params)); + return configureSource(source, channelSelector); } - source.setName(name); - Configurables.configure(source, createContext(params)); - ChannelProcessor channelProcessor = new ChannelProcessor(selector); - source.setChannelProcessor(new ChannelProcessor(selector)); - return SourceRunner.forSource(source); - } - protected <T extends Source> SourceRunner configureSource(final T source, - final ChannelSelector selector, final Map<String, String> params) { - source.setChannelProcessor(new ChannelProcessor(selector)); - return SourceRunner.forSource(source); - } + /** + * Set up an already configured Source for processing. + * @param source The Source. + * @param selector The Channel Selector. + * @return The SourceRunner. + * @param <T> The Source Class. + */ + protected <T extends Source> SourceRunner configureSource(final T source, final ChannelSelector selector) { + ChannelSelector channelSelector = selector != null ? selector : new ReplicatingChannelSelector(); + source.setChannelProcessor(new ChannelProcessor(channelSelector)); + return SourceRunner.forSource(source); + } - protected <T extends SinkProcessor> T configureSinkProcessor(final Map<String, String> params, - final Class<T> clazz, final List<Sink> sinks) { - T processor; - try { - processor = clazz.newInstance(); - } catch (Exception ex) { - throw new FlumeException("Unable to create SinkProcessor of type: " + clazz.getName(), ex); + /** + * Set up already configured Sinks for processing. + * @param params The SinkProcessor's parameters. + * @param clazz The SinkProcessor Class. + * @param sinks The list of Sinks. + * @return The SinkProcessor. + * @param <T> The specific type of the SinkProcessor. + */ + protected <T extends SinkProcessor> T configureSinkProcessor( + final Map<String, String> params, final Class<T> clazz, final List<Sink> sinks) { + T processor; + try { + processor = clazz.getDeclaredConstructor().newInstance(); + } catch (Exception ex) { + throw new FlumeException("Unable to create SinkProcessor of type: " + clazz.getName(), ex); + } + processor.setSinks(sinks); + Configurables.configure(processor, createContext(params)); + return processor; } - processor.setSinks(sinks); - Configurables.configure(processor, createContext(params)); - return processor; - } + /** + * Set up the SinkProcessors and SinkRunners for a list of Sinks. + * @param processorProperties The SinkProcessor's parameters. + * @param sinkProcessorClass The SinkProcessor to create. + * @param sinks The Map of Sink Lists with the key being the name of a group of channels to which the sinks are attached. + * @return A Map of the SinkRunners + */ + protected Map<String, SinkRunner> createSinkRunners( + final Map<String, String> processorProperties, + final Class<? extends SinkProcessor> sinkProcessorClass, + final Map<String, List<Sink>> sinks) { + Map<String, SinkRunner> sinkRunners = new HashMap<>(); + for (Map.Entry<String, List<Sink>> entry : sinks.entrySet()) { + sinkRunners.put( + entry.getKey(), + createSinkRunner( + configureSinkProcessor(processorProperties, sinkProcessorClass, entry.getValue()))); + } + return sinkRunners; + } - protected SinkRunner createSinkRunner(SinkProcessor sinkProcessor) { - SinkRunner runner = new SinkRunner(sinkProcessor); - runner.setSink(sinkProcessor); - return runner; - } + /** + * Creates the SinkRunner. + * @param sinkProcessor The SinkProcessor. + * @return A SinkRunner. + */ + protected SinkRunner createSinkRunner(SinkProcessor sinkProcessor) { + SinkRunner runner = new SinkRunner(sinkProcessor); + runner.setSink(sinkProcessor); + return runner; + } - protected <T extends Sink> Sink configureSink(final String name, final Class<T> sinkClazz, - final Channel channel, - final Map<String, String> params) { - T sink; - try { - sink = sinkClazz.newInstance(); - } catch (Exception ex) { - throw new FlumeException("Unable to create sink " + name, ex); + /** + * Create and configure a Sink. + * @param name The name of the Sink. + * @param sinkClazz The Class object for the Sink. + * @param channel The Channel attached to the Sink. + * @param params Parameters to configure the Sink. + * @return The Sink. + * @param <T> The type of Sink being created. + */ + protected <T extends Sink> Sink configureSink( + final String name, final Class<T> sinkClazz, final Channel channel, final Map<String, String> params) { + T sink; + try { + sink = sinkClazz.getDeclaredConstructor().newInstance(); + } catch (Exception ex) { + throw new FlumeException("Unable to create sink " + name, ex); + } + sink.setName(name); + Configurables.configure(sink, createContext(params)); + sink.setChannel(channel); + return sink; } - sink.setName(name); - Configurables.configure(sink, createContext(params)); - sink.setChannel(channel); - return sink; - } - protected ChannelSelector createChannelSelector(Class<? extends ChannelSelector> clazz, - List<Channel> channels, Map<String, String> params) { + /** + * Create the channel selector and configure it. + * @param clazz The Selector class. + * @param channels The Channels. + * @param params The configuration parameters. + * @return The ChannelSelector. + */ + protected ChannelSelector createChannelSelector( + Class<? extends ChannelSelector> clazz, List<Channel> channels, Map<String, String> params) { ChannelSelector selector; try { - selector = clazz.newInstance(); + selector = clazz.getDeclaredConstructor().newInstance(); } catch (Exception ex) { throw new FlumeException("Unable to create channel selector " + clazz.getName(), ex); } @@ -120,19 +214,40 @@ public abstract class AbstractFlumeConfiguration { return selector; } - /** - * Creates a List from a Varargs array. - * - * @param items The items to add to the list. - * @param <T> The type of objects in the List. - * @return a List containing the supplied items. - */ - @SafeVarargs - protected final <T> List<T> listOf(T... items) { - return Arrays.asList(items); - } + @SuppressWarnings("unchecked") + protected Class<? extends Channel> getChannelClass(String type) { + if (type == null) { + return null; + } else { + ChannelType channelType = null; + try { + channelType = ChannelType.valueOf(type.toUpperCase(Locale.getDefault())); + return Class.forName(channelType.name()).asSubclass(Channel.class); + } catch (Exception ex) { + return null; + } + } + } - private static Context createContext(Map<String, String> map) { - return map != null ? new Context(map) : new Context(); - } + /** + * Creates a List from a Varargs array. + * + * @param items The items to add to the list. + * @param <T> The type of objects in the List. + * @return a List containing the supplied items. + */ + @SafeVarargs + protected final <T> List<T> listOf(T... items) { + return Arrays.asList(items); + } + + /** + * Create a Context from the Map. + * + * @param map contains the configuration parameters for the component being provisioned. + * @return The Context. + */ + protected static Context createContext(Map<String, String> map) { + return map != null ? new Context(map) : new Context(); + } } diff --git a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/SpringConfiguration.java b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/SpringConfiguration.java index 6ceedfc..4c3991a 100644 --- a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/SpringConfiguration.java +++ b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/config/SpringConfiguration.java @@ -1,21 +1,22 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.boot.config; +import java.util.Map; import org.apache.flume.Channel; import org.apache.flume.SinkRunner; import org.apache.flume.SourceRunner; @@ -25,8 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import java.util.Map; - /** * This is the heart of a Flume application. Use your custom Java configuration * file to define the Channels, SinkRunners, and SourceRunners as beans. @@ -38,27 +37,27 @@ import java.util.Map; @Configuration public class SpringConfiguration { - @Autowired - public Map<String, Channel> channels; + @Autowired + public Map<String, Channel> channels; - @Autowired - public Map<String, SinkRunner> sinkRunners; + @Autowired + public Map<String, SinkRunner> sinkRunners; - @Autowired - public Map<String, SourceRunner> sourceRunners; + @Autowired + public Map<String, SourceRunner> sourceRunners; - @Bean - public MaterializedConfiguration configuration() { - MaterializedConfiguration config = new SimpleMaterializedConfiguration(); - for (Map.Entry<String, Channel> entry : channels.entrySet()) { - config.addChannel(entry.getKey(), entry.getValue()); - } - for (Map.Entry<String, SinkRunner> entry : sinkRunners.entrySet()) { - config.addSinkRunner(entry.getKey(), entry.getValue()); - } - for (Map.Entry<String, SourceRunner> entry : sourceRunners.entrySet()) { - config.addSourceRunner(entry.getKey(), entry.getValue()); + @Bean + public MaterializedConfiguration configuration() { + MaterializedConfiguration config = new SimpleMaterializedConfiguration(); + for (Map.Entry<String, Channel> entry : channels.entrySet()) { + config.addChannel(entry.getKey(), entry.getValue()); + } + for (Map.Entry<String, SinkRunner> entry : sinkRunners.entrySet()) { + config.addSinkRunner(entry.getKey(), entry.getValue()); + } + for (Map.Entry<String, SourceRunner> entry : sourceRunners.entrySet()) { + config.addSourceRunner(entry.getKey(), entry.getValue()); + } + return config; } - return config; - } } diff --git a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/controller/FlumeMetricsController.java b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/controller/FlumeMetricsController.java index 3f4642c..2391868 100644 --- a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/controller/FlumeMetricsController.java +++ b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/controller/FlumeMetricsController.java @@ -1,32 +1,30 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.boot.controller; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; import java.util.Map; - import org.apache.flume.instrumentation.util.JMXPollUtil; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import com.google.gson.Gson; -import com.google.gson.reflect.TypeToken; - /** * Retrieves Flume Metrics. */ @@ -34,15 +32,14 @@ import com.google.gson.reflect.TypeToken; @ConditionalOnProperty(prefix = "flume", name = "metrics", havingValue = "http") public class FlumeMetricsController { - private final Type mapType = new MapTypeToken().getType(); - private final Gson gson = new Gson(); + private final Type mapType = new MapTypeToken().getType(); + private final Gson gson = new Gson(); - @GetMapping(value = "/metrics", produces = "application/json;charset=utf-8") - public String metrics() { - Map<String, Map<String, String>> metricsMap = JMXPollUtil.getAllMBeans(); - return gson.toJson(metricsMap, mapType); - } + @GetMapping(value = "/metrics", produces = "application/json;charset=utf-8") + public String metrics() { + Map<String, Map<String, String>> metricsMap = JMXPollUtil.getAllMBeans(); + return gson.toJson(metricsMap, mapType); + } - private static class MapTypeToken extends TypeToken<Map<String, Map<String, String>>> { - } + private static class MapTypeToken extends TypeToken<Map<String, Map<String, String>>> {} } diff --git a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/runner/SpringFlume.java b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/runner/SpringFlume.java index 2cc312c..6050d14 100644 --- a/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/runner/SpringFlume.java +++ b/flume-spring-boot/src/main/java/org/apache/flume/spring/boot/runner/SpringFlume.java @@ -1,59 +1,57 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.boot.runner; import com.google.common.collect.Lists; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import java.util.List; import org.apache.flume.lifecycle.LifecycleAware; import org.apache.flume.node.Application; import org.apache.flume.node.MaterializedConfiguration; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; -import java.util.List; - /** * */ @Component public class SpringFlume { - private MaterializedConfiguration materializedConfiguration; - - private final Application application; - - @Autowired - public SpringFlume(MaterializedConfiguration configuration) { - this.materializedConfiguration = configuration; - List<LifecycleAware> components = Lists.newArrayList(); - application = new Application(components); - } - - @PostConstruct - public void startUp() { - application.start(); - application.handleConfigurationEvent(materializedConfiguration); - } - - @PreDestroy - public void shutdown() { - application.stop(); - } - - + private MaterializedConfiguration materializedConfiguration; + + private final Application application; + + @Autowired + @SuppressFBWarnings("EI_EXPOSE_REP2") + public SpringFlume(MaterializedConfiguration configuration) { + this.materializedConfiguration = configuration; + List<LifecycleAware> components = Lists.newArrayList(); + application = new Application(components); + } + + @PostConstruct + public void startUp() { + application.start(); + application.handleConfigurationEvent(materializedConfiguration); + } + + @PreDestroy + public void shutdown() { + application.stop(); + } } diff --git a/flume-spring-boot/src/test/java/org/apache/flume/spring/app/TestSpringFlume.java b/flume-spring-boot/src/test/java/org/apache/flume/spring/app/TestSpringFlume.java index c2f1510..824e988 100644 --- a/flume-spring-boot/src/test/java/org/apache/flume/spring/app/TestSpringFlume.java +++ b/flume-spring-boot/src/test/java/org/apache/flume/spring/app/TestSpringFlume.java @@ -1,32 +1,31 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.app; import java.net.URI; - import org.apache.flume.node.MaterializedConfiguration; import org.apache.flume.spring.boot.FlumeApplication; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.resttestclient.TestRestTemplate; import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -36,28 +35,29 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; * */ @ExtendWith(SpringExtension.class) -@SpringBootTest(classes = {FlumeApplication.class}, - webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@SpringBootTest( + classes = {FlumeApplication.class}, + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureTestRestTemplate public class TestSpringFlume { - @LocalServerPort - private int port; + @LocalServerPort + private int port; - @Autowired - private TestRestTemplate restTemplate; + @Autowired + private TestRestTemplate restTemplate; - @Autowired - MaterializedConfiguration configuration; + @Autowired + MaterializedConfiguration configuration; - @Test - public void contextLoads() { - Assertions.assertThat(configuration).isNotNull(); - Assertions.assertThat(configuration.getSinkRunners()).isNotNull(); - Assertions.assertThat(configuration.getSinkRunners().size()).isEqualTo(1); - String uri = "http://localhost:" + port + "/metrics"; - ResponseEntity<String> response = restTemplate.getForEntity(URI.create(uri), String.class); - Assertions.assertThat(response).isNotNull(); - Assertions.assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); - } + @Test + public void contextLoads() { + Assertions.assertThat(configuration).isNotNull(); + Assertions.assertThat(configuration.getSinkRunners()).isNotNull(); + Assertions.assertThat(configuration.getSinkRunners().size()).isEqualTo(1); + String uri = "http://localhost:" + port + "/metrics"; + ResponseEntity<String> response = restTemplate.getForEntity(URI.create(uri), String.class); + Assertions.assertThat(response).isNotNull(); + Assertions.assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); + } } diff --git a/flume-spring-boot/src/test/java/org/apache/flume/spring/app/config/AppConfig.java b/flume-spring-boot/src/test/java/org/apache/flume/spring/app/config/AppConfig.java index a80657d..70fafe7 100644 --- a/flume-spring-boot/src/test/java/org/apache/flume/spring/app/config/AppConfig.java +++ b/flume-spring-boot/src/test/java/org/apache/flume/spring/app/config/AppConfig.java @@ -1,21 +1,23 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.flume.spring.app.config; +import java.util.HashMap; +import java.util.Map; import org.apache.flume.Channel; import org.apache.flume.ChannelSelector; import org.apache.flume.Context; @@ -34,48 +36,44 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; -import java.util.HashMap; -import java.util.Map; - /** * */ @AutoConfiguration -@ComponentScan(basePackages="org.apache.flume.spring.app") +@ComponentScan(basePackages = "org.apache.flume.spring.app") public class AppConfig extends AbstractFlumeConfiguration { - @Bean - @ConfigurationProperties(prefix = "flume.sources.source1") - public Map<String, String> source1Properties() { - return new HashMap<>(); - } + @Bean + @ConfigurationProperties(prefix = "flume.sources.source1") + public Map<String, String> source1Properties() { + return new HashMap<>(); + } - @Bean - @ConfigurationProperties(prefix = "flume.channels.channel1") - public Map<String, String> channel1Properties() { - return new HashMap<>(); - } + @Bean + @ConfigurationProperties(prefix = "flume.channels.channel1") + public Map<String, String> channel1Properties() { + return new HashMap<>(); + } - @Bean - public Channel memoryChannel(@Qualifier("channel1Properties")Map<String, String> channel1Properties) { - return configureChannel("channel1", MemoryChannel.class, channel1Properties); - } + @Bean + public Channel memoryChannel(@Qualifier("channel1Properties") Map<String, String> channel1Properties) { + return configureChannel("channel1", MemoryChannel.class, channel1Properties); + } - @Bean - public SourceRunner seqSource(Channel memoryChannel, @Qualifier("source1Properties")Map<String, String> source1Properties) { - ChannelSelector selector = new ReplicatingChannelSelector(); - selector.setChannels(listOf(memoryChannel)); - SourceRunner runner = configureSource("source1", SequenceGeneratorSource.class, selector, - source1Properties); - Context context = source1Properties != null ? new Context(source1Properties) : new Context(); - runner.getSource().getChannelProcessor().configure(context); - return runner; - } + @Bean + public SourceRunner seqSource( + Channel memoryChannel, @Qualifier("source1Properties") Map<String, String> source1Properties) { + ChannelSelector selector = new ReplicatingChannelSelector(); + selector.setChannels(listOf(memoryChannel)); + SourceRunner runner = configureSource("source1", SequenceGeneratorSource.class, selector, source1Properties); + Context context = source1Properties != null ? new Context(source1Properties) : new Context(); + runner.getSource().getChannelProcessor().configure(context); + return runner; + } - @Bean - public SinkRunner nullSink(Channel memoryChannel) { - Sink sink = configureSink("null", NullSink.class, memoryChannel,null); - return createSinkRunner(configureSinkProcessor(null, DefaultSinkProcessor.class, - listOf(sink))); - } + @Bean + public SinkRunner nullSink(Channel memoryChannel) { + Sink sink = configureSink("null", NullSink.class, memoryChannel, null); + return createSinkRunner(configureSinkProcessor(null, DefaultSinkProcessor.class, listOf(sink))); + } } diff --git a/flume-spring-boot/src/test/resources/application.yml b/flume-spring-boot/src/test/resources/application.yml index 7b52309..b8baaa6 100644 --- a/flume-spring-boot/src/test/resources/application.yml +++ b/flume-spring-boot/src/test/resources/application.yml @@ -1,3 +1,19 @@ +# +# 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. +# spring: application: name: flume-test diff --git a/flume-spring-boot/src/test/resources/bootstrap.yml b/flume-spring-boot/src/test/resources/bootstrap.yml index e290590..d6d8441 100644 --- a/flume-spring-boot/src/test/resources/bootstrap.yml +++ b/flume-spring-boot/src/test/resources/bootstrap.yml @@ -1,3 +1,19 @@ +# +# 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. +# flume: app: - packages: "org.apache.flume.spring.boot.app" \ No newline at end of file + packages: "org.apache.flume.spring.boot.app" diff --git a/flume-spring-boot/src/test/resources/log4j2-test.xml b/flume-spring-boot/src/test/resources/log4j2-test.xml index 5baa09d..eb4c2eb 100644 --- a/flume-spring-boot/src/test/resources/log4j2-test.xml +++ b/flume-spring-boot/src/test/resources/log4j2-test.xml @@ -1,21 +1,20 @@ <?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. - ---> + ~ 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. + --> <Configuration status="ERROR"> <Appenders> <Console name="Console" target="SYSTEM_OUT"> @@ -28,4 +27,4 @@ <AppenderRef ref="Console" /> </Root> </Loggers> -</Configuration> \ No newline at end of file +</Configuration> diff --git a/pom.xml b/pom.xml index 68947de..f57611e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,23 +1,21 @@ <?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/xsd/maven-4.0.0.xsd"> + ~ 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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> @@ -29,9 +27,70 @@ limitations under the License. <groupId>org.apache.flume</groupId> <artifactId>flume-spring-boot-parent</artifactId> - <name>Flume Spring Boot Parent</name> <version>2.1.0-SNAPSHOT</version> <packaging>pom</packaging> + <name>Flume Spring Boot Parent</name> + + <inceptionYear>2022</inceptionYear> + + <organization> + <name>Apache Software Foundation</name> + <url>http://www.apache.org</url> + </organization> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + </license> + </licenses> + + <developers> + <developer> + <id>rgoers</id> + <name>Ralph Goers</name> + <email>[email protected]</email> + <organization>Nextiva</organization> + </developer> + </developers> + + <mailingLists> + <mailingList> + <name>Flume User List</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + <archive>http://mail-archives.apache.org/mod_mbox/flume-user/</archive> + </mailingList> + <mailingList> + <name>Flume Developer List</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + <archive>http://mail-archives.apache.org/mod_mbox/flume-dev/</archive> + </mailingList> + <mailingList> + <name>Flume Commits</name> + <subscribe>[email protected]</subscribe> + <unsubscribe>[email protected]</unsubscribe> + <post>[email protected]</post> + <archive>http://mail-archives.apache.org/mod_mbox/flume-commits/</archive> + </mailingList> + </mailingLists> + <modules> + <module>flume-spring-boot</module> + </modules> + + <scm> + <connection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</connection> + <developerConnection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</developerConnection> + <url>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</url> + </scm> + + <issueManagement> + <system>JIRA</system> + <url>https://issues.apache.org/jira/browse/FLUME</url> + </issueManagement> <properties> <ReleaseVersion>2.1.0</ReleaseVersion> @@ -54,8 +113,8 @@ limitations under the License. <groupId>org.apache.flume</groupId> <artifactId>flume-dependencies</artifactId> <version>${flume.version}</version> - <scope>import</scope> <type>pom</type> + <scope>import</scope> </dependency> <!-- Override the versions in this repo --> <dependency> @@ -72,67 +131,6 @@ limitations under the License. </dependency> </dependencies> </dependencyManagement> - - <inceptionYear>2022</inceptionYear> - - <issueManagement> - <system>JIRA</system> - <url>https://issues.apache.org/jira/browse/FLUME</url> - </issueManagement> - - <licenses> - <license> - <name>The Apache Software License, Version 2.0</name> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> - </license> - </licenses> - - <mailingLists> - <mailingList> - <archive>http://mail-archives.apache.org/mod_mbox/flume-user/</archive> - <name>Flume User List</name> - <post>[email protected]</post> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - </mailingList> - <mailingList> - <archive>http://mail-archives.apache.org/mod_mbox/flume-dev/</archive> - <name>Flume Developer List</name> - <post>[email protected]</post> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - </mailingList> - <mailingList> - <archive>http://mail-archives.apache.org/mod_mbox/flume-commits/</archive> - <name>Flume Commits</name> - <post>[email protected]</post> - <subscribe>[email protected]</subscribe> - <unsubscribe>[email protected]</unsubscribe> - </mailingList> - </mailingLists> - - <scm> - <url>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</url> - <developerConnection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</developerConnection> - <connection>https://gitbox.apache.org/repos/asf/flume-spring-boot.git</connection> - </scm> - - <developers> - <developer> - <name>Ralph Goers</name> - <id>rgoers</id> - <email>[email protected]</email> - <organization>Nextiva</organization> - </developer> - </developers> - - <organization> - <name>Apache Software Foundation</name> - <url>http://www.apache.org</url> - </organization> - <modules> - <module>flume-spring-boot</module> - </modules> <build> <plugins> <plugin> @@ -173,10 +171,10 @@ limitations under the License. <executions> <execution> <id>verify.rat</id> - <phase>verify</phase> <goals> <goal>check</goal> </goals> + <phase>verify</phase> </execution> </executions> </plugin> @@ -197,10 +195,10 @@ limitations under the License. <version>${mvn-gpg-plugin.version}</version> <executions> <execution> - <phase>verify</phase> <goals> <goal>sign</goal> </goals> + <phase>verify</phase> <configuration> <keyname>${SigningUserName}</keyname> </configuration> @@ -211,18 +209,18 @@ limitations under the License. <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${mvn-javadoc-plugin.version}</version> + <configuration> + <additionalparam>-Xdoclint:none</additionalparam> + </configuration> <executions> <execution> <id>javadoc-jar</id> - <phase>package</phase> <goals> <goal>aggregate-jar</goal> </goals> + <phase>package</phase> </execution> </executions> - <configuration> - <additionalparam>-Xdoclint:none</additionalparam> - </configuration> </plugin> </plugins> </build>
