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

Fix dependency errors for Maven projects #735

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Nov 5, 2022

Currently, when we build a Maven project with the scalardb dependencies, we face the following dependency error:

[ERROR] Failed to execute goal on project app: Could not resolve dependencies for project com.example:app:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: software.amazon.awssdk:core:jar:2.17.69, com.oracle.database.jdbc:ojdbc8-production:jar:19.8.0.0: Failure to find software.amazon.awssdk:core:jar:2.17.69 in https://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of repo1.maven.org has elapsed or updates are forced -> [Help 1]

This PR fixes this issue. I'll add inline comments for the details. Please take a look!

@brfrn169 brfrn169 added the bugfix label Nov 5, 2022
@brfrn169 brfrn169 self-assigned this Nov 5, 2022
@brfrn169 brfrn169 marked this pull request as draft November 5, 2022 11:50
@brfrn169 brfrn169 force-pushed the specify-pom-for-pom-type-dependencies branch from f1533b3 to 2cd1112 Compare November 5, 2022 12:17
@brfrn169 brfrn169 changed the title Specify pom type explicitly for pom type dependencies Fix dependencies errors for Maven projects Nov 5, 2022
@brfrn169 brfrn169 changed the title Fix dependencies errors for Maven projects Fix dependency errors for Maven projects Nov 5, 2022
@brfrn169 brfrn169 force-pushed the specify-pom-for-pom-type-dependencies branch from 2cd1112 to 0790c52 Compare November 5, 2022 13:17
@@ -91,11 +91,11 @@ dependencies {
implementation "org.jooq:jooq:${jooqVersion}"
implementation "software.amazon.awssdk:applicationautoscaling:${awssdkVersion}"
implementation "software.amazon.awssdk:dynamodb:${awssdkVersion}"
implementation "software.amazon.awssdk:core:${awssdkVersion}"
implementation "software.amazon.awssdk:core:${awssdkVersion}@pom"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Specified pom type explicitly for the awssdk dependency. This will fix the dependency error.

implementation "org.apache.commons:commons-dbcp2:${commonsDbcp2Version}"
implementation "mysql:mysql-connector-java:${mysqlDriverVersion}"
implementation "org.postgresql:postgresql:${postgresqlDriverVersion}"
implementation "com.oracle.database.jdbc:ojdbc8-production:${oracleDriverVersion}"
implementation "com.oracle.database.jdbc:ojdbc8:${oracleDriverVersion}"
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 tried to specify the pom type explicitly for the Oracle JDBC Driver dependency, and it fixed the dependency error, but the integration test failed with the No suitable driver error for some reason. So I decided to change the dependency to com.oracle.database.jdbc:ojdbc8 because we just need the Oracle JDBC Driver.

I referred to the following document:
https://www.oracle.com/database/technologies/maven-central-guide.html

@brfrn169 brfrn169 marked this pull request as ready for review November 5, 2022 13:31
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@feeblefakie feeblefakie merged commit 46aef55 into master Nov 7, 2022
@feeblefakie feeblefakie deleted the specify-pom-for-pom-type-dependencies branch November 7, 2022 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants