• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"
3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5  <modelVersion>4.0.0</modelVersion>
6  <parent>
7    <groupId>com.google.protobuf</groupId>
8    <artifactId>protobuf-parent</artifactId>
9    <version>3.0.0-beta-3</version>
10  </parent>
11
12  <artifactId>protobuf-java</artifactId>
13  <packaging>bundle</packaging>
14
15  <name>Protocol Buffers [Core]</name>
16  <description>
17    Core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
18    efficient yet extensible format.
19  </description>
20
21  <dependencies>
22    <dependency>
23      <groupId>junit</groupId>
24      <artifactId>junit</artifactId>
25    </dependency>
26    <dependency>
27      <groupId>org.easymock</groupId>
28      <artifactId>easymock</artifactId>
29    </dependency>
30    <dependency>
31      <groupId>org.easymock</groupId>
32      <artifactId>easymockclassextension</artifactId>
33    </dependency>
34  </dependencies>
35
36  <build>
37    <!-- Include core protos in the bundle as resources -->
38    <resources>
39      <resource>
40        <directory>${protobuf.source.dir}</directory>
41        <includes>
42          <include>google/protobuf/any.proto</include>
43          <include>google/protobuf/api.proto</include>
44          <include>google/protobuf/descriptor.proto</include>
45          <include>google/protobuf/duration.proto</include>
46          <include>google/protobuf/empty.proto</include>
47          <include>google/protobuf/field_mask.proto</include>
48          <include>google/protobuf/source_context.proto</include>
49          <include>google/protobuf/struct.proto</include>
50          <include>google/protobuf/timestamp.proto</include>
51          <include>google/protobuf/type.proto</include>
52          <include>google/protobuf/wrappers.proto</include>
53          <include>google/protobuf/compiler/plugin.proto</include>
54        </includes>
55      </resource>
56    </resources>
57
58    <plugins>
59      <!-- Use Antrun plugin to generate sources with protoc -->
60      <plugin>
61        <artifactId>maven-antrun-plugin</artifactId>
62        <executions>
63          <!-- Generate core protos -->
64          <execution>
65            <id>generate-sources</id>
66            <phase>generate-sources</phase>
67            <configuration>
68              <target>
69                <ant antfile="generate-sources-build.xml"/>
70              </target>
71            </configuration>
72            <goals>
73              <goal>run</goal>
74            </goals>
75          </execution>
76
77          <!-- Generate the test protos -->
78          <execution>
79            <id>generate-test-sources</id>
80            <phase>generate-test-sources</phase>
81            <configuration>
82              <target>
83                <ant antfile="generate-test-sources-build.xml"/>
84              </target>
85            </configuration>
86            <goals>
87              <goal>run</goal>
88            </goals>
89          </execution>
90        </executions>
91      </plugin>
92
93      <!-- Add the generated sources to the build -->
94      <plugin>
95        <artifactId>maven-compiler-plugin</artifactId>
96        <configuration>
97          <generatedSourcesDirectory>${generated.sources.dir}</generatedSourcesDirectory>
98          <generatedTestSourcesDirectory>${generated.testsources.dir}</generatedTestSourcesDirectory>
99        </configuration>
100      </plugin>
101
102      <!-- OSGI bundle configuration -->
103      <plugin>
104        <groupId>org.apache.felix</groupId>
105        <artifactId>maven-bundle-plugin</artifactId>
106        <extensions>true</extensions>
107        <configuration>
108          <instructions>
109            <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
110            <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
111            <Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
112          </instructions>
113        </configuration>
114      </plugin>
115    </plugins>
116  </build>
117
118</project>
119