Skip to content
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

Rename hibernate modules #205

Merged
merged 7 commits into from
Mar 9, 2020
Merged

Rename hibernate modules #205

merged 7 commits into from
Mar 9, 2020

Conversation

trask
Copy link
Member

@trask trask commented Mar 3, 2020

The goal of this PR is for the module names to be usable directly as artifact names when we publish them to maven central.

Existing module paths were:

:instrumentation:hibernate:core-3.3
:instrumentation:hibernate:core-4.0
:instrumentation:hibernate:core-4.3
:instrumentation:hibernate (this has common code)

Initially I tried:

:instrumentation:hibernate:hibernate-3.3
:instrumentation:hibernate:hibernate-4.0
:instrumentation:hibernate:hibernate-4.3
:instrumentation:hibernate:hibernate-common

But gradle doesn't like having an empty parent :instrumentation:hibernate, so I ended up at

:instrumentation:hibernate-3.3
:instrumentation:hibernate-4.0
:instrumentation:hibernate-4.3
:instrumentation:hibernate-common

and re-mapping their project directories in settings.gradle to keep them under a top-level hibernate directory.

@trask trask mentioned this pull request Mar 4, 2020
@trask
Copy link
Member Author

trask commented Mar 4, 2020

Another option is to keep

:instrumentation:hibernate-3.3
:instrumentation:hibernate-4.0
:instrumentation:hibernate-4.3
:instrumentation:hibernate-common

but remove the "grouping" directory and move these modules directly under instrumentation, then they wouldn't need re-mapping of their project directories.

Alternatively, if we are ok with the "grouping" directory pattern, we could add similar grouping directories for play, spring, netty and several others, which might help organize the instrumentation directory.

@trask trask marked this pull request as ready for review March 4, 2020 17:16
@trask
Copy link
Member Author

trask commented Mar 6, 2020

When I try with:

:instrumentation:hibernate:hibernate-3.3
:instrumentation:hibernate:hibernate-4.0
:instrumentation:hibernate:hibernate-4.3
:instrumentation:hibernate:hibernate-common

and put this hibernate.gradle into the hibernate directory:

plugins {
  id 'base'
}

I still get the error I was getting before:

A problem occurred configuring project ':instrumentation:hibernate'.
> Failed to notify project evaluation listener.
   > Could not get unknown property 'compileJava' for task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
   > Could not get unknown property 'compile' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

I pushed this attempt to https://github.com/trask/opentelemetry-auto-instr-java/tree/rename-hibernate-modules-2 in case anyone with more gradle-fu than me has time to review.

@trask trask mentioned this pull request Mar 7, 2020
29 tasks
@trask
Copy link
Member Author

trask commented Mar 7, 2020

I gave the empty grouping module another shot (trying to level up my gradle little by little 😂).

It turned out my earlier issues with having empty grouping module was because ":instrumentation" parent is applying "stuff" to all children.

First I tried to conditionally apply that "stuff" inside of ":instrumentation" parent gradle file, but that didn't go very well, so I extracted the "stuff" out into a shared gradle file, and applied that inside of each instrumentation, and that worked out pretty good!

@trask trask merged commit cba031d into open-telemetry:master Mar 9, 2020
@trask trask deleted the rename-hibernate-modules branch March 9, 2020 22:33
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

Successfully merging this pull request may close these issues.

2 participants