Skip to content

Conversation

hboutemy
Copy link

Copy link

quarkus-bot bot commented Nov 24, 2024

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@hboutemy hboutemy changed the title upgrade maven-shade-plugin Upgrade maven-shade-plugin Nov 24, 2024
@geoand geoand requested a review from gsmet November 25, 2024 08:43
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hboutemy Interesting, thanks, I wasn't aware of this effort and it's greatly appreciated. I'm extremely surprised this is not a lot worse as IIRC our code generation wasn't reproducible-friendly.

This comment has been minimized.

@gsmet
Copy link
Member

gsmet commented Nov 26, 2024

We have a test failure:

2024-11-25T14:55:15.1061583Z [INFO] --- protobuf:0.6.1:test-compile (test-compile) @ quarkus-integration-test-devmode ---
2024-11-25T14:55:15.2346236Z [INFO] Building protoc plugin: quarkus-grpc-protoc-plugin
2024-11-25T14:55:15.2755185Z [INFO] Compiling 1 proto file(s) to /home/runner/work/quarkus/quarkus/integration-tests/devmode/target/generated-test-sources/protobuf/java
2024-11-25T14:55:15.3458783Z [ERROR] PROTOC FAILED: Error: Could not find or load main class io.quarkus.grpc.protoc.plugin.MutinyGrpcGenerator
2024-11-25T14:55:15.3460388Z Caused by: java.lang.NoClassDefFoundError: com/salesforce/jprotoc/Generator
2024-11-25T14:55:15.3462242Z --quarkus-grpc-protoc-plugin_out: protoc-gen-quarkus-grpc-protoc-plugin: Plugin failed with status code 1.

I'm not entirely sure it was caused by this update but I don't remember it failing before so it looks suspicious.

@gsmet
Copy link
Member

gsmet commented Nov 26, 2024

Given this config in extensions/grpc/protoc, I think it's related:

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <createSourcesJar>true</createSourcesJar>
                            <shadedClassifierName>shaded</shadedClassifierName>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <filters>
                                <filter>
                                    <artifact>com.salesforce.servicelibs:jprotoc</artifact>
                                    <excludes>
                                        <exclude>com/google/protobuf/*</exclude>
                                        <exclude>com/google/protobuf/compiler/*</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

This comment has been minimized.

@gsmet
Copy link
Member

gsmet commented Nov 27, 2024

The other tests are not related to this change but integration-tests/devmode seems to be failing because of it. I don't understand as we are not actually using the shaded artifact and I checked locally and the class was in the created artifact.

I suppose it will require a closer look.

gsmet added a commit to gsmet/quarkus that referenced this pull request Jul 10, 2025
This update solves our reproducible build issue.

We can't go to 3.6.0 due to some weird issues:
java.lang.NoClassDefFoundError: com/salesforce/jprotoc/Generator

See quarkusio#44671
@gsmet
Copy link
Member

gsmet commented Jul 10, 2025

Closing in favor of #48870 .

@gsmet gsmet closed this Jul 10, 2025
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants