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

Feature/gradle x #314

Closed
wants to merge 4 commits into from
Closed

Conversation

appiepollo14
Copy link
Collaborator

@appiepollo14 appiepollo14 commented Nov 10, 2023

@KyleAure here's my take on upgrading the Gradle wrapper. However, I'm more experiences in maven, so I've my doubts about this change. At this moment it will not pass CI with a clear error, I'm just not confident on what is the correct approach for now.

Will you review my changes and hopefully solve the problem ocurring in CI?

#311

@KyleAure NVM I solved the issue, CI is now green. Awaiting your review.

@KyleAure
Copy link
Collaborator

I'll take a look at this on Monday.

@appiepollo14 appiepollo14 force-pushed the feature/gradle-x branch 2 times, most recently from 0a285c1 to fd396ae Compare November 11, 2023 10:52
sample-apps/maven-app/pom.xml Outdated Show resolved Hide resolved
testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.36'
testImplementation 'org.testcontainers:junit-jupiter:1.19.1'
testImplementation project(':microshed-testing-liberty')
testImplementation project(':microshed-testing-testcontainers')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Liberty includes microshed-testing-testcontainers no need to include it here.

Suggested change
testImplementation project(':microshed-testing-testcontainers')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too but since change some gradle dependencies from compile to implementation, the behavior is different. That's why I need your help, I'm not gr8 at gradle. Without this explicit dependency in this sample app, it will not compile. This leads me to believe that the dependency: testcontainers is no longer part of the artifact created in the liberty module.

testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.36'
testImplementation 'org.testcontainers:junit-jupiter:1.19.1'
testImplementation project(':microshed-testing-payara-server')
testImplementation project(':microshed-testing-testcontainers')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Payara includes microshed-testing-testcontainers no need to include it here.

Suggested change
testImplementation project(':microshed-testing-testcontainers')

Comment on lines +15 to +16
// TODO solve why needed also regular core to compile?
testImplementation project(':microshed-testing-core')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary. I can do some testing to figure out why this working working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this points out my issue as described on your comment in Liberty sample app. I think we should use some other dependecy scope in the core and the modules to resolve this issues.

Comment on lines 54 to 58
mongo.start();
mockServer.start();
app.start();
// by default evertything will start in parallel
SharedContainerConfiguration.super.startContainers();
// SharedContainerConfiguration.super.startContainers();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason this was switched?

testImplementation 'org.eclipse.microprofile.rest.client:microprofile-rest-client-api:1.4.1'
testImplementation 'org.slf4j:slf4j-log4j12:1.7.36'
testImplementation 'org.testcontainers:mockserver:1.19.1'
testImplementation project(':microshed-testing-core')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed otherwise it will be included as a transitive dependency, but the user needs to choose if they want core or core-jakarta

Suggested change
testImplementation project(':microshed-testing-core')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using testCompileOnly should make it compile and not pass it on as a transitive dep right?

@appiepollo14
Copy link
Collaborator Author

@KyleAure any changes / suggestions to tackle this?

@KyleAure
Copy link
Collaborator

I've been working locally to solve a few issues with making such a jump in Gradle versions. I think I'm close will work some more on this tomorrow.

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