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

The jar package cannot be parsed when compiling the project #31070

Open
umll opened this issue Apr 30, 2024 · 3 comments
Open

The jar package cannot be parsed when compiling the project #31070

umll opened this issue Apr 30, 2024 · 3 comments

Comments

@umll
Copy link

umll commented Apr 30, 2024

Bug Report

Which version of ShardingSphere did you use?

ShardingSphere5.5.0

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy-5.5.0

Expected behavior

Compile the shardingsphere-proxy module and succeed

Actual behavior

Could not resolve dependencies for project org.apache.shardingsphere:shardingsphere-proxy-backend-core:jar:5.5.1-SNAPSHOT.
The log is as follows:
[ERROR] Failed to execute goal on project shardingsphere-proxy-backend-core: Could not resolve dependencies for project org.apache.shardingsphere:shardingsphere-proxy-backend-core:jar:5.5.1-SNAPSHOT: The following artifacts could not be resolved: org.apache.shardingsphere:shardingsphere-parser-sql-sql92:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-parser-sql-mysql:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-parser-sql-postgresql:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-parser-sql-opengauss:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-parser-sql-oracle:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-parser-sql-sqlserver:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-db-protocol-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-infra-context:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-standalone-mode-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-cluster-mode-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-sharding-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-broadcast-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-readwrite-splitting-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-encrypt-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-shadow-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-mask-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-authority-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-global-clock-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-traffic-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-transaction-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-single-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-sql-federation-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-sql-parser-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-sql-translator-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-single-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-transaction-xa-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-global-clock-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-global-clock-tso-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-mysql:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-postgresql:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-opengauss:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-scenario-migration:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-scenario-consistencycheck:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-distsql-handler:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-data-pipeline-cdc-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-sql-federation-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-logging-core:jar:5.5.1-SNAPSHOT, org.apache.shardingsphere:shardingsphere-schedule-core:jar:5.5.1-SNAPSHOT: Could not find artifact org.apache.shardingsphere:shardingsphere-parser-sql-sql92:jar:5.5.1-SNAPSHOT in github (https://maven.pkg.github.com/ccaikano/maven-repository) -> [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/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :shardingsphere-proxy-backend-core

Reason analyze (If you can)

My local maven cannot download and resolve the dependencies of version 5.5.1

@linghengqian
Copy link
Member

linghengqian commented May 1, 2024

  • Unable to reproduce, you need to inform the commit id.
sdk install java 21.0.2-graalce
sdk use java 21.0.2-graalce

git clone git@github.com:apache/shardingsphere.git -b 5.5.0
cd ./shardingsphere/
./mvnw clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true

@umll
Copy link
Author

umll commented May 2, 2024

  • 无法重现,需要告知commit id。
sdk install java 21.0.2-graalce
sdk use java 21.0.2-graalce

git clone git@github.com:apache/shardingsphere.git -b 5.5.0
cd ./shardingsphere/
./mvnw clean install -Prelease -T1C -DskipTests -Djacoco.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true

The Java version I use is 1.8.
My local maven version is 3.8.
I compile the proxy module in idea.
The tutorial I watched said that you need to compile the proxy module first, and then execute the binary packaging command in the proxy module under the distribution module.
So, I executed the compilation command first, but the compilation failed.

@linghengqian
Copy link
Member

  • What tutorial are you referring to? To compile Antlr4, you always need an environment with JDK11+, which does not conflict with the final product being available under JDK8. Refer to https://github.com/apache/shardingsphere/wiki . And there is no requirement to compile a submodule first.

  • Shardingsphere utilizes Maven Wrapper to enforce Maven version and configuration constraints, thus there is no need to utilize a local Maven instance.

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

No branches or pull requests

2 participants