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

Closed
kpage opened this Issue Aug 20, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@kpage

kpage commented Aug 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!

@trask

This comment has been minimized.

Show comment
Hide comment
@trask

trask Aug 23, 2016

Member

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

Member

trask commented Aug 23, 2016

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

@kpage

This comment has been minimized.

Show comment
Hide comment
@kpage

kpage Aug 23, 2016

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:

  • All our builds use an internal Nexus which proxies maven
  • By always downloading from our internal Nexus, we can ensure build stability (no need to worry if github is up/down, if a repository or link was removed from github, and so on)
  • Gradle does a great job of caching downloads from maven, so we don't need to worry about caching downloads if we are pulling from a maven repo.
  • We are based in Cambodia and our internet connection to the rest of the world is extremely slow and intermittent. Using our own local maven proxy allows us to get much faster downloads for all developers.

kpage commented Aug 23, 2016

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:

  • All our builds use an internal Nexus which proxies maven
  • By always downloading from our internal Nexus, we can ensure build stability (no need to worry if github is up/down, if a repository or link was removed from github, and so on)
  • Gradle does a great job of caching downloads from maven, so we don't need to worry about caching downloads if we are pulling from a maven repo.
  • We are based in Cambodia and our internet connection to the rest of the world is extremely slow and intermittent. Using our own local maven proxy allows us to get much faster downloads for all developers.
@trask

This comment has been minimized.

Show comment
Hide comment
@trask

trask Aug 24, 2016

Member

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).

Member

trask commented Aug 24, 2016

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).

@trask trask added the enhancement label Aug 24, 2016

@trask trask added this to the v0.9.2 milestone Aug 24, 2016

@trask trask closed this in e703256 Aug 25, 2016

@trask

This comment has been minimized.

Show comment
Hide comment
@trask

trask Aug 26, 2016

Member

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.

Member

trask commented Aug 26, 2016

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.

@trask trask changed the title from Is glowroot available from a maven repo? to Add agent zip to maven central Sep 8, 2016

@kpage

This comment has been minimized.

Show comment
Hide comment
@kpage

kpage Sep 12, 2016

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.

kpage commented Sep 12, 2016

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.

@trask

This comment has been minimized.

Show comment
Hide comment
@trask

trask Sep 14, 2016

Member

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).

Member

trask commented Sep 14, 2016

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).

@trask trask reopened this Sep 14, 2016

@trask trask modified the milestones: v0.9.3, v0.9.2 Sep 14, 2016

@trask trask closed this in 61ab5b7 Sep 27, 2016

@trask trask changed the title from Add agent zip to maven central to Add agent jar to maven central Sep 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment