Revert "Create a maven like project structure for java development. Make it OSGi compliant. Generate the flatbuffers code for testing (example)."

This reverts commit 9875b0e0f8.
This commit is contained in:
Romain Gilles 2016-07-05 11:38:17 +02:00
parent 9875b0e0f8
commit cc2b04ce1c
10 changed files with 10 additions and 233 deletions

4
.gitignore vendored
View File

@ -54,8 +54,8 @@ build/Xcode/FlatBuffers.xcodeproj/project.xcworkspace/**
build/Xcode/FlatBuffers.xcodeproj/xcuserdata/** build/Xcode/FlatBuffers.xcodeproj/xcuserdata/**
FlatBuffers.xcodeproj/ FlatBuffers.xcodeproj/
java/.idea java/.idea
*.iml java/*.iml
target java/target
**/*.pyc **/*.pyc
.idea .idea
build/VS2010/FlatBuffers.sdf build/VS2010/FlatBuffers.sdf

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>com.google.flatbuffers</groupId>
<artifactId>flatbuffers</artifactId>
<version>1.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>flatbuffers-java</artifactId>
<packaging>bundle</packaging>
<name>FlatBuffers Java API</name>
<description>
Memory Efficient Serialization Library
</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<flatbuffers.root.dir>${basedir}/../..</flatbuffers.root.dir>
<generated.test.sources.directory>${project.build.directory}/generated-test-sources/flatbuffers
</generated.test.sources.directory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${flatbuffers.root.dir}/flatc</executable>
<arguments>
<argument>--java</argument>
<argument>-o</argument>
<argument>${generated.test.sources.directory}</argument>
<argument>${basedir}/src/test/fbs/test.fbs</argument>
</arguments>
<testSourceRoot>${generated.test.sources.directory}</testSourceRoot>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,19 +0,0 @@
namespace com.google.flatbuffer.test;
table MyTable
{
foo:int;
}
enum MyEnum:byte
{
A, B, C
}
struct MyStruct
{
a:int;
b:int;
}
root_type MyTable;

View File

@ -1,25 +0,0 @@
package com.google.flatbuffers.test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import org.junit.Test;
import com.google.flatbuffer.test.MyTable;
import com.google.flatbuffers.FlatBufferBuilder;
/**
* Dummy Test to demo JUnit usage.
*/
public class DummyTest {
@Test
public void testDummy() {
FlatBufferBuilder builder = new FlatBufferBuilder();
int tableOffSet = MyTable.createMyTable(builder, 42);
MyTable.finishMyTableBuffer(builder, tableOffSet);
MyTable myTable = MyTable.getRootAsMyTable(builder.dataBuffer());
assertThat(myTable.foo(), is(42));
}
}

View File

@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>com.google.flatbuffers</groupId>
<artifactId>flatbuffers</artifactId>
<version>1.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>flatbuffers-jmh</artifactId>
<packaging>jar</packaging>
<name>FlatBuffers JMH micro-benchmark</name>
<description>
Micro benchmark to help in technical design decisions.
</description>
<properties>
<jmh.version>1.12</jmh.version>
<uberjar.name>benchmarks</uberjar.name>
</properties>
<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>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<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>
<!--
Shading signed JARs will fail without this.
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-->
<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>
</plugins>
</build>
</project>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.google.flatbuffers</groupId> <groupId>com.google.flatbuffers</groupId>
<artifactId>flatbuffers</artifactId> <artifactId>flatbuffers-java</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.3.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>jar</packaging>
<name>FlatBuffers</name> <name>FlatBuffers Java API</name>
<description> <description>
Memory Efficient Serialization Library Memory Efficient Serialization Library
</description> </description>
@ -30,47 +30,10 @@
scm:git:https://github.com/google/flatbuffers.git scm:git:https://github.com/google/flatbuffers.git
</connection> </connection>
</scm> </scm>
<dependencies>
<prerequisites> </dependencies>
<maven>3.0</maven>
</prerequisites>
<modules>
<module>flatbuffers</module>
<module>jmh</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
</dependencyManagement>
<build> <build>
<pluginManagement> <sourceDirectory>./</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>