blob: 838f4a71310eea93fde6d8e35189141fef3d1b20 [file] [log] [blame]
nmittler49efe9d2016-01-08 09:19:11 -08001<?xml version="1.0" encoding="UTF-8"?>
Hao Nguyen9349e232018-12-14 15:05:48 -08002<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">
nmittler49efe9d2016-01-08 09:19:11 -08003 <modelVersion>4.0.0</modelVersion>
4 <parent>
5 <groupId>com.google.protobuf</groupId>
6 <artifactId>protobuf-parent</artifactId>
Adam Cozzette0dab03b2021-10-04 17:43:33 -07007 <version>3.18.1</version>
nmittler49efe9d2016-01-08 09:19:11 -08008 </parent>
9
10 <artifactId>protobuf-java</artifactId>
11 <packaging>bundle</packaging>
12
13 <name>Protocol Buffers [Core]</name>
14 <description>
15 Core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an
16 efficient yet extensible format.
17 </description>
18
19 <dependencies>
20 <dependency>
21 <groupId>junit</groupId>
22 <artifactId>junit</artifactId>
Josh Haberman496cd482017-03-15 18:27:05 -070023 <scope>test</scope>
nmittler49efe9d2016-01-08 09:19:11 -080024 </dependency>
25 <dependency>
26 <groupId>org.easymock</groupId>
27 <artifactId>easymock</artifactId>
Josh Haberman496cd482017-03-15 18:27:05 -070028 <scope>test</scope>
nmittler49efe9d2016-01-08 09:19:11 -080029 </dependency>
30 <dependency>
31 <groupId>org.easymock</groupId>
32 <artifactId>easymockclassextension</artifactId>
Josh Haberman496cd482017-03-15 18:27:05 -070033 <scope>test</scope>
nmittler49efe9d2016-01-08 09:19:11 -080034 </dependency>
Feng Xiaoacd5b052018-08-09 21:21:01 -070035 <dependency>
36 <groupId>com.google.guava</groupId>
37 <artifactId>guava</artifactId>
38 <scope>test</scope>
39 </dependency>
Donald Chai175ddfc2019-10-22 20:03:51 -070040 <dependency>
41 <groupId>com.google.truth</groupId>
42 <artifactId>truth</artifactId>
43 <scope>test</scope>
44 </dependency>
nmittler49efe9d2016-01-08 09:19:11 -080045 </dependencies>
46
47 <build>
48 <!-- Include core protos in the bundle as resources -->
49 <resources>
50 <resource>
51 <directory>${protobuf.source.dir}</directory>
52 <includes>
53 <include>google/protobuf/any.proto</include>
54 <include>google/protobuf/api.proto</include>
55 <include>google/protobuf/descriptor.proto</include>
56 <include>google/protobuf/duration.proto</include>
57 <include>google/protobuf/empty.proto</include>
58 <include>google/protobuf/field_mask.proto</include>
59 <include>google/protobuf/source_context.proto</include>
60 <include>google/protobuf/struct.proto</include>
61 <include>google/protobuf/timestamp.proto</include>
62 <include>google/protobuf/type.proto</include>
63 <include>google/protobuf/wrappers.proto</include>
64 <include>google/protobuf/compiler/plugin.proto</include>
65 </includes>
66 </resource>
67 </resources>
Feng Xiaoacd5b052018-08-09 21:21:01 -070068 <testResources>
69 <testResource>
70 <directory>${protobuf.source.dir}</directory>
71 <includes>
72 <include>google/protobuf/testdata/golden_message_oneof_implemented</include>
73 <include>google/protobuf/testdata/golden_packed_fields_message</include>
74 </includes>
75 </testResource>
76 </testResources>
nmittler49efe9d2016-01-08 09:19:11 -080077
78 <plugins>
79 <!-- Use Antrun plugin to generate sources with protoc -->
80 <plugin>
81 <artifactId>maven-antrun-plugin</artifactId>
82 <executions>
83 <!-- Generate core protos -->
84 <execution>
85 <id>generate-sources</id>
86 <phase>generate-sources</phase>
87 <configuration>
88 <target>
89 <ant antfile="generate-sources-build.xml"/>
90 </target>
91 </configuration>
92 <goals>
93 <goal>run</goal>
94 </goals>
95 </execution>
96
97 <!-- Generate the test protos -->
98 <execution>
99 <id>generate-test-sources</id>
100 <phase>generate-test-sources</phase>
101 <configuration>
102 <target>
103 <ant antfile="generate-test-sources-build.xml"/>
104 </target>
105 </configuration>
106 <goals>
107 <goal>run</goal>
108 </goals>
109 </execution>
110 </executions>
111 </plugin>
112
113 <!-- Add the generated sources to the build -->
114 <plugin>
Christopher Tubbseb7f3a32016-11-04 02:11:55 -0400115 <groupId>org.codehaus.mojo</groupId>
116 <artifactId>build-helper-maven-plugin</artifactId>
117 <executions>
118 <execution>
119 <id>add-generated-sources</id>
120 <phase>generate-sources</phase>
121 <goals>
122 <goal>add-source</goal>
123 </goals>
124 <configuration>
125 <sources>
126 <source>${generated.sources.dir}</source>
127 </sources>
128 </configuration>
129 </execution>
130 <execution>
131 <id>add-generated-test-sources</id>
132 <phase>generate-test-sources</phase>
133 <goals>
134 <goal>add-test-source</goal>
135 </goals>
136 <configuration>
137 <sources>
138 <source>${generated.testsources.dir}</source>
139 </sources>
140 </configuration>
141 </execution>
142 </executions>
nmittler49efe9d2016-01-08 09:19:11 -0800143 </plugin>
144
145 <!-- OSGI bundle configuration -->
146 <plugin>
147 <groupId>org.apache.felix</groupId>
148 <artifactId>maven-bundle-plugin</artifactId>
149 <extensions>true</extensions>
150 <configuration>
151 <instructions>
Florian Enner405b6182019-08-26 16:10:45 +0200152 <Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
nmittler49efe9d2016-01-08 09:19:11 -0800153 <Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
154 <Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
155 <Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
Vasiliy Kudryavtseveea72012017-03-09 15:50:58 +0300156 <Import-Package>sun.misc;resolution:=optional,*</Import-Package>
nmittler49efe9d2016-01-08 09:19:11 -0800157 </instructions>
158 </configuration>
159 </plugin>
160 </plugins>
161 </build>
162
Hao Nguyen4b02f652018-12-14 15:10:11 -0800163</project>