From 181a23d0dbb8d705c64fde8c85ae1f44f615a9c5 Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Sat, 20 Apr 2024 18:41:39 +0100 Subject: [PATCH] GH-164: Try to reproduce transitive dependency conflicts from GH-164. --- .../channel-protos/pom.xml | 49 +++++++ .../src/zip/channels/channel.proto | 36 ++++++ .../chat-platform-models/pom.xml | 85 ++++++++++++ .../invoker.properties | 22 ++++ .../message-protos/pom.xml | 49 +++++++ .../src/zip/messages/message.proto | 44 +++++++ .../pom.xml | 122 ++++++++++++++++++ .../user-protos/pom.xml | 49 +++++++ .../user-protos/src/zip/users/avatar.proto | 33 +++++ .../user-protos/src/zip/users/user.proto | 34 +++++ 10 files changed, 523 insertions(+) create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/pom.xml create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/src/zip/channels/channel.proto create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/chat-platform-models/pom.xml create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/invoker.properties create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/pom.xml create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/src/zip/messages/message.proto create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/pom.xml create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/pom.xml create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/avatar.proto create mode 100644 protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/user.proto diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/pom.xml b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/pom.xml new file mode 100644 index 00000000..de61fe4e --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/pom.xml @@ -0,0 +1,49 @@ + + + + 4.0.0 + + + gh-164-transitive-dependency-conflicts + parent + @project.version@ + + + channel-protos + pom + + + + com.google.api.grpc + proto-google-common-protos + ${proto-google-common-protos.version} + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/src/zip/channels/channel.proto b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/src/zip/channels/channel.proto new file mode 100644 index 00000000..6b56b23d --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/channel-protos/src/zip/channels/channel.proto @@ -0,0 +1,36 @@ +// +// Copyright (C) 2023 - 2024, Ashley Scopes. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package channels; + +option java_multiple_files = true; +option java_package = "org.example.channels"; + +import "google/protobuf/timestamp.proto"; +import "google/type/color.proto"; +import "users/user.proto"; + +message Channel { + string id = 1; + string name = 2; + google.protobuf.Timestamp created_at = 3; + optional google.protobuf.Timestamp updated_at = 4; + users.User owner = 5; + repeated users.User members = 6; + google.type.Color channel_banner_color = 7; +} diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/chat-platform-models/pom.xml b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/chat-platform-models/pom.xml new file mode 100644 index 00000000..fda8597a --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/chat-platform-models/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + + gh-164-transitive-dependency-conflicts + parent + @project.version@ + + + fancy-project + + pom + + + + + @project.groupId@ + @project.artifactId@ + + + + + + com.google.api.grpc + proto-google-common-protos + ${proto-google-common-protos.version} + + + + + + ${project.groupId} + channel-protos + ${project.version} + zip + zip + TRANSITIVE + + + + ${project.groupId} + message-protos + ${project.version} + zip + zip + TRANSITIVE + + + + ${project.groupId} + user-protos + ${project.version} + zip + zip + TRANSITIVE + + + + + + + diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/invoker.properties b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/invoker.properties new file mode 100644 index 00000000..3edcca43 --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/invoker.properties @@ -0,0 +1,22 @@ +# +# Copyright (C) 2023 - 2024, Ashley Scopes. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +invoker.goals.0=clean +invoker.goals.1=install --projects . --non-recursive +invoker.goals.2=install --projects ./channel-protos +invoker.goals.3=install --projects ./message-protos +invoker.goals.4=install --projects ./user-protos +invoker.goals.5=package --projects ./chat-platform-models diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/pom.xml b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/pom.xml new file mode 100644 index 00000000..8133a7d5 --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/pom.xml @@ -0,0 +1,49 @@ + + + + 4.0.0 + + + gh-164-transitive-dependency-conflicts + parent + @project.version@ + + + message-protos + pom + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/src/zip/messages/message.proto b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/src/zip/messages/message.proto new file mode 100644 index 00000000..cd58718c --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/message-protos/src/zip/messages/message.proto @@ -0,0 +1,44 @@ +// +// Copyright (C) 2023 - 2024, Ashley Scopes. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package messages; + +option java_multiple_files = true; +option java_package = "org.example.messages"; + +import "google/protobuf/timestamp.proto"; +import "channels/channel.proto"; +import "users/user.proto"; + +message CommentMessage { + string id = 1; + string contents = 2; + google.protobuf.Timestamp created_at = 3; + optional google.protobuf.Timestamp updated_at = 4; + users.User author = 5; +} + +message ChannelMessage { + string id = 1; + string contents = 2; + google.protobuf.Timestamp created_at = 3; + optional google.protobuf.Timestamp updated_at = 4; + users.User author = 5; + channels.Channel channel = 6; + repeated CommentMessage comments = 7; +} diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/pom.xml b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/pom.xml new file mode 100644 index 00000000..e0c6c169 --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/pom.xml @@ -0,0 +1,122 @@ + + + + 4.0.0 + + + @project.groupId@ + protobuf-maven-plugin-parent + @project.version@ + ../../../../pom.xml + + + gh-164-transitive-dependency-conflicts + parent + pom + + + channel-protos + message-protos + user-protos + + + chat-platform-models + + + + 3.25.3 + 2.38.0 + + + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + com.google.api.grpc + proto-google-common-protos + ${proto-google-common-protos.version} + + + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + + + ${protobuf.version} + + + + + + generate + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + + zip + + . + + zip + + + + ./ + src/zip + + + + + + + + + assemble-zip + package + + single + + + + + + + + diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/pom.xml b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/pom.xml new file mode 100644 index 00000000..ffb33f3f --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/pom.xml @@ -0,0 +1,49 @@ + + + + 4.0.0 + + + gh-164-transitive-dependency-conflicts + parent + @project.version@ + + + user-protos + pom + + + + com.google.protobuf + protobuf-java + ${protobuf.version} + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + + diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/avatar.proto b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/avatar.proto new file mode 100644 index 00000000..0870a40a --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/avatar.proto @@ -0,0 +1,33 @@ +// +// Copyright (C) 2023 - 2024, Ashley Scopes. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package users; + +option java_multiple_files = true; +option java_package = "org.example.users"; + +enum AvatarFormat { + PNG = 0; + WEBP = 1; + SVG = 2; +} + +message Avatar { + string binary_data = 1; + AvatarFormat format = 2; +} diff --git a/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/user.proto b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/user.proto new file mode 100644 index 00000000..e1d68db8 --- /dev/null +++ b/protobuf-maven-plugin/src/it/gh-164-transitive-dependency-conflicts/user-protos/src/zip/users/user.proto @@ -0,0 +1,34 @@ +// +// Copyright (C) 2023 - 2024, Ashley Scopes. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package users; + +option java_multiple_files = true; +option java_package = "org.example.users"; + +import "google/protobuf/timestamp.proto"; +import "users/avatar.proto"; + +message User { + string id = 1; + string name = 2; + optional string nickname = 3; + google.protobuf.Timestamp created_at = 4; + optional google.protobuf.Timestamp updated_at = 5; + optional users.Avatar avatar = 6; +}