Adjusted the configuration of Maven.#532
Conversation
artursouza
left a comment
There was a problem hiding this comment.
Please, help me understand the motivation for this PR.
| <version>${junit-jupiter-engine.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.github.stefanbirkner</groupId> |
There was a problem hiding this comment.
Why are you moving these dependencies to the parent pom? Many of these dependencies are supposed to be only in the examples pom. Does it mean all the projects will share the same dependencies?
There was a problem hiding this comment.
No, this does not mean that all projects will share dependencies. The dependency will only really be introduced when some project references it in dependencies.
I moved the dependencies to the dependencyManagement of the parent pom, so that the project does not have to specify a version when referring to them, and it is easy to manage.
| </plugins> | ||
| <extensions> | ||
| <extension> | ||
| <groupId>kr.motd.maven</groupId> |
There was a problem hiding this comment.
Why we need this plugin?
There was a problem hiding this comment.
It is used to detect the information about the current operating system and normalize it into more portable one.
It was an oversight on my part to add it in.
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> |
There was a problem hiding this comment.
Springboot cannot be a plugin required in the root project. Springboot is only used in the springboot project.
There was a problem hiding this comment.
It seems an oversight too.
| <springboot.version>2.3.5.RELEASE</springboot.version> | ||
| </properties> | ||
|
|
||
| <dependencyManagement> |
There was a problem hiding this comment.
Can you bring this back?
| <scope>compile</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework</groupId> |
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.grpc</groupId> |
There was a problem hiding this comment.
We don't need this anymore?
There was a problem hiding this comment.
We don't need this anymore?
Its duplicated to
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
|
I will wait for you to confirm the following three changes before next commit. 1.Add And I still have a question for you, why the following exists in the dependencies of the example's pom, shouldn't it be a plugin? |
Yes to all 3 items.
That dependency might be wrong. Please, remove it. |
Add spring-boot-dependencies dependency management in sdk-springboot. Add maven-compiler-plugin to the parent pom's pluginManagement Remove protoc-jar-maven-plugin in example's dependencies.
Codecov Report
@@ Coverage Diff @@
## master #532 +/- ##
=========================================
Coverage 80.65% 80.65%
Complexity 982 982
=========================================
Files 88 88
Lines 3024 3024
Branches 331 331
=========================================
Hits 2439 2439
Misses 420 420
Partials 165 165 Continue to review full report at Codecov.
|
|
|
||
| <artifactId>dapr-sdk-autogen</artifactId> | ||
| <packaging>jar</packaging> | ||
| <version>1.1.0-SNAPSHOT</version> |
There was a problem hiding this comment.
What happens when you run this script? https://github.com/dapr/java-sdk/blob/master/scripts/update_sdk_version.sh
We use that for our release process to automatically update the version.
There was a problem hiding this comment.
What happens when you run this script?
https://github.com/dapr/java-sdk/blob/master/scripts/update_sdk_version.shWe use that for our release process to automatically update the version.
It says update_sdk_version.sh: line 5: $1: unbound variable.
The variable is missing here DAPR_JAVA_SDK_VERSION=$1.
What should I do to solve this problem ?
There was a problem hiding this comment.
Pass a value, like "1.2.0"
There was a problem hiding this comment.
Pass a value, like "1.2.0"
Limbo@DESKTOP-GLSB8CF MINGW64 /d/gitProject/java-sdk/scripts (master)
$ ./update_sdk_version.sh
+ DAPR_JAVA_SDK_VERSION=1.2.0
+ mvn versions:set -DnewVersion=1.2.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.291 s
[INFO] Finished at: 2021-04-20T07:18:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.8.1:set (default-cli): Goal requires a project to execute but there is no POM in this directory (D:\gitProject\java-sdk\scripts). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
Works after I add cd .. before mvn versions
* Adjusted the configuration of Maven. * Update pom.xml * Remove os-maven-plugin and spring-boot-maven-plugin in parent pom * Add version of spring-boot-maven-plugin in the example pom. Add spring-boot-dependencies dependency management in sdk-springboot. Add maven-compiler-plugin to the parent pom's pluginManagement Remove protoc-jar-maven-plugin in example's dependencies. * Update pom.xml Co-authored-by: Artur Souza <artursouza.ms@outlook.com> Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com> Signed-off-by: zjx244729 <zjx244729@alibaba-inc.com>
Description
Adjusted the configuration of Maven.
Issue reference
#531