This is an automated email from the ASF dual-hosted git repository.
ssinchenko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git
The following commit(s) were added to refs/heads/main by this push:
new 9ed02e64 feat: shade proto (#663)
9ed02e64 is described below
commit 9ed02e64fcab4ce03fdb59d57dac5f18b3651d9b
Author: Sem <[email protected]>
AuthorDate: Mon Mar 3 11:35:20 2025 +0100
feat: shade proto (#663)
* shade proto
* Fix copy-paste mistake
* WIP
* Shade snakeyaml and remove tmp pom
* Fixes
---
.gitignore | 3 +-
maven-projects/info/README.md | 6 +++-
maven-projects/info/pom.xml | 84 ++++++++++++++++++++++++++++++++++++++-----
maven-projects/pom.xml | 1 -
maven-projects/proto/pom.xml | 81 -----------------------------------------
5 files changed, 83 insertions(+), 92 deletions(-)
diff --git a/.gitignore b/.gitignore
index 08a7fbca..0ce2d0ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,4 +77,5 @@ venv.bak/
### Java ###
target/
-maven-projects/proto/src/main/java
\ No newline at end of file
+maven-projects/proto/src/main/java
+dependency-reduced-pom.xml
diff --git a/maven-projects/info/README.md b/maven-projects/info/README.md
index 75aad176..fb840e1c 100644
--- a/maven-projects/info/README.md
+++ b/maven-projects/info/README.md
@@ -1 +1,5 @@
-This module is under development
\ No newline at end of file
+# GraphAr Info
+
+Module contains a lightweight set of interfaces and utils for building a
GraphAr read/write tools on top.
+
+**Under active development**
\ No newline at end of file
diff --git a/maven-projects/info/pom.xml b/maven-projects/info/pom.xml
index bcb89d55..7c0ba74c 100644
--- a/maven-projects/info/pom.xml
+++ b/maven-projects/info/pom.xml
@@ -32,24 +32,26 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>info</artifactId>
+ <artifactId>graphar-info</artifactId>
<packaging>jar</packaging>
- <version>0.13.0.dev-SNAPSHOT</version>
+ <version>${graphar.version}</version>
- <name>info</name>
+ <name>graphar-info</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <proto-info.version>0.13.0.dev-SNAPSHOT</proto-info.version>
+ <protobuf-maven-plugin.version>2.3.0</protobuf-maven-plugin.version>
+ <protobuf.version>4.27.1</protobuf.version>
</properties>
<dependencies>
<dependency>
- <groupId>org.apache.graphar</groupId>
- <artifactId>proto</artifactId>
- <version>${proto-info.version}</version>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuf.version}</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -71,6 +73,24 @@
<build>
<plugins>
+ <plugin>
+ <groupId>io.github.ascopes</groupId>
+ <artifactId>protobuf-maven-plugin</artifactId>
+ <version>${protobuf-maven-plugin.version}</version>
+ <configuration>
+ <sourceDirectories>
+
<sourceDirectory>${project.basedir}/../../format</sourceDirectory>
+ </sourceDirectories>
+ <protocVersion>${protobuf.version}</protocVersion>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
@@ -78,12 +98,60 @@
<configuration>
<java>
<googleJavaFormat>
- <version>1.7</version>
+ <version>11</version>
<style>AOSP</style>
</googleJavaFormat>
</java>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.6.0</version>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <shadeTestJar>false</shadeTestJar>
+ <artifactSet>
+ <includes>
+ <include>com.google.protobuf:*</include>
+ <include>org.yaml:*</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>com.google.protobuf</pattern>
+ <shadedPattern>org.graphar.protobuf</shadedPattern>
+ <includes>
+ <include>com.google.protobuf.**</include>
+ </includes>
+ </relocation>
+ <relocation>
+ <pattern>org.yaml</pattern>
+ <shadedPattern>org.graphar.yaml</shadedPattern>
+ <includes>
+ <include>org.yaml.**</include>
+ </includes>
+ </relocation>
+ </relocations>
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>google/protobuf/**</exclude>
+ <exclude>yaml/snakeyaml/**</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/maven-projects/pom.xml b/maven-projects/pom.xml
index f0152555..b7c1b09e 100644
--- a/maven-projects/pom.xml
+++ b/maven-projects/pom.xml
@@ -78,7 +78,6 @@
<module>java</module>
<module>spark</module>
<module>info</module>
- <module>proto</module>
</modules>
<build>
diff --git a/maven-projects/proto/pom.xml b/maven-projects/proto/pom.xml
deleted file mode 100644
index 6e95e77a..00000000
--- a/maven-projects/proto/pom.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.graphar</groupId>
- <artifactId>graphar-root</artifactId>
- <version>${graphar.version}</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>proto</artifactId>
- <packaging>jar</packaging>
- <version>0.13.0.dev-SNAPSHOT</version>
-
- <name>proto</name>
-
- <properties>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>11</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <protobuf-maven-plugin.version>2.3.0</protobuf-maven-plugin.version>
- <protobuf.version>4.27.1</protobuf.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>io.github.ascopes</groupId>
- <artifactId>protobuf-maven-plugin</artifactId>
- <version>${protobuf-maven-plugin.version}</version>
- <configuration>
- <sourceDirectories>
-
<sourceDirectory>${project.basedir}/../../format</sourceDirectory>
- </sourceDirectories>
-
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
- <protocVersion>${protobuf.version}</protocVersion>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]