-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(routeoptimization): New code samples #9367
base: main
Are you sure you want to change the base?
Conversation
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
<dependency> | ||
<groupId>com.google.maps</groupId> | ||
<artifactId>google-maps-routeoptimization</artifactId> | ||
<scope>compile</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is a reasoning to duplicate dependency (via <dependencyManagement>
and <dependencies>
in this sample project?
please, use one. if you decide to use the selected, remove scope
and add version number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(NB: I'm not a java packaging expert)
AIUI this isn't a duplicate dependency, the dependencyManagement
declaration is equivalent to libraries-bom
declared used elsewhere (see http://shortn/_72sIg41fuQ on why libraries-bom isn't used here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolving since I believe I'm not deviating from precedent modulo the differences/rationale described in the linked document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked document is outdated (2022). It also does not reference google-maps-routeoptimization-bom
. As such it cannot be used as a justification.
Unless you can clearly explain why you need both, please remove this dependency or the BOM dependency above. If you decide to remove BOM, please update this dependency by removing scope
(defining compile
scope is redundant since it is a default scope) and add the version of the dependency that should be used.
routeoptimization/snippets/src/test/java/com/example/OptimizeToursTest.java
Show resolved
Hide resolved
a72f61f
to
8efe811
Compare
Thanks for the review @minherz - code updated and responses ready for another look. |
routeoptimization/snippets/src/main/java/com/example/OptimizeTours.java
Outdated
Show resolved
Hide resolved
routeoptimization/snippets/src/main/java/com/example/OptimizeTours.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, resolve the duplicated dependency declaration.
<groupId>com.google.maps</groupId> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
<version>0.1.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the latest (0.3.0) version.
<dependency> | ||
<groupId>com.google.maps</groupId> | ||
<artifactId>google-maps-routeoptimization</artifactId> | ||
<scope>compile</scope> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked document is outdated (2022). It also does not reference google-maps-routeoptimization-bom
. As such it cannot be used as a justification.
Unless you can clearly explain why you need both, please remove this dependency or the BOM dependency above. If you decide to remove BOM, please update this dependency by removing scope
(defining compile
scope is redundant since it is a default scope) and add the version of the dependency that should be used.
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
routeoptimization.googleapis.com
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only