Skip to content

Commit

Permalink
GH-164: Try to reproduce transitive dependency conflicts from GH-164.
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Apr 20, 2024
1 parent 0035863 commit 181a23d
Show file tree
Hide file tree
Showing 10 changed files with 523 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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>gh-164-transitive-dependency-conflicts</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

<artifactId>channel-protos</artifactId>
<packaging>pom</packaging>

<dependencies>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<version>${proto-google-common-protos.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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>gh-164-transitive-dependency-conflicts</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

<artifactId>fancy-project</artifactId>
<!-- Purposely skip Java compilation phases -->
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>@project.groupId@</groupId>
<artifactId>@project.artifactId@</artifactId>

<configuration>
<importDependencies>
<!--
Purposely do not include this on the Maven project dependency path to reproduce this issue.
We must include it in the sourceDependency objects though to replicate the issue.
-->
<importDependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<version>${proto-google-common-protos.version}</version>
</importDependency>
</importDependencies>

<sourceDependencies>
<sourceDependency>
<groupId>${project.groupId}</groupId>
<artifactId>channel-protos</artifactId>
<version>${project.version}</version>
<classifier>zip</classifier>
<type>zip</type>
<dependencyResolutionDepth>TRANSITIVE</dependencyResolutionDepth>
</sourceDependency>

<sourceDependency>
<groupId>${project.groupId}</groupId>
<artifactId>message-protos</artifactId>
<version>${project.version}</version>
<classifier>zip</classifier>
<type>zip</type>
<dependencyResolutionDepth>TRANSITIVE</dependencyResolutionDepth>
</sourceDependency>

<sourceDependency>
<groupId>${project.groupId}</groupId>
<artifactId>user-protos</artifactId>
<version>${project.version}</version>
<classifier>zip</classifier>
<type>zip</type>
<dependencyResolutionDepth>TRANSITIVE</dependencyResolutionDepth>
</sourceDependency>
</sourceDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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>gh-164-transitive-dependency-conflicts</groupId>
<artifactId>parent</artifactId>
<version>@project.version@</version>
</parent>

<artifactId>message-protos</artifactId>
<packaging>pom</packaging>

<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -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;
}
Loading

0 comments on commit 181a23d

Please sign in to comment.