aws-codeguru-profiler-demo-application icon indicating copy to clipboard operation
aws-codeguru-profiler-demo-application copied to clipboard

codeguru-profiler-java-agent no module name, etc.

Open brcolow opened this issue 5 years ago • 17 comments

The following dependency:

            <groupId>com.amazonaws</groupId>
            <artifactId>codeguru-profiler-java-agent</artifactId>
            <version>1.0.1</version>

Does not seem to provide a JPMS module name. Even if it is not a full-fledged module, it should provide a fallback module name. By the way, is the codeguru-profiler-java-agent open source? I can't seem to find it.

It's also somewhat strange that it is not on Maven Central (need to use a somewhat obscure looking cloudfront repository).

Sorry if this is the wrong place for such an issue.

brcolow avatar Sep 05 '20 00:09 brcolow

Currently we don't provide a JPMS module name. Also, the codeguru-profiler-java-agent is not open source and not yet released on Maven Central.

We will follow up in the team about the encountered issues to assess them.

Is any of this issues blocking you to use our java agent?

mirelap-amazon avatar Sep 09 '20 10:09 mirelap-amazon

Thanks @brcolow for the report!

Sorry if this is the wrong place for such an issue.

We usually would recommend the AWS forums although the team does monitor the repositories as well, so don't worry.

Do let us know if our current setup is causing issues, we definitely want to know about that.

ivoanjo avatar Sep 09 '20 10:09 ivoanjo

The blocking issue is that the project does not provide an Automatic-Module-Name in the manifest so it can be used with JPMS projects.

brcolow avatar Sep 09 '20 18:09 brcolow

Would it be possible to make the HTTPS https://d1osg35nybn3tt.cloudfront.net/com/amazonaws/codeguru-profiler-java-agent-standalone directory readable so that one can easily browse for the latest version?

brcolow avatar Sep 13 '20 00:09 brcolow

There's actually a way of getting a list of all the versions, including the latest ones -- by reading the maven metadata files:

Would this help for your use-case?

We know the current setup is somewhat awkward, and we're considering improvements around how we deliver the agent, but we don't have anything to announce yet.

ivoanjo avatar Sep 16 '20 11:09 ivoanjo

Yes, that works fine :).

brcolow avatar Sep 16 '20 17:09 brcolow

Awesome. Let's leave this ticket open until we're able to look into the JPMS issue, so we can report back :)

ivoanjo avatar Sep 17 '20 09:09 ivoanjo

Okay. The fix is for a non-modular Java project is to set the Automatic-Module-Name manifest entry for the JAR artifact. This is done differently depending on what build system you all are using internally (Maven, Gradle, etc.). Here's a good article in case you are unfamiliar.

brcolow avatar Sep 17 '20 19:09 brcolow

@brcolow:

It's also somewhat strange that it is not on Maven Central (need to use a somewhat obscure looking cloudfront repository).

That one is finally fixed as well: https://search.maven.org/search?q=g:software.amazon.codeguruprofiler :partying_face:

ivoanjo avatar Sep 29 '20 14:09 ivoanjo

Awesome!

brcolow avatar Sep 29 '20 17:09 brcolow

Any news on the JPMS Module-Name manifest entry?

brcolow avatar Oct 14 '20 21:10 brcolow

Any update on this issue? Can't use codeguru-profiler on a JPMS module.

brcolow avatar Mar 21 '21 22:03 brcolow

I've since left AWS, hopefully someone can chime in on the status for this :)

ivoanjo avatar Mar 22 '21 22:03 ivoanjo

Sorry for this, we don't have yet any updates to share.

mirelap-amazon avatar Mar 26 '21 16:03 mirelap-amazon

Hey @brcolow. I'm looking at adding the Automatic-Module-Name but I do have a concern about the standalone JAR we vend which bundles our dependencies too - I'm not sure of the consequences if I declare a module name there. I can look into whether we should only add it for the normal/thin JAR.

In the meantime, are you unblocked by using the automatically derived module name from the JAR file? In our case, that would be codeguru.profiler.java.agent.

olivergillespie avatar Mar 30 '21 16:03 olivergillespie

@olivergillespie Yes - I can do that - but I get a warning when building with Maven and it is not ideal - but it does unblock.

brcolow avatar Mar 30 '21 17:03 brcolow

For reference here is the warning that Maven gives when building without Automatic-Module-Name:

[WARNING] * Required filename-based automodules detected: [codeguru-profiler-java-agent-1.1.2.jar]. Please don't publish this project to a public artifact repository! *

It is the only such one in my project which is why I am being a stickler about it.

brcolow avatar Apr 02 '21 02:04 brcolow