| <!-- |
| |
| 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>fory-parent</artifactId> |
| <groupId>org.apache.fory</groupId> |
| <version>0.15.0-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>benchmark</artifactId> |
| <packaging>jar</packaging> |
| |
| <prerequisites> |
| <maven>3.0</maven> |
| </prerequisites> |
| |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <jmh.version>1.33</jmh.version> |
| <uberjar.name>benchmarks</uberjar.name> |
| <protostuff.version>1.7.2</protostuff.version> |
| <fastjson2.version>2.0.34</fastjson2.version> |
| <protobuf.version>3.25.5</protobuf.version> |
| <checkstyle.skip>true</checkstyle.skip> |
| <maven.deploy.skip>true</maven.deploy.skip> |
| <maven.javadoc.skip>true</maven.javadoc.skip> |
| <fory.java.rootdir>${basedir}/..</fory.java.rootdir> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.fory</groupId> |
| <artifactId>fory-core</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.fory</groupId> |
| <artifactId>fory-format</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.fory</groupId> |
| <artifactId>fory-test-core</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.codehaus.janino</groupId> |
| <artifactId>janino</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.msgpack</groupId> |
| <artifactId>jackson-dataformat-msgpack</artifactId> |
| <version>0.9.8</version> |
| </dependency> |
| <dependency> |
| <groupId>com.esotericsoftware</groupId> |
| <artifactId>kryo</artifactId> |
| <version>5.5.0</version> |
| </dependency> |
| <dependency> |
| <groupId>de.javakaffee</groupId> |
| <artifactId>kryo-serializers</artifactId> |
| <version>0.42</version> |
| </dependency> |
| <dependency> |
| <groupId>com.esotericsoftware.minlog</groupId> |
| <artifactId>minlog</artifactId> |
| <version>1.2</version> |
| </dependency> |
| <dependency> |
| <groupId>com.esotericsoftware</groupId> |
| <artifactId>reflectasm</artifactId> |
| <version>1.11.3</version> |
| </dependency> |
| <dependency> |
| <groupId>org.objenesis</groupId> |
| <artifactId>objenesis</artifactId> |
| <version>2.5.1</version> |
| </dependency> |
| <dependency> |
| <groupId>de.ruedigermoeller</groupId> |
| <artifactId>fst</artifactId> |
| <version>2.57</version> |
| <exclusions> |
| <exclusion> |
| <artifactId>jackson-core</artifactId> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>com.caucho</groupId> |
| <artifactId>hessian</artifactId> |
| <version>4.0.63</version> |
| </dependency> |
| <dependency> |
| <groupId>io.protostuff</groupId> |
| <artifactId>protostuff-core</artifactId> |
| <version>${protostuff.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.protostuff</groupId> |
| <artifactId>protostuff-runtime</artifactId> |
| <version>${protostuff.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.alibaba.fastjson2</groupId> |
| <artifactId>fastjson2</artifactId> |
| <version>${fastjson2.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-java</artifactId> |
| <version>${protobuf.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.google.flatbuffers</groupId> |
| <artifactId>flatbuffers-java</artifactId> |
| <version>2.0.3</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.avro</groupId> |
| <artifactId>avro</artifactId> |
| <version>1.11.4</version> |
| <exclusions> |
| <exclusion> |
| <artifactId>jackson-core</artifactId> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| </exclusion> |
| <exclusion> |
| <artifactId>jackson-databind</artifactId> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <dependency> |
| <groupId>io.timeandspace</groupId> |
| <artifactId>smoothie-map</artifactId> |
| <version>2.0.2</version> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>2.0.12</version> |
| <scope>compile</scope> |
| </dependency> |
| </dependencies> |
| |
| <profiles> |
| <profile> |
| <id>jdk17-plus</id> |
| <activation> |
| <!-- This profile activates for JDK 17 and newer --> |
| <jdk>[17,]</jdk> |
| </activation> |
| <properties> |
| <maven.compiler.release>17</maven.compiler.release> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>3.4.0</version> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <!-- Add the java17 source directory --> |
| <source>src/main/java17</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>3.14.0</version> |
| <configuration> |
| <compilerArgs> |
| <arg>--add-modules=jdk.incubator.vector</arg> |
| </compilerArgs> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.fory</groupId> |
| <artifactId>fory-simd</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| </dependencies> |
| </profile> |
| <profile> |
| <id>jmh</id> |
| <dependencies> |
| <dependency> |
| <groupId>org.openjdk.jmh</groupId> |
| <artifactId>jmh-core</artifactId> |
| <version>${jmh.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.openjdk.jmh</groupId> |
| <artifactId>jmh-generator-annprocess</artifactId> |
| <version>${jmh.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| </dependencies> |
| </profile> |
| </profiles> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>1.8</source> |
| <target>1.8</target> |
| <annotationProcessorPaths> |
| <path> |
| <groupId>org.openjdk.jmh</groupId> |
| <artifactId>jmh-generator-annprocess</artifactId> |
| <version>${jmh.version}</version> |
| </path> |
| </annotationProcessorPaths> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-jar-plugin</artifactId> |
| <configuration> |
| <archive> |
| <manifestEntries> |
| <Automatic-Module-Name>org.apache.fory.benchmark</Automatic-Module-Name> |
| </manifestEntries> |
| </archive> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <version>3.6.0</version> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <finalName>${uberjar.name}</finalName> |
| <transformers> |
| <transformer |
| implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| <mainClass>org.openjdk.jmh.Main</mainClass> |
| </transformer> |
| </transformers> |
| <filters> |
| <filter> |
| <artifact>*:*</artifact> |
| <excludes> |
| <exclude>META-INF/*.SF</exclude> |
| <exclude>META-INF/*.DSA</exclude> |
| <exclude>META-INF/*.RSA</exclude> |
| </excludes> |
| </filter> |
| </filters> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <version>3.3.0</version> |
| <executions> |
| <execution> |
| <id>build-classpath</id> |
| <goals> |
| <goal>build-classpath</goal> |
| </goals> |
| <configuration> |
| <includeScope>runtime</includeScope> |
| <outputProperty>depClasspath</outputProperty> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.4.0</version> |
| <executions> |
| <execution> |
| <id>run-tests</id> |
| <goals> |
| <goal>java</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <mainClass>org.openjdk.jmh.Main</mainClass> |
| <systemProperties> |
| <systemProperty> |
| <key>java.class.path</key> |
| <value>${project.build.outputDirectory}${path.separator}${depClasspath}</value> |
| </systemProperty> |
| </systemProperties> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-deploy-plugin</artifactId> |
| <version>2.7</version> |
| <configuration> |
| <skip>true</skip> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>0.5.1</version> |
| <extensions>true</extensions> |
| <configuration> |
| <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> |
| <pluginId>grpc-java</pluginId> |
| <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.47.0:exe:${os.detected.classifier}</pluginArtifact> |
| <protoSourceRoot>${basedir}/../../benchmarks/proto</protoSourceRoot> |
| </configuration> |
| <executions> |
| <execution> |
| <id>protobuf-compile</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>compile</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>3.0.0</version> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${project.build.directory}/generated-sources/protobuf/java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>com.diffplug.spotless</groupId> |
| <artifactId>spotless-maven-plugin</artifactId> |
| <version>${maven-spotless-plugin.version}</version> |
| <configuration> |
| <java> |
| <includes> |
| <include>src/**/*.java</include> |
| </includes> |
| <excludes> |
| <exclude>**/generated/**/*.java</exclude> |
| </excludes> |
| <googleJavaFormat> |
| <!-- 1.19.1 support JDK21 --> |
| <version>1.19.1</version> |
| <style>GOOGLE</style> |
| </googleJavaFormat> |
| </java> |
| </configuration> |
| </plugin> |
| </plugins> |
| <extensions> |
| <extension> |
| <!--set os properties such as${os.detected.classifier} --> |
| <groupId>kr.motd.maven</groupId> |
| <artifactId>os-maven-plugin</artifactId> |
| <version>1.5.0.Final</version> |
| </extension> |
| </extensions> |
| </build> |
| </project> |