Repository: netty/netty
Issue: Bill Of Materials (BOM) pom

Many projects these days have a bill of materials (BOM) project that just allows to import all the managed dependencies for a project with a single entry in dependencyManagement.

It would be great to have such BOM in netty. 

Issue comments:
@flozano not sure what you are asking for... isnt it enough for you to import netty-all ?

@normanmaurer 

> isnt it enough for you to import netty-all ?

No. netty-all is not a bom.
http://howtodoinjava.com/maven/maven-bom-bill-of-materials-dependency/
http://stackoverflow.com/questions/38496022/maven-bom-bill-of-materials-dependency

~~I don't think this makes sense at all, Netty is "zero" dependency.~~
  
In the simplest use-case for a BOM, it's just very convenient to import it in the dependencyManagement version and be able to depend on any individual netty artifact without declaring a version. That capability by itself is useful and makes sense.

But there's more. Netty may be "zero dependency", but projects a project depends on may depend on netty themselves. This is not only about what netty depends on, this is about making it easy to depend on netty, be it directly os transitively.  If you want to properly handle conflicting transitive dependencies in a maven project (and in gradle too, but differently), it's a good idea to use `<dependencyManagement>`. Imagine you are depending on two artifacts that depend themselves on some random netty artifacts, but you don't know exactly which ones. Maybe they use netty-codec-http, or netty-codec-mqtt, or something else. Therefore, to be safe, you would need to declare in `dependencyManagement` section *all* the depended artifacts. It's much more convenient and less error-prone to just import a BOM project.

There is a big list of common projects out there that produce BOMs, no matter if they have a lot of dependencies or not: Jackson, Spring, JAXB, Jersey, AWS SDK, Guice, HK2...

Examples of very useful BOM projects:
http://search.maven.org/#artifactdetails%7Corg.glassfish.hk2%7Chk2-bom%7C2.5.0-b28%7Cpom
http://search.maven.org/#artifactdetails%7Ccom.amazonaws%7Caws-java-sdk-bom%7C1.11.58%7Cpom

About netty-all, it's not a BOM, it's a JAR that comes with everything. In my opinion this is  potentially dangerous, because it makes it possible that some of you projects depend on netty-all and some of your projects depend on netty-whatever, and they could be different versions, potentially making your classpath have two versions of same class. Maven can detect that two projects are depending on different versions of netty-codec-http, but it has no way to notice a version conflict between netty-all and netty-codec-http.

As an example, mockito had also a `mockito-all` and ditched it in latest version because of all the issues it comes with (https://github.com/mockito/mockito/issues/153). In my opinion, netty-all should be used only in build systems with manual dependencies (pure ant, bazel), but not in build systems with transitive dependencies (ivy, gradle, maven). (clarification: mockito-all also had other terrible problems, such as including external jars...).

If you would consider accepting it, I can try to contribute such artifact. It comes with very little maintenance - just add an entry to the BOM project when a new artifact is added.
Fixed by https://github.com/netty/netty/pull/6412

Pull request review comments:
@johnou Can you open another PR for this change as its not related ? 
kill line
kill line
kill line

Patch that resolved the issue:
diff --git a/bom/pom.xml b/bom/pom.xml
new file mode 100644
index 00000000000..20d935d3bc5
--- /dev/null
+++ b/bom/pom.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2017 The Netty Project
+  ~
+  ~ The Netty Project 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>
+    <groupId>io.netty</groupId>
+    <artifactId>netty-parent</artifactId>
+    <version>4.1.9.Final-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>netty-bom</artifactId>
+  <packaging>pom</packaging>
+
+  <name>Netty/BOM</name>
+
+  <dependencyManagement>
+    <dependencies>
+      <!-- All release modules -->
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-buffer</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-dns</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-haproxy</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-http</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-http2</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-memcache</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-mqtt</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-redis</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-smtp</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-socks</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-stomp</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-codec-xml</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-common</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-handler</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-handler-proxy</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-resolver</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-resolver-dns</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-transport</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-transport-rxtx</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-transport-sctp</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-transport-udt</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>netty-example</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 528e97496c4..855aa521deb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -284,6 +284,7 @@
     <module>testsuite-osgi</module>
     <module>microbench</module>
     <module>all</module>
+    <module>bom</module>
     <module>tarball</module>
   </modules>
 


Test patch: