Skip to content

support build individual module#5489

Merged
wu-sheng merged 5 commits intoapache:masterfrom
xbkaishui:support-build-single-module
Sep 16, 2020
Merged

support build individual module#5489
wu-sheng merged 5 commits intoapache:masterfrom
xbkaishui:support-build-single-module

Conversation

@xbkaishui
Copy link
Contributor

Please answer these questions before submitting a pull request


Bug fix

  • Bug description.
  • How to fix?
    In submodule build, using the absolute path to find the check-style file

New feature or improvement

  • Describe the details and related test reports.

@wu-sheng
Copy link
Member

This commend doesn't work locally.

@wu-sheng wu-sheng added the TBD To be decided later, need more discussion or input. label Sep 15, 2020
@xbkaishui
Copy link
Contributor Author

xbkaishui commented Sep 15, 2020

I test in my Mac, it works ok, can you show the details?

@codecov
Copy link

codecov bot commented Sep 15, 2020

Codecov Report

Merging #5489 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5489      +/-   ##
============================================
+ Coverage     52.10%   52.16%   +0.05%     
+ Complexity     3347     3321      -26     
============================================
  Files           898     1590     +692     
  Lines         22166    33887   +11721     
  Branches       2122     3694    +1572     
============================================
+ Hits          11550    17677    +6127     
- Misses         9687    15359    +5672     
+ Partials        929      851      -78     
Impacted Files Coverage Δ Complexity Δ
...ing/oap/server/library/util/ProtoBufJsonUtils.java 0.00% <0.00%> (-90.00%) 0.00% <0.00%> (-2.00%)
...tworkalias/NetworkAddressAliasSetupDispatcher.java 11.11% <0.00%> (-88.89%) 1.00% <0.00%> (-1.00%)
...erver/receiver/envoy/MetricServiceGRPCHandler.java 12.16% <0.00%> (-77.84%) 2.00% <0.00%> (ø%)
...ler/v8/rest/ManagementServiceKeepAliveHandler.java 32.00% <0.00%> (-64.00%) 2.00% <0.00%> (-1.00%)
...rest/ManagementServiceReportPropertiesHandler.java 27.58% <0.00%> (-62.07%) 2.00% <0.00%> (-2.00%)
...lysis/manual/networkalias/NetworkAddressAlias.java 2.43% <0.00%> (-56.10%) 0.00% <0.00%> (-5.00%)
...p/server/core/source/NetworkAddressAliasSetup.java 33.33% <0.00%> (-50.01%) 2.00% <0.00%> (-1.00%)
...r/listener/NetworkAddressAliasMappingListener.java 36.36% <0.00%> (-39.40%) 4.00% <0.00%> (-1.00%)
...er/receiver/envoy/AccessLogServiceGRPCHandler.java 20.75% <0.00%> (-37.15%) 2.00% <0.00%> (ø%)
...skywalking/oap/server/core/alarm/AlarmMessage.java 66.66% <0.00%> (-33.34%) 2.00% <0.00%> (ø%)
... and 1089 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 224af7f...1d32bd3. Read the comment docs.

@wu-sheng
Copy link
Member

CI fails too. Even I don't think CI tested this feature.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0:check (validate) on project apm-ehcache-2.x-plugin: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream: Property ${import.control} has not been set -> [Help 1]

Property ${import.control} has not been set, I think this is the reason.

@kezhenxu94
Copy link
Member

I don't think that's what we recommend, we recommend to use mvnw with -f, which maybe also INCONVENIENT as what you said when the submodule is too DEEP, you have ../../../mvnw, if the pull request doesn't break anything (tests passed), I'm also OK to merge this

@wu-sheng
Copy link
Member

if the pull request doesn't break anything (tests passed), I'm also OK to merge this

I am wondering why I can't pass compiling locally. Have a concern about this change

@xbkaishui
Copy link
Contributor Author

let me double check,
In my local mac, I can switch to any module and just run mvn clean package , it will success

屏幕快照 2020-09-15 下午5 32 29

@wu-sheng
Copy link
Member

mvn clean package is sensitive about the maven version, I used that too, but failed.

Wu-Sheng-s-MacBook-Pro:ehcache-2.x-plugin wusheng$ mvn package
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ehcache-2.x-plugin 8.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repository.apache.org/snapshots/org/apache/skywalking/apm-sniffer/8.2.0-SNAPSHOT/maven-metadata.xml
Downloading: https://repository.apache.org/snapshots/org/apache/skywalking/apm/8.2.0-SNAPSHOT/maven-metadata.xml
Downloading: https://repository.apache.org/snapshots/org/apache/skywalking/apm-commons/8.2.0-SNAPSHOT/maven-metadata.xml
Downloading: https://repository.apache.org/snapshots/org/apache/skywalking/apm-test-tools/8.2.0-SNAPSHOT/maven-metadata.xml
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ apm-ehcache-2.x-plugin ---
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java) @ apm-ehcache-2.x-plugin ---
[INFO] 
[INFO] --- os-maven-plugin:1.6.2:detect (default) @ apm-ehcache-2.x-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.15
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 15
[INFO] os.detected.classifier: osx-x86_64
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.0:check (validate) @ apm-ehcache-2.x-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.388 s
[INFO] Finished at: 2020-09-15T16:24:45+08:00
[INFO] Final Memory: 18M/173M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0:check (validate) on project apm-ehcache-2.x-plugin: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream: Property ${import.control} has not been set -> [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/MojoExecutionException
Wu-Sheng-s-MacBook-Pro:ehcache-2.x-plugin wusheng$ mvn package
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ehcache-2.x-plugin 8.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ apm-ehcache-2.x-plugin ---
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java) @ apm-ehcache-2.x-plugin ---
[INFO] 
[INFO] --- os-maven-plugin:1.6.2:detect (default) @ apm-ehcache-2.x-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] Detecting the operating system and CPU architecture
[INFO] ------------------------------------------------------------------------
[INFO] os.detected.name: osx
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.15
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 15
[INFO] os.detected.classifier: osx-x86_64
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.0:check (validate) @ apm-ehcache-2.x-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.672 s
[INFO] Finished at: 2020-09-15T16:25:54+08:00
[INFO] Final Memory: 15M/253M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0:check (validate) on project apm-ehcache-2.x-plugin: Failed during checkstyle execution: Failed during checkstyle configuration: unable to parse configuration stream: Property ${import.control} has not been set -> [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/MojoExecutionException
Wu-Sheng-s-MacBook-Pro:ehcache-2.x-plugin wusheng$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /Users/wusheng/Documents/applications/apache-maven-3.3.9
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /Users/wusheng/Documents/applications/jdk1.8.0_91.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.6", arch: "x86_64", family: "mac"

That is also why, @kezhenxu94 said, you will face another deep path because mvnw.

@xbkaishui
Copy link
Contributor Author

The maven version should greater than 3.6, I also saw the e2e/pom.xml use this property

<configLocation>${maven.multiModuleProjectDirectory}/apm-checkstyle/checkStyle.xml</configLocation>

@wu-sheng
Copy link
Member

mvnw provides that. But, local maven may be different version on different laptop.

@xbkaishui
Copy link
Contributor Author

Can we enforce the maven version in main pom.xml , just like enforce the jdk version must greater than 1.8

@wu-sheng
Copy link
Member

Is that possible?

@xbkaishui
Copy link
Contributor Author

Yes, I can change it

@xbkaishui
Copy link
Contributor Author

Hi @wu-sheng , added rule to check maven must greater than 3.6, please check in your local env

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

It works, the document should be updated.

<version>1.8</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.6</version>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

At least 3 places should be updated.

  1. Prepare git, JDK8, and Maven 3.6+
  2. Add document about compiling a single plugin in the Advanced compile part.
  3. Remove Setup your Eclipse IDE section, it is out of the update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, Please help to check (my poor english)

@wu-sheng wu-sheng added CI settings CI settings adjustment documentation Provide documents related issue or pull request only. and removed TBD To be decided later, need more discussion or input. labels Sep 15, 2020
@wu-sheng wu-sheng added this to the 8.2.0 milestone Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI settings CI settings adjustment documentation Provide documents related issue or pull request only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support build individual module

3 participants

Comments