You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by fo...@apache.org on 2019/08/23 12:33:03 UTC

[avro] 01/02: AVRO-2516: Add Automatic-Module-Name headers for Avro modules (#616)

This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git

commit b116c155b7b6250f4a89b197bfa814c03c4832fa
Author: Ismaël Mejía <ie...@gmail.com>
AuthorDate: Fri Aug 23 14:29:59 2019 +0200

    AVRO-2516: Add Automatic-Module-Name headers for Avro modules (#616)
    
    (cherry picked from commit 1be286e774761ab67dd97f2ad96fc9d7b3d7b738)
---
 lang/java/avro/pom.xml        |  7 +++++++
 lang/java/compiler/pom.xml    | 11 +++++++++++
 lang/java/grpc/pom.xml        |  9 +++++++++
 lang/java/ipc-jetty/pom.xml   |  7 +++++++
 lang/java/ipc-netty/pom.xml   |  7 +++++++
 lang/java/ipc/pom.xml         |  7 +++++++
 lang/java/mapred/pom.xml      |  7 +++++++
 lang/java/perf/README.md      |  2 +-
 lang/java/perf/pom.xml        | 18 +++++++++++++++++-
 lang/java/protobuf/pom.xml    | 16 ++++++++++++++++
 lang/java/thrift/pom.xml      | 16 ++++++++++++++++
 lang/java/trevni/avro/pom.xml | 11 +++++++++++
 lang/java/trevni/core/pom.xml | 16 ++++++++++++++++
 13 files changed, 132 insertions(+), 2 deletions(-)

diff --git a/lang/java/avro/pom.xml b/lang/java/avro/pom.xml
index d4fb9f0..972823c 100644
--- a/lang/java/avro/pom.xml
+++ b/lang/java/avro/pom.xml
@@ -59,6 +59,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
diff --git a/lang/java/compiler/pom.xml b/lang/java/compiler/pom.xml
index 2cff2f3..f1cfc90 100644
--- a/lang/java/compiler/pom.xml
+++ b/lang/java/compiler/pom.xml
@@ -63,6 +63,17 @@
       </testResource>
     </testResources>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.compiler</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
       <!-- Avro generates a parser class with javacc. By default, this looks in src/main/javacc
         and outputs to target/generated-sources/javacc See http://mojo.codehaus.org/javacc-maven-plugin/javacc-mojo.html
         for more info on using this plugin. -->
diff --git a/lang/java/grpc/pom.xml b/lang/java/grpc/pom.xml
index 82a2127..d6518b7 100644
--- a/lang/java/grpc/pom.xml
+++ b/lang/java/grpc/pom.xml
@@ -71,6 +71,15 @@
             </configuration>
           </execution>
         </executions>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.grpc</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
       <!-- Allow guava because hadoop brings it as a transitive dependency. -->
       <plugin>
diff --git a/lang/java/ipc-jetty/pom.xml b/lang/java/ipc-jetty/pom.xml
index a88e6c2..8062de8 100644
--- a/lang/java/ipc-jetty/pom.xml
+++ b/lang/java/ipc-jetty/pom.xml
@@ -59,6 +59,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.ipc.jetty</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
     </plugins>
   </build>
diff --git a/lang/java/ipc-netty/pom.xml b/lang/java/ipc-netty/pom.xml
index 833f205..996e513 100644
--- a/lang/java/ipc-netty/pom.xml
+++ b/lang/java/ipc-netty/pom.xml
@@ -61,6 +61,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.ipc.netty</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
     </plugins>
   </build>
diff --git a/lang/java/ipc/pom.xml b/lang/java/ipc/pom.xml
index 92403d8..99f69fc 100644
--- a/lang/java/ipc/pom.xml
+++ b/lang/java/ipc/pom.xml
@@ -96,6 +96,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.ipc</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
     </plugins>
   </build>
diff --git a/lang/java/mapred/pom.xml b/lang/java/mapred/pom.xml
index 5139f6b..ed0b990 100644
--- a/lang/java/mapred/pom.xml
+++ b/lang/java/mapred/pom.xml
@@ -52,6 +52,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.mapred</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
       </plugin>
       <!-- Allow guava because hadoop brings it as a transitive dependency. -->
       <plugin>
diff --git a/lang/java/perf/README.md b/lang/java/perf/README.md
index 4cbe494..e8f7168 100644
--- a/lang/java/perf/README.md
+++ b/lang/java/perf/README.md
@@ -44,4 +44,4 @@ From the JMH Framework:
 > why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial
 > experiments, perform baseline and negative tests that provide experimental control, make
 > sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the
-> domain experts. Do not assume the numbers tell you what you want them to tell.
\ No newline at end of file
+> domain experts. Do not assume the numbers tell you what you want them to tell.
diff --git a/lang/java/perf/pom.xml b/lang/java/perf/pom.xml
index dbbb8b4..ee47421 100644
--- a/lang/java/perf/pom.xml
+++ b/lang/java/perf/pom.xml
@@ -37,7 +37,23 @@
     <jmh.version>1.21</jmh.version>
     <main.basedir>${project.parent.parent.basedir}</main.basedir>
   </properties>
-  
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.perf</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.avro</groupId>
diff --git a/lang/java/protobuf/pom.xml b/lang/java/protobuf/pom.xml
index ecdafcb..ead7131 100644
--- a/lang/java/protobuf/pom.xml
+++ b/lang/java/protobuf/pom.xml
@@ -79,6 +79,22 @@
     </profile>
   </profiles>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.protobuf</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
diff --git a/lang/java/thrift/pom.xml b/lang/java/thrift/pom.xml
index bb0d37b..3aab22f 100644
--- a/lang/java/thrift/pom.xml
+++ b/lang/java/thrift/pom.xml
@@ -81,6 +81,22 @@
     </profile>
   </profiles>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.thrift</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
diff --git a/lang/java/trevni/avro/pom.xml b/lang/java/trevni/avro/pom.xml
index 1b61b2d..9e193f6 100644
--- a/lang/java/trevni/avro/pom.xml
+++ b/lang/java/trevni/avro/pom.xml
@@ -59,6 +59,17 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.trevni.avro</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/lang/java/trevni/core/pom.xml b/lang/java/trevni/core/pom.xml
index 4c644b0..57c47fc 100644
--- a/lang/java/trevni/core/pom.xml
+++ b/lang/java/trevni/core/pom.xml
@@ -35,6 +35,22 @@
     <main.basedir>${project.parent.parent.parent.basedir}</main.basedir>
   </properties>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Automatic-Module-Name>org.apache.avro.trevni</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencies>
     <dependency>
       <groupId>org.xerial.snappy</groupId>