Merge pull request #17728 from protocolbuffers/cp-pom

Cherry pick changes to drop Java pom.xml files unused for release.
28.x-202408082011
zhangskz 7 months ago committed by GitHub
commit 83c0b480e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 43
      .github/workflows/test_java.yml
  2. 3
      java/core/BUILD.bazel
  3. 164
      java/core/pom.xml
  4. 1
      java/kotlin-lite/BUILD.bazel
  5. 237
      java/kotlin-lite/pom.xml
  6. 1
      java/lite/BUILD.bazel
  7. 358
      java/lite/pom.xml
  8. 1
      java/util/BUILD.bazel
  9. 173
      java/util/pom.xml

@ -69,7 +69,7 @@ jobs:
# # TODO: b/318555165 - enable the layering check. Currently it does
# # not work correctly with the toolchain in this Docker image.
# bazel: test --test_output=all //java:linkage_monitor --spawn_strategy=standalone --features=-layering_check
protobuf-bom:
name: Protobuf Maven BOM
runs-on: ubuntu-latest
@ -78,43 +78,22 @@ jobs:
uses: protocolbuffers/protobuf-ci/checkout@v3
with:
ref: ${{ inputs.safe-checkout }}
- name: Build protoc
id: build-protoc
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v3
with:
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
architecture: linux-x86_64
- name: Move protoc into place and clean up
run: |
mv ${{ steps.build-protoc.outputs.protoc }} protoc
sudo rm -rf _build
- name: Install snapshot version locally (not using generated pom.xml)
run: |
mvn -e -B -Dhttps.protocols=TLSv1.2 install -Dmaven.test.skip=true
working-directory: java
- name: Generate pom.xml files from the template
- name: Generate maven artifacts with bazel and install using maven
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: java_linux/11
# protobuf-java and protobuf-java-util are the member of the BOM
bash: |
bazel build //java/core:core_mvn-pom //java/util:util_mvn-pom
cp bazel-bin/java/core/core_mvn-pom.xml .
cp bazel-bin/java/util/util_mvn-pom.xml .
- name: Copy the generated pom.xml files to the local Maven repository
shell: bash
run: |
LOCAL_MAVEN_GROUP_DIR="${HOME}/.m2/repository/com/google/protobuf"
VERSION=$(grep "<version>" core_mvn-pom.xml | sed "s/<version>\(.*\)<\/version>/\1/" | xargs)
cp core_mvn-pom.xml ${LOCAL_MAVEN_GROUP_DIR}/protobuf-java/${VERSION}/protobuf-java-${VERSION}.pom
cp util_mvn-pom.xml ${LOCAL_MAVEN_GROUP_DIR}/protobuf-java-util/${VERSION}/protobuf-java-util-${VERSION}.pom
set -ex
bazel build //java:release
mvn install:install-file -Dfile=java/bom/pom.xml -DpomFile=java/bom/pom.xml
mvn install:install-file -Dfile=java/pom.xml -DpomFile=java/pom.xml
mvn install:install-file -Dfile=bazel-bin/java/core/core_mvn-project.jar -DpomFile=bazel-bin/java/core/core_mvn-pom.xml
mvn install:install-file -Dfile=bazel-bin/java/core/lite_mvn-project.jar -DpomFile=bazel-bin/java/core/lite_mvn-pom.xml
mvn install:install-file -Dfile=bazel-bin/java/kotlin-lite/kotlin-lite_mvn-project.jar -DpomFile=bazel-bin/java/kotlin-lite/kotlin-lite_mvn-pom.xml
mvn install:install-file -Dfile=bazel-bin/java/kotlin/kotlin_mvn-project.jar -DpomFile=bazel-bin/java/kotlin/kotlin_mvn-pom.xml
mvn install:install-file -Dfile=bazel-bin/java/util/util_mvn-project.jar -DpomFile=bazel-bin/java/util/util_mvn-pom.xml
- name: Clean up
run: |
sudo rm -rf _build
- name: Validate Protobuf BOM
uses: googleapis/java-cloud-bom/tests/validate-bom@fd56f04bb0bc581776a74031591f0b3bc5e7920a # v26.13.0
with:
bom-path: java/bom/pom.xml

@ -13,7 +13,6 @@ load("//java/internal:testing.bzl", "junit_tests")
load("//upb/cmake:build_defs.bzl", "staleness_test")
LITE_SRCS = [
# Keep in sync with `//java/lite:pom.xml`.
"src/main/java/com/google/protobuf/AbstractMessageLite.java",
"src/main/java/com/google/protobuf/AbstractParser.java",
"src/main/java/com/google/protobuf/AbstractProtobufList.java",
@ -523,7 +522,6 @@ protobuf_java_library(
)
LITE_TEST_EXCLUSIONS = [
# Keep in sync with //java/lite:pom.xml id=copy-test-source-files execution.
"src/test/java/com/google/protobuf/AbstractMessageTest.java",
"src/test/java/com/google/protobuf/AbstractProto2SchemaTest.java",
"src/test/java/com/google/protobuf/AnyTest.java",
@ -602,7 +600,6 @@ pkg_files(
"BUILD.bazel",
"generate-sources-build.xml",
"generate-test-sources-build.xml",
"pom.xml",
"pom_template.xml",
],
strip_prefix = strip_prefix.from_root(""),

@ -1,164 +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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>4.28.0</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>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</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>
<resource>
<directory>${protobuf.java_source.dir}</directory>
<includes>
<include>google/protobuf/java_features.proto</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>${protobuf.source.dir}</directory>
<includes>
<include>google/protobuf/testdata/golden_message_oneof_implemented</include>
<include>google/protobuf/testdata/golden_packed_fields_message</include>
</includes>
</testResource>
</testResources>
<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>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.sources.dir}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-generated-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.testsources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<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>
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -233,7 +233,6 @@ pkg_files(
"generate-sources-build.xml",
"generate-test-sources-build.xml",
"lite.awk",
"pom.xml",
"pom_template.xml",
"process-lite-sources-build.xml",
],

@ -1,237 +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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>4.28.0</version>
</parent>
<artifactId>protobuf-kotlin-lite</artifactId>
<name>Protocol Buffers [Kotlin-Lite]</name>
<description>
Lite version of Kotlin Protocol Buffers library. This version is optimized for code size, but does
not guarantee API/ABI stability.
</description>
<properties>
<kotlin.version>1.6.0</kotlin.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>protobuf-javalite</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>${protobuf.source.dir}</directory>
<includes>
<include>google/protobuf/testdata/golden_message_oneof_implemented</include>
<include>google/protobuf/testdata/golden_packed_fields_message</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-kotlin-source-files</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.sources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../kotlin/src/main/kotlin/com/google/protobuf</directory>
<includes>
<include>ByteStrings.kt</include>
<include>DslList.kt</include>
<include>DslMap.kt</include>
<include>DslProxy.kt</include>
<include>ExtensionList.kt</include>
<include>OnlyForUseByGeneratedProtoCode.kt</include>
<include>ProtoDslMarker.kt</include>
<include>UnmodifiableCollections.kt</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-test-source-files</id>
<phase>generate-test-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.testsources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../core/src/test/java/com/google/protobuf</directory>
<includes>
<include>TestUtilLite.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- 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>
<execution>
<id>process-lite-sources</id>
<phase>generate-test-sources</phase>
<configuration>
<target>
<ant antfile="process-lite-sources-build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.sources.dir}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-generated-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.testsources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>compile</id>
<goals> <goal>compile</goal> </goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${generated.sources.dir}</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<goals> <goal>test-compile</goal> </goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${generated.testsources.dir}</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -90,7 +90,6 @@ pkg_files(
"generate-sources-build.xml",
"generate-test-sources-build.xml",
"lite.awk",
"pom.xml",
"pom_template.xml",
"process-lite-sources-build.xml",
],

@ -1,358 +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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>4.28.0</version>
</parent>
<artifactId>protobuf-javalite</artifactId>
<packaging>bundle</packaging>
<name>Protocol Buffers [Lite]</name>
<description>
Lite version of Protocol Buffers library. This version is optimized for code size, but does
not guarantee API/ABI stability.
</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</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>
</includes>
</resource>
<resource>
<directory>${protobuf.java_source.dir}</directory>
<includes>
<include>google/protobuf/java_features.proto</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>${protobuf.source.dir}</directory>
<includes>
<include>google/protobuf/testdata/golden_message_oneof_implemented</include>
<include>google/protobuf/testdata/golden_packed_fields_message</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-source-files</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.sources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../core/src/main/java/com/google/protobuf</directory>
<includes>
<!-- Keep in sync with //java/core:BUILD -->
<include>AbstractMessageLite.java</include>
<include>AbstractParser.java</include>
<include>AbstractProtobufList.java</include>
<include>AllocatedBuffer.java</include>
<include>Android.java</include>
<include>ArrayDecoders.java</include>
<include>BinaryReader.java</include>
<include>BinaryWriter.java</include>
<include>BooleanArrayList.java</include>
<include>BufferAllocator.java</include>
<include>ByteBufferWriter.java</include>
<include>ByteOutput.java</include>
<include>ByteString.java</include>
<include>CanIgnoreReturnValue.java</include>
<include>CheckReturnValue.java</include>
<include>CodedInputStream.java</include>
<include>CodedInputStreamReader.java</include>
<include>CodedOutputStream.java</include>
<include>CodedOutputStreamWriter.java</include>
<include>CompileTimeConstant.java</include>
<include>DoubleArrayList.java</include>
<include>ExperimentalApi.java</include>
<include>ExtensionLite.java</include>
<include>ExtensionRegistryFactory.java</include>
<include>ExtensionRegistryLite.java</include>
<include>ExtensionSchema.java</include>
<include>ExtensionSchemaLite.java</include>
<include>ExtensionSchemas.java</include>
<include>FieldInfo.java</include>
<include>FieldSet.java</include>
<include>FieldType.java</include>
<include>FloatArrayList.java</include>
<include>GeneratedMessageInfoFactory.java</include>
<include>GeneratedMessageLite.java</include>
<include>InlineMe.java</include>
<include>IntArrayList.java</include>
<include>Internal.java</include>
<include>InvalidProtocolBufferException.java</include>
<include>IterableByteBufferInputStream.java</include>
<include>Java8Compatibility.java</include>
<include>JavaType.java</include>
<include>LazyField.java</include>
<include>LazyFieldLite.java</include>
<include>LazyStringArrayList.java</include>
<include>LazyStringList.java</include>
<include>ListFieldSchema.java</include>
<include>ListFieldSchemaLite.java</include>
<include>ListFieldSchemas.java</include>
<include>LongArrayList.java</include>
<include>ManifestSchemaFactory.java</include>
<include>MapEntryLite.java</include>
<include>MapFieldLite.java</include>
<include>MapFieldSchema.java</include>
<include>MapFieldSchemaLite.java</include>
<include>MapFieldSchemas.java</include>
<include>MessageInfo.java</include>
<include>MessageInfoFactory.java</include>
<include>MessageLite.java</include>
<include>MessageLiteOrBuilder.java</include>
<include>MessageLiteToString.java</include>
<include>MessageSchema.java</include>
<include>MessageSetSchema.java</include>
<include>MutabilityOracle.java</include>
<include>NewInstanceSchema.java</include>
<include>NewInstanceSchemaLite.java</include>
<include>NewInstanceSchemas.java</include>
<include>NioByteString.java</include>
<include>OneofInfo.java</include>
<include>Parser.java</include>
<include>PrimitiveNonBoxingCollection.java</include>
<include>ProtoSyntax.java</include>
<include>Protobuf.java</include>
<include>ProtobufArrayList.java</include>
<include>ProtocolStringList.java</include>
<include>RawMessageInfo.java</include>
<include>Reader.java</include>
<include>RopeByteString.java</include>
<include>RuntimeVersion.java</include>
<include>Schema.java</include>
<include>SchemaFactory.java</include>
<include>SchemaUtil.java</include>
<include>SmallSortedMap.java</include>
<include>StructuralMessageInfo.java</include>
<include>TextFormatEscaper.java</include>
<include>UninitializedMessageException.java</include>
<include>UnknownFieldSchema.java</include>
<include>UnknownFieldSetLite.java</include>
<include>UnknownFieldSetLiteSchema.java</include>
<include>UnmodifiableLazyStringList.java</include>
<include>UnsafeByteOperations.java</include>
<include>UnsafeUtil.java</include>
<include>Utf8.java</include>
<include>WireFormat.java</include>
<include>Writer.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-test-source-files</id>
<phase>generate-test-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${generated.testsources.dir}/com/google/protobuf</outputDirectory>
<resources>
<resource>
<directory>${basedir}/../core/src/test/java/com/google/protobuf</directory>
<!-- For sources, we want to be explicit about what we add so we don't accidentally
increase the size of the lite runtime library. For tests, we want to be defensive
and exclude only the full runtime exclusive tests so we don't accidentally miss
any test. -->
<excludes>
<!-- Keep in sync with //java/core:lite_tests BUILD rule. -->
<exclude>AbstractMessageTest.java</exclude>
<exclude>AbstractProto2SchemaTest.java</exclude>
<exclude>AnyTest.java</exclude>
<exclude>CodedInputStreamTest.java</exclude>
<exclude>DeprecatedFieldTest.java</exclude>
<exclude>DescriptorsTest.java</exclude>
<exclude>DiscardUnknownFieldsTest.java</exclude>
<exclude>DynamicMessageTest.java</exclude>
<exclude>ExtensionRegistryFactoryTest.java</exclude>
<exclude>FieldPresenceTest.java</exclude>
<exclude>ForceFieldBuildersPreRun.java</exclude>
<exclude>GeneratedMessageTest.java</exclude>
<exclude>LazyFieldTest.java</exclude>
<exclude>LazyStringEndToEndTest.java</exclude>
<exclude>LazilyParsedMessageSetTest.java</exclude>
<exclude>MapForProto2Test.java</exclude>
<exclude>MapTest.java</exclude>
<exclude>MessageTest.java</exclude>
<exclude>NestedBuildersTest.java</exclude>
<exclude>PackedFieldTest.java</exclude>
<exclude>ParserTest.java</exclude>
<exclude>ParseExceptionsTest.java</exclude>
<exclude>Proto2ExtensionLookupSchemaTest.java</exclude>
<exclude>Proto2SchemaTest.java</exclude>
<exclude>Proto2UnknownEnumValueTest.java</exclude>
<exclude>RepeatedFieldBuilderTest.java</exclude>
<exclude>ServiceTest.java</exclude>
<exclude>SingleFieldBuilderTest.java</exclude>
<exclude>TestBadIdentifiers.java</exclude>
<exclude>TextFormatParseInfoTreeTest.java</exclude>
<exclude>TextFormatParseLocationTest.java</exclude>
<exclude>TextFormatPerformanceTest.java</exclude>
<exclude>TextFormatTest.java</exclude>
<exclude>TestUtil.java</exclude>
<exclude>TypeRegistryTest.java</exclude>
<exclude>UnknownEnumValueTest.java</exclude>
<exclude>UnknownFieldSetLiteTest.java</exclude>
<exclude>UnknownFieldSetPerformanceTest.java</exclude>
<exclude>UnknownFieldSetTest.java</exclude>
<exclude>WellKnownTypesTest.java</exclude>
<exclude>WireFormatTest.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- 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>
<execution>
<id>process-lite-sources</id>
<phase>generate-test-sources</phase>
<configuration>
<target>
<ant antfile="process-lite-sources-build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.sources.dir}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-generated-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.testsources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<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>
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -105,7 +105,6 @@ pkg_files(
"src/test/**/*.proto",
]) + [
"BUILD.bazel",
"pom.xml",
"pom_template.xml",
],
strip_prefix = strip_prefix.from_root(""),

@ -1,173 +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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-parent</artifactId>
<version>4.28.0</version>
</parent>
<artifactId>protobuf-java-util</artifactId>
<packaging>bundle</packaging>
<name>Protocol Buffers [Util]</name>
<description>Utilities for Protocol Buffers</description>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>2.8</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<!-- Use the core proto dir so that we can call the core generation script -->
<test.proto.dir>../core/src/test/proto</test.proto.dir>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Generate the test protos -->
<execution>
<id>generate-test-sources</id>
<phase>generate-test-sources</phase>
<configuration>
<target>
<!-- Generate all of the test protos from the core module -->
<ant antfile="../core/generate-test-sources-build.xml"/>
<!-- Generate additional test protos for this module -->
<exec executable="${protoc}">
<arg value="--java_out=${generated.testsources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=src/test/proto"/>
<arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/>
<arg value="src/test/proto/com/google/protobuf/util/json_test_proto2.proto"/>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Add the generated test sources to the build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-generated-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.testsources.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<signature>
<groupId>net.sf.androidscents.signature</groupId>
<artifactId>android-api-level-21</artifactId>
<version>5.0.1_r2</version>
</signature>
</configuration>
<executions>
<execution>
<id>android</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Configure the OSGI bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf.util</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName>
<Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package>
</instructions>
</configuration>
</plugin>
<!-- Configure the fat jar to include all dependencies -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading…
Cancel
Save