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

Remove the maven.version.range declaration in pom.xml to avoid contributors compiling with Maven 4.0.0-beta3? #32568

Closed
linghengqian opened this issue Aug 17, 2024 · 2 comments · Fixed by #32984
Assignees

Comments

@linghengqian
Copy link
Member

Feature Request

For English only, other languages will not be accepted.

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Is your feature request related to a problem?

  • No.

Describe the feature you would like.

  • pom.xml currently has a declaration for maven.version.range, see

    <maven.version.range>[3.0.4,)</maven.version.range>

  • This is strange, because it implies that the project can be compiled by apache/maven 4.0.0-beta3, but this is not possible. Tested using SDKMAN! under Ubuntu WSL 22.04.4.

sdk install java 22.0.2-graalce
sdk install maven 4.0.0-beta-3
git clone [email protected]:apache/shardingsphere.git
cd ./shardingsphere/
sdk use java 22.0.2-graalce
sdk use maven 4.0.0-beta-3
mvn clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true
  • The error is as follows.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile (default-testCompile) on project shardingsphere-agent-core: Compilation failure
[ERROR] /home/linghengqian/TwinklingLiftWorks/git/public/shardingsphere/agent/core/src/test/java/org/apache/shardingsphere/agent/core/builder/AgentBuilderFactoryTest.java:[20,27] 找不到符号
[ERROR]   符号:   类 ByteBuddyAgent
[ERROR]   位置: 程序包 net.bytebuddy.agent
[ERROR] 
[ERROR] -> [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 verbose output
[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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn [args] -r
  • Maybe we should consider removing the maven.version.range declaration in pom.xml to avoid contributors compiling with Maven 4.0.0-beta3? After all ShardingSphere is using the Maven Wrapper which declares a specific Maven version 3.8.7.

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip

  • Or consider redirecting the current issue to update the Maven used by Maven Wrapper to 4.0.0-beta3. This is a bit abstract, after all, Maven 4.0.0-beta3 requires the minimum JDK runtime to be JDK17.
@linghengqian
Copy link
Member Author

  • I'm about to open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant