https://github.com/vy/flatc
Unofficial Maven artifacts for FlatBuffers compiler binaries.
https://github.com/vy/flatc
Last synced: over 1 year ago
JSON representation
Unofficial Maven artifacts for FlatBuffers compiler binaries.
- Host: GitHub
- URL: https://github.com/vy/flatc
- Owner: vy
- License: apache-2.0
- Created: 2015-11-09T21:09:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-09T21:19:39.000Z (over 10 years ago)
- Last Synced: 2024-10-03T13:22:07.153Z (almost 2 years ago)
- Homepage:
- Size: 0 Bytes
- Stars: 2
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
According to the [official FlatBuffers project](https://github.com/google/flatbuffers),
> FlatBuffers is a serialization library for games and other memory
> constrained apps. FlatBuffers allows you to directly access serialized
> data without unpacking/parsing it first, while still having great
> forwards/backwards compatibility.
Unfortunately, FlatBuffers project does not have a native Java compiler.
This project provides a set of Maven artifacts containing platform-dependent
`flatc` binaries. The list of supported platforms are as follows:
- Linux (x86-64)
- OSX (x86-64)
Usage
=====
You can use `flatc` artifacts in your Maven projects to compile your FlatBuffers
schemas (`*.fbs`) as follows:
1. Add [flatbuffers](http://github.com/vy/flatbuffers) to your
dependencies to provide `com.google.flatbuffers` package
required by `flatc` generated Java files.
2. Add necessary `flatc` artifact (e.g. `flatc-linux-x86_64`) to your
Maven dependencies.
3. Use Maven Ant plugin to execute the `flatc` provided by the artifact.
4. Use `build-helper-maven-plugin` to include generated sources in the
final package.
Following `pom.xml` snippet shows how you can do these steps in detail.
(Note that here it purposes `flatc` artifact to compile `*.fbs` files
under `src` directory.)
```xml
src
${project.build.directory}/generated-sources
1.9.1
1.2.0-3f79e055
1.8
3.3
2.10
1.4.1.Final
com.vlkan
flatbuffers
${fbs.version}
kr.motd.maven
os-maven-plugin
${os-maven-plugin.version}
org.apache.maven.plugins
maven-dependency-plugin
${maven-dependency-plugin.version}
copy-flatc
generate-sources
copy
com.vlkan
flatc-${os.detected.classifier}
${fbs.version}
exe
true
${project.build.directory}
org.apache.maven.plugins
maven-antrun-plugin
${maven-antrun-plugin.version}
exec-flatc
generate-sources
run
org.codehaus.mojo
build-helper-maven-plugin
${build-helper-maven-plugin.version}
add-classes
generate-sources
add-source
${fbs.output.directory}
```
A Note on Versioning
====================
Official FlatBuffers project does not follow a versioning scheme as
of this writing. In order to the report the version of the used clone,
I used the following fields:
- the most recent Java API version (1.2.0-SNAPSHOT)
- the first 8 digits of the clone's last commit I had used to compile the binaries
License
=======
As is the case for the official FlatBuffers repository, this fork is also
licensed under the terms of Apache License, Version 2.0.