New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add agent jar to maven central #108
Comments
Thanks for kind words. Check out https://github.com/michel-kraemer/gradle-download-task and let me know if that is what you're looking for. I haven't used it, but looks like you could use it to download and unzip directly from https://github.com/glowroot/glowroot/releases/download/v0.9.1/glowroot-0.9.1-dist.zip |
Hi @trask , thanks for the suggestion for the gradle tool to download from github. I'll take a look. My main reasons for wanting to pull the glowroot agent from a maven repo are:
|
Thanks for the convincing details. I'll update the build script soon to start deploying the agent distribution zip to the sonatype snapshot repo (and maven central on next release). |
The agent zip is now being deployed to the sonatype snapshot repo, e.g. https://oss.sonatype.org/content/repositories/snapshots/org/glowroot/glowroot-agent/0.9.2-SNAPSHOT/glowroot-agent-0.9.2-20160826.025002-1-dist.zip. It will be deployed to maven central starting with 0.9.2 release. |
Hi @trask , thanks for accepting this enhancement! I saw your 0.9.2 release and gave it a try. I made a sample project to demonstrate usage from gradle: https://github.com/kpage/gradle-glowroot The default task of that project just downloads and unzips glowroot from maven central. If you think it would be useful, I could provide a complete sample of a gradle-configured spring boot app like Spring PetClinic running with glowroot. I ran into a few issues with the classifier and pom.xml declaring transitive dependencies that are not in maven central. Let me know if you are interested in contributions for simplifying the packaging for maven, something like this is a good example of packaging of a javaagent that is easy to consume from maven and maven-compatible clients (gradle): https://repo1.maven.org/maven2/org/stagemonitor/stagemonitor-javaagent/0.22.0/ This packaging is easier to use because the pom.xml does not declare missing transitive dependencies (for java agents, typically you just want the one agent jar, not any dependencies) and the agent jar is using the standard maven naming, so does not require a classifier. Also it's not zipped so the unzipping step is not necessary. Thanks again, just a minor issue but I am happy to help look into the glowroot config if you don't have the time to do it. |
Re-opening. Good point about the transitive dependencies, I missed that. Deploying the zip (under dist classifier) to maven central serves a couple purposes, (1) make it clear it should not be used as a regular build dependency, (2) bundles the LICENSE and NOTICE files, though those files are also already inside the jar file, so (2) is not critical. Really, (1) is not critical either. I see your point about simplicity of just downloading the jar file (no classifier, no unzipping). |
kpage commentedAug 20, 2016
Hi @trask , great work, glowroot has been very useful to my team!
I package the glowroot jar with my app and our startup script automatically registers it as a javaagent. I'm using gradle to generate our distribution, so it's easy to grab jars from maven repos and package them with the app.
For now I have been manually downloading the glowroot releases from github and uploading them to our private Nexus repo. I was wondering if you have any plans to publish glowroot to a public maven repo? I saw that some older versions are in the sonatype oss repo, but could not find the latest glowroot agent:
https://oss.sonatype.org/content/repositories/releases/org/glowroot/glowroot-agent/
Thanks!
The text was updated successfully, but these errors were encountered: