首页 > 解决方案 > 请帮我在 Gradle 项目中找到一个任务?

问题描述

我有一个项目https://archive.apache.org/dist/groovy/2.5.8/sources/apache-groovy-src-2.5.8.zip配置为由 Gradle 4.10.3 构建。我将它迁移到 Gradle 6.8 因为我需要可重定位缓存。修改了很多文件,最后出现以下错误

./gradlew -PskipIndy clean distBin

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Starting a Gradle Daemon, 9 stopped Daemons could not be reused, use --status for details

> Configure project :
ArtifactoryUser user: null
Using Java from /home/katya/java (version 11.0.2)
Detected development environment
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
[ant:antlr] Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[ant:antlr] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005

> Task :ensureGrammars
Trying to override old definition of datatype antlr

[ant:antlr] Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[ant:antlr] ANTLR Parser Generator   Version 2.7.7 (20060906)   1989-2005
[ant:antlr] /home/katya/tmp_work/groovy-2.5.8/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g:1024: warning:Syntactic predicate superfluous for single alternative
[ant:antlr] /home/katya/tmp_work/groovy-2.5.8/src/main/antlr2/org/codehaus/groovy/antlr/java/java.g:1510: warning:empty alternative makes no sense in (...)* or (...)+

> Task :compileJava
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ant:echo] Bridger (groovy): Translated 6 methods and 0 method calls

> Task :groovy-datetime:jarjar FAILED

> Task :groovy-cli-picocli:compileGroovy
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

> Task :groovy-bsf:jarjar FAILED

> Task :groovy-cli-commons:compileGroovy
[ant:jarjar] Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

> Task :groovy-swing:compileGroovy
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

> Task :jarjar FAILED

> Task :groovy-xml:compileGroovy
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

> Task :groovy-swing:compileGroovy
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':groovy-datetime:jarjar'.
> Cannot invoke method osgiManifest() on null object

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

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':groovy-bsf:jarjar'.
> Cannot invoke method osgiManifest() on null object

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

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':jarjar'.
> Cannot invoke method osgiManifest() on null object

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

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 16s
95 actionable tasks: 87 executed, 5 from cache, 3 up-to-date

Publishing build scan...
https://gradle.com/s/belvsvvizwhhq

我不知道什么是 task :jarjar ?您能解释一下并帮助将此任务迁移到 Gradle 6.8 吗?这是配置文件https://gist.github.com/iva-nova-e-katerina/b43a10e17445d0be24882b8a3bb57929我可以提供我已经对该项目进行的所有其他修改。

标签: gradlegroovy

解决方案


推荐阅读