<@U078Y59KC3B> how do i see `pulsar-client` source...
# ask-ai
i
@RunLLM how do i see
pulsar-client
sources in my IDE? the sources jar for
pulsar-client
appears to not contain sources as per this issue. The last comment mentions
pulsar-client-all
rather than
pulsar-client
though
r
The
pulsar-client
and
pulsar-client-admin
JARs are shaded and their source JARs are typically empty, as described in this issue and another related issue. To view the actual source code in your IDE, you should use the
pulsar-client-original
artifact, which contains the unshaded sources. Download the
pulsar-client-original
source JAR and configure your IDE to use it for debugging and code navigation. The last comment about
pulsar-client-all
refers to a shaded JAR that combines both client and admin, but it does not solve the source code visibility problem. For source code, always use the
pulsar-client-original
artifact as explained in the linked issues. Would you like more detail on how to configure your IDE with the
pulsar-client-original
sources? Sources: - Bug: Current maven pulsar-client source jar empty - Source jars do not contain any source code 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
i
@RunLLM yes, please give me more detail on how to configure my IDE (intellij) with the sources. if it matters, my project is using sbt
r
To configure IntelliJ IDEA to show Pulsar client sources when using SBT, follow these steps: 1. Add the correct dependency: In your
build.sbt
, add the
pulsar-client-original
dependency (not just
pulsar-client
). For example:
Copy code
libraryDependencies += "org.apache.pulsar" % "pulsar-client-original" % "4.0.0"
Replace the version as needed. 2. Refresh SBT project: In IntelliJ, click the "Refresh" button in the SBT tool window to re-import dependencies. IntelliJ will attempt to download the source JAR for
pulsar-client-original
automatically. 3. Verify source attachment: - Open a class from the Pulsar client (e.g.,
org.apache.pulsar.client.api.PulsarClient
). - If sources are attached, you should see the actual Java code, not just decompiled bytecode. - If not, right-click the class name and select "Download Sources" (IntelliJ will try to fetch the source JAR from Maven Central). 4. Troubleshooting: - If sources are still not visible, manually download the
pulsar-client-original-<version>-sources.jar
from Maven Central. - In IntelliJ, go to "Project Structure" > "Libraries", find the
pulsar-client-original
entry, and attach the downloaded source JAR. This approach is necessary because, as noted in this issue, the regular
pulsar-client
source JAR is empty, but
pulsar-client-original
contains the actual sources. Sources: - Source jars do not contain any source code - this issue 👍 1 button 👎 0 button 💡 Hint: Mention @RunLLM in the thread for followups.