lhotari opened a new issue, #24433:
URL: https://github.com/apache/pulsar/issues/24433

   ### Search before reporting
   
   - [x] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Read release policy
   
   - [x] I understand that [unsupported 
versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions)
 don't get bug fixes. I will attempt to reproduce the issue on a supported 
version of Pulsar client and Pulsar broker.
   
   
   ### User environment
   
   maven 3.9.10
   
   ### Issue Description
   
   There's an error message "Imported proto 
pulsar-common/src/main/proto/PulsarApi.proto not found." when using 
lightproto-maven-plugin with maven 3.9.10. Below is an example execution that 
shows an example error. With maven 3.9.9, there is no such error.
   
   ### Error messages
   
   ```text
   ❯ mvn test -pl pulsar-broker -Dtest=RawReaderTest
   [INFO] Scanning for projects...
   [INFO] 
------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] 
------------------------------------------------------------------------
   [INFO] os.detected.name: osx
   [INFO] os.detected.arch: aarch_64
   [INFO] os.detected.bitness: 64
   [INFO] os.detected.version: 15.5
   [INFO] os.detected.version.major: 15
   [INFO] os.detected.version.minor: 5
   [INFO] os.detected.classifier: osx-aarch_64
   [INFO]
   [INFO] ------------------< org.apache.pulsar:pulsar-broker 
>-------------------
   [INFO] Building Pulsar Broker 3.0.12
   [INFO]   from pom.xml
   [INFO] --------------------------------[ jar 
]---------------------------------
   [INFO]
   [INFO] --- enforcer:3.3.0:enforce (enforce-maven-version) @ pulsar-broker ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO]
   [INFO] --- enforcer:3.3.0:enforce (enforce-java-version) @ pulsar-broker ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO]
   [INFO] --- enforcer:3.3.0:enforce (enforce-maven) @ pulsar-broker ---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO]
   [INFO] --- directory:1.0:directory-of (directories) @ pulsar-broker ---
   [INFO] Directory of org.apache.pulsar:pulsar set to: 
/Users/lari/workspace-pulsar/pulsar-branch-3.0
   [INFO]
   [INFO] --- git-commit-id:4.9.10:revision (git-info) @ pulsar-broker ---
   [INFO]
   [INFO] --- properties:1.1.0:set-system-properties (default) @ pulsar-broker 
---
   [INFO] Set 2 system properties
   [INFO]
   [INFO] --- protobuf:0.6.1:compile (default) @ pulsar-broker ---
   [INFO] Skipping compilation because target directory newer than sources.
   [INFO]
   [INFO] --- protobuf:0.6.1:test-compile (default) @ pulsar-broker ---
   [INFO] Skipping compilation because target directory newer than sources.
   [INFO]
   [INFO] --- lightproto:0.4:generate (default) @ pulsar-broker ---
   [ERROR] Failed to generate lightproto code for 
[/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/TransactionPendingAck.proto,
 
/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/ResourceUsage.proto,
 
/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/DelayedMessageIndexBucketSegment.proto]:
 java.lang.IllegalStateException: Imported proto 
pulsar-common/src/main/proto/PulsarApi.proto not found. (null)
   java.lang.RuntimeException: java.lang.IllegalStateException: Imported proto 
pulsar-common/src/main/proto/PulsarApi.proto not found. (null)
       at io.protostuff.parser.Proto.importProto (Proto.java:316)
       at io.protostuff.parser.ProtoParser.header_import (ProtoParser.java:1431)
       at io.protostuff.parser.ProtoParser.statement (ProtoParser.java:336)
       at io.protostuff.parser.ProtoParser.parse (ProtoParser.java:165)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:52)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:60)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:90)
       at com.github.splunk.lightproto.generator.LightProtoGenerator.generate 
(LightProtoGenerator.java:42)
       at com.github.splunk.lightproto.maven.plugin.LightProtoMojo.generate 
(LightProtoMojo.java:62)
       at com.github.splunk.lightproto.maven.plugin.LightProtoMojo.execute 
(LightProtoMojo.java:94)
       at com.gradle.maven.scan.extension.internal.d.b.executeMojo 
(SourceFile:116)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:328)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
       at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
       at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
       at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:73)
       at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:53)
       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:118)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
       at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
       at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
       at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
       at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:77)
       at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke (Method.java:569)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:255)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:201)
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:361)
       at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:314)
   Caused by: java.lang.IllegalStateException: Imported proto 
pulsar-common/src/main/proto/PulsarApi.proto not found. (null)
       at 
io.protostuff.parser.DefaultProtoLoader.searchFromProtoPathAndClasspath 
(DefaultProtoLoader.java:166)
       at io.protostuff.parser.DefaultProtoLoader.load 
(DefaultProtoLoader.java:111)
       at io.protostuff.parser.Proto.importProto (Proto.java:312)
       at io.protostuff.parser.ProtoParser.header_import (ProtoParser.java:1431)
       at io.protostuff.parser.ProtoParser.statement (ProtoParser.java:336)
       at io.protostuff.parser.ProtoParser.parse (ProtoParser.java:165)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:52)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:60)
       at io.protostuff.parser.ProtoUtil.loadFrom (ProtoUtil.java:90)
       at com.github.splunk.lightproto.generator.LightProtoGenerator.generate 
(LightProtoGenerator.java:42)
       at com.github.splunk.lightproto.maven.plugin.LightProtoMojo.generate 
(LightProtoMojo.java:62)
       at com.github.splunk.lightproto.maven.plugin.LightProtoMojo.execute 
(LightProtoMojo.java:94)
       at com.gradle.maven.scan.extension.internal.d.b.executeMojo 
(SourceFile:116)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:328)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:316)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:212)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:174)
       at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
(MojoExecutor.java:75)
       at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
(MojoExecutor.java:162)
       at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute 
(DefaultMojosExecutionStrategy.java:39)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:159)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:105)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:73)
       at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:53)
       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:118)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
       at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
       at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
       at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
       at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:77)
       at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke (Method.java:569)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:255)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:201)
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:361)
       at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:314)
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  1.771 s
   [INFO] Finished at: 2025-06-19T19:37:03+03:00
   [INFO] 
------------------------------------------------------------------------
   [INFO] 0 goals, 0 executed
   [ERROR] Failed to execute goal 
com.github.splunk.lightproto:lightproto-maven-plugin:0.4:generate (default) on 
project pulsar-broker: Failed to generate lightproto code for 
[/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/TransactionPendingAck.proto,
 
/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/ResourceUsage.proto,
 
/Users/lari/workspace-pulsar/pulsar-branch-3.0/pulsar-broker/src/main/proto/DelayedMessageIndexBucketSegment.proto]:
 java.lang.IllegalStateException: Imported proto 
pulsar-common/src/main/proto/PulsarApi.proto not found. (null) -> [Help 1]
   [ERROR]
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR]
   [ERROR] For more information about the errors and possible solutions, please 
read the following articles:
   [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
   ```
   
   ### Reproducing the issue
   
   Install maven 3.9.10 with SDKMAN
   ```shell
   sdk i maven 3.9.10
   ```
   
   ```shell
   # compilation works
   mvn -Pcore-modules,-main -T 1C clean install -DskipTests 
-Dspotbugs.skip=true -DnarPluginPhase=none
   # running tests doesn't
   mvn test -pl pulsar-broker -Dtest=RawReaderTest
   ```
   
   ### Additional information
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to