Skip to content

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

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

Open
brcolow opened this issue Sep 5, 2020 · 17 comments
Open

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

brcolow opened this issue Sep 5, 2020 · 17 comments

Comments

@brcolow
Copy link

brcolow commented Sep 5, 2020

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.

@mirelap-amazon
Copy link
Contributor

mirelap-amazon commented Sep 9, 2020

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?

@ivoanjo
Copy link
Contributor

ivoanjo commented Sep 9, 2020

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.

@brcolow
Copy link
Author

brcolow commented Sep 9, 2020

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
Copy link
Author

brcolow commented Sep 13, 2020

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?

@ivoanjo
Copy link
Contributor

ivoanjo commented Sep 16, 2020

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.

@brcolow
Copy link
Author

brcolow commented Sep 16, 2020

Yes, that works fine :).

@ivoanjo
Copy link
Contributor

ivoanjo commented Sep 17, 2020

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

@brcolow
Copy link
Author

brcolow commented Sep 17, 2020

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.

@ivoanjo
Copy link
Contributor

ivoanjo commented Sep 29, 2020

@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 🥳

@brcolow
Copy link
Author

brcolow commented Sep 29, 2020

Awesome!

@brcolow
Copy link
Author

brcolow commented Oct 14, 2020

Any news on the JPMS Module-Name manifest entry?

@brcolow
Copy link
Author

brcolow commented Mar 21, 2021

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

@ivoanjo
Copy link
Contributor

ivoanjo commented Mar 22, 2021

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

@mirelap-amazon
Copy link
Contributor

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

@olivergillespie
Copy link
Contributor

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.

@brcolow
Copy link
Author

brcolow commented Mar 30, 2021

@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
Copy link
Author

brcolow commented Apr 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants