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

Win10下gradlew编译运行失败 #98

Open
HeadHorn opened this issue Dec 24, 2024 · 0 comments
Open

Win10下gradlew编译运行失败 #98

HeadHorn opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@HeadHorn
Copy link

问题简述

build失败,缺失com.unclezs:jfx-launcher:1.1.11-SNAPSHOT

复现步骤

照流程使用./graldew.bat :app:runApp

自我分析

gradle.properties中指定的版本为app.launcher.version=1.1.11-SNAPSHOT

在观察https://oss.sonatype.org/content/groups/public/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/后,可以发现该目录下只有校验文件,缺失了指定的jfx-launcher-1.1.11-SNAPSHOT.pom和maven-metadata.xml

改为app.launcher.version=1.1.11 即可正常编译运行

截图与日志

Picked up JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8"
Initialized native services in: C:\Users\xxx\.gradle\native
Initialized jansi services in: C:\Users\xxx\.gradle\native
Starting process 'command 'E:\Java\Java16.0.2\bin\java.exe''. Working directory: C:\Users\xxx\.gradle\.tmp\tmp-jvm3392086768168349766probe Command: E:\Java\Java16.0.2\bin\java.exe -cp . JavaPr
obe
Successfully started process 'command 'E:\Java\Java16.0.2\bin\java.exe''
Found daemon DaemonInfo{pid=8628, address=[1c82cdd5-b691-43af-88c6-9539435548f3 port:2157, addresses:[/127.0.0.1]], state=Idle, lastBusy=1735026165471, context=DefaultDaemonContext[uid=f40fe77c-6
f5d-4e9e-8c5e-b19f13406e6e,javaHome=E:\Java\jdk-19,daemonRegistryDir=C:\Users\xxx\.gradle\daemon,pid=8628,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UN
NAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED
,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic
=ALL-UNNAMED,-Dfile.encoding=UTF8,-Duser.country=CN,-Duser.language=zh,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=E:\Java\Java16.0.2,daemonRegistryDir=C:\Users\xxx\.gradle\daemon,pid=19364,idleTimeout=null,priority=NORMAL,daemonOpts=--add-opens,java.base/java
.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs
=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concu
rrent.atomic=ALL-UNNAMED,-Dfile.encoding=UTF8,-Duser.country=CN,-Duser.language=zh,-Duser.variant]
Actual: DefaultDaemonContext[uid=f40fe77c-6f5d-4e9e-8c5e-b19f13406e6e,javaHome=E:\Java\jdk-19,daemonRegistryDir=C:\Users\xxx\.gradle\daemon,pid=8628,idleTimeout=10800000,priority=NORMAL,daemon
Opts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-o
pens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-
opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-Dfile.encoding=UTF8,-Duser.country=CN,-Duser.language=zh,-Duser.variant]

  Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 28448). The daemon log file: C:\Users\xxx\.gradle\daemon\7.2\daemon-28448.out.log
Starting 2nd build in daemon [uptime: 3 mins 30.093 secs, performance: 100%]
Using 16 worker leases.
Now considering [D:\VScodeWorkspace\uncle-novel, D:\VScodeWorkspace\uncle-novel\buildSrc] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file 'D:\VScodeWorkspace\uncle-novel\settings.gradle'.
Projects loaded. Root project using build file 'D:\VScodeWorkspace\uncle-novel\build.gradle'.
Included projects: [root project 'uncle-novel', project ':app', project ':app-framework', project ':app-localized']
Now considering [D:\VScodeWorkspace\uncle-novel\buildSrc, D:\VScodeWorkspace\uncle-novel] as hierarchies to watch

> Configure project :buildSrc
Evaluating project ':buildSrc' using build file 'D:\VScodeWorkspace\uncle-novel\buildSrc\build.gradle'.
Applying dependency management to configuration 'annotationProcessor' in project 'buildSrc'
Applying dependency management to configuration 'api' in project 'buildSrc'
Applying dependency management to configuration 'apiElements' in project 'buildSrc'
Applying dependency management to configuration 'archives' in project 'buildSrc'
Applying dependency management to configuration 'compileClasspath' in project 'buildSrc'
Applying dependency management to configuration 'compileOnly' in project 'buildSrc'
Applying dependency management to configuration 'compileOnlyApi' in project 'buildSrc'
Applying dependency management to configuration 'default' in project 'buildSrc'
Applying dependency management to configuration 'implementation' in project 'buildSrc'
Applying dependency management to configuration 'runtimeClasspath' in project 'buildSrc'
Applying dependency management to configuration 'runtimeElements' in project 'buildSrc'
Applying dependency management to configuration 'runtimeOnly' in project 'buildSrc'
Applying dependency management to configuration 'testAnnotationProcessor' in project 'buildSrc'
Applying dependency management to configuration 'testCompileClasspath' in project 'buildSrc'
Applying dependency management to configuration 'testCompileOnly' in project 'buildSrc'
Applying dependency management to configuration 'testImplementation' in project 'buildSrc'
Applying dependency management to configuration 'testRuntimeClasspath' in project 'buildSrc'
Applying dependency management to configuration 'testRuntimeOnly' in project 'buildSrc'
Selected primary task 'build' from project :
:buildSrc:compileJava (Thread[Execution worker for ':buildSrc',5,main]) started.

> Task :buildSrc:compileJava
Resource missing. [HTTP GET: https://oss.sonatype.org/content/groups/public/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: https://oss.sonatype.org/content/groups/public/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/jfx-launcher-1.1.11-SNAPSHOT.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/jfx-launcher-1.1.11-SNAPSHOT.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/maven-metadata.xml]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/unclezs/jfx-launcher/1.1.11-SNAPSHOT/jfx-launcher-1.1.11-SNAPSHOT.pom]
Excluding []

> Task :buildSrc:compileJava FAILED
:buildSrc:compileJava (Thread[Execution worker for ':buildSrc',5,main]) completed. Took 27.603 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:compileJava'.
> Could not resolve all files for configuration ':buildSrc:compileClasspath'.
   > Could not find com.unclezs:jfx-launcher:1.1.11-SNAPSHOT.
     Required by:
         project :buildSrc

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 28s
1 actionable task: 1 executed
Watched directory hierarchies: [D:\VScodeWorkspace\uncle-novel]

操作环境

JAVA16, Windows10 22H2

其他补充

@HeadHorn HeadHorn added the bug Something isn't working label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant