Merge pull request #1121 from nmittler/restructure
Restructuring protobuf to multiple modules
This commit is contained in:
commit
b6ef4015d7
20
java/core/generate-sources-build.xml
Normal file
20
java/core/generate-sources-build.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<project name="generate-sources">
|
||||
<echo message="Running protoc ..."/>
|
||||
<mkdir dir="${generated.sources.dir}"/>
|
||||
<exec executable="${protoc}">
|
||||
<arg value="--java_out=${generated.sources.dir}"/>
|
||||
<arg value="--proto_path=${protobuf.source.dir}"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/any.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/api.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/descriptor.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/duration.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/empty.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/field_mask.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/source_context.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/struct.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/timestamp.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/type.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/wrappers.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/compiler/plugin.proto"/>
|
||||
</exec>
|
||||
</project>
|
43
java/core/generate-test-sources-build.xml
Normal file
43
java/core/generate-test-sources-build.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<project name="generate-test-sources">
|
||||
<mkdir dir="${generated.testsources.dir}"/>
|
||||
<exec executable="${protoc}">
|
||||
<arg value="--java_out=${generated.testsources.dir}"/>
|
||||
<arg value="--proto_path=${protobuf.source.dir}"/>
|
||||
<arg value="--proto_path=${test.proto.dir}"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset_wire_format.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_custom_options.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_lite.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public_lite.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite_imports_nonlite.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_enormous_descriptor.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
|
||||
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/lazy_fields_lite.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/lite_equals_and_hash.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/multiple_files_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/nested_builders_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/nested_extension.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/nested_extension_lite.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/non_nested_extension.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/non_nested_extension_lite.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test2.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test3.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/test_bad_identifiers.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/test_check_utf8.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/test_check_utf8_size.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/test_custom_options.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/any_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/field_presence_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_lite_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/map_test.proto"/>
|
||||
<arg value="${test.proto.dir}/com/google/protobuf/map_initialization_order_test.proto"/>
|
||||
</exec>
|
||||
</project>
|
118
java/core/pom.xml
Normal file
118
java/core/pom.xml
Normal file
@ -0,0 +1,118 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-parent</artifactId>
|
||||
<version>3.0.0-beta-2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
|
||||
<name>Protocol Buffers [Core]</name>
|
||||
<description>
|
||||
Core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
|
||||
efficient yet extensible format.
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymockclassextension</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- Include core protos in the bundle as resources -->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${protobuf.source.dir}</directory>
|
||||
<includes>
|
||||
<include>google/protobuf/any.proto</include>
|
||||
<include>google/protobuf/api.proto</include>
|
||||
<include>google/protobuf/descriptor.proto</include>
|
||||
<include>google/protobuf/duration.proto</include>
|
||||
<include>google/protobuf/empty.proto</include>
|
||||
<include>google/protobuf/field_mask.proto</include>
|
||||
<include>google/protobuf/source_context.proto</include>
|
||||
<include>google/protobuf/struct.proto</include>
|
||||
<include>google/protobuf/timestamp.proto</include>
|
||||
<include>google/protobuf/type.proto</include>
|
||||
<include>google/protobuf/wrappers.proto</include>
|
||||
<include>google/protobuf/compiler/plugin.proto</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<!-- Use Antrun plugin to generate sources with protoc -->
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<!-- Generate core protos -->
|
||||
<execution>
|
||||
<id>generate-sources</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="generate-sources-build.xml"/>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<!-- Generate the test protos -->
|
||||
<execution>
|
||||
<id>generate-test-sources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<ant antfile="generate-test-sources-build.xml"/>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Add the generated sources to the build -->
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<generatedSourcesDirectory>${generated.sources.dir}</generatedSourcesDirectory>
|
||||
<generatedTestSourcesDirectory>${generated.testsources.dir}</generatedTestSourcesDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- OSGI bundle configuration -->
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
|
||||
<Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
|
||||
<Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user