When I run ./gradlew test, I am interested in test results only. However, gradlew reports ~20 extra lines with different information about documentation/ where to get help.
This is not necessary because I know the reason of the failure was because the test failed.
Here is an example:
$ ./gradlew :mqtt:test
Type-safe dependency accessors is an incubating feature.
>>>> RETAIN
> Task :mqtt:test
MqttTest > subscribesToAllTopicsAfterConnect FAILED
java.lang.AssertionError: Assertion failed
at MqttTest.subscribesToAllTopicsAfterConnect(MqttTest.kt:43)
---------------------------------------------------------------
| Results: FAILURE (2 tests, 1 passed, 1 failed, 0 skipped) |
---------------------------------------------------------------
2 tests completed, 1 failed
> Task :mqtt:test FAILED
FAILURE: Build failed with an exception.
>>>> RETAIN
>>>> UNNECESSARY
* What went wrong:
Execution failed for task ':mqtt:test'.
> There were failing tests. See the report at: file:///Users/tonis/workspace/java/charon-android-automotive/mqtt/build/reports/tests/test/index.html
* 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 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 7s
10 actionable tasks: 2 executed, 8 up-to-date
>>>> UNNECESSARY
I have embedded the part that is not necessary with >>>> UNNECESSARY
Related
Could you please help me with my problem.
I have a GitHub Actions workflow and at the end of the build I get an error:
Task :api:compileJava
Task :api:compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':api:compileClasspath'.
Could not download xml-apis.jar (xml-apis:xml-apis:1.4.01)
Could not get resource 'https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'.
Could not GET 'https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar'.
Read timed out
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 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 20m 11s
28 actionable tasks: 25 executed, 3 up-to-date
Error: Process completed with exit code 1.
In other CI like Appveyor and VMs with different Ubuntu versions, I don’t get this error. I have no idea why this is happening.
./gradlew distTar -PbuildNumber=${APPVEYOR_BUILD_NUMBER}.${APPVEYOR_REPO_COMMIT}
-Pprofile=release
-x test
-Pfast
--no-daemon
Please help.
This is my repo https://github.com/madmongoose/cloud-pipeline-fork
I am writing simple application to be familiar with spring batch. I wanted to learn spring batch admin I found that it is deprecated so I have to use spring cloud data flow instead.
I've tutorial about spring cloud data and did first steps:
Added dependency:
compile("org.springframework.cloud:spring-cloud-starter-dataflow-server-local:1.7.4.RELEASE")
And marked my spring boot application class with additioanl annotaion:
#EnableDataFlowServer
Now I am trying to run it using idea but it prints:
19:14 Error running 'MyApplication': Command line is too long. Shorten command line for MyApplication or also for Spring Boot default configuration.
For that moment I thought that it is IDEA bug and tried to use gradle (via idea plugin) to run application using boot run but it is started too:
19:15:21: Executing task 'bootRun'...
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:compileJava
:processResources UP-TO-DATE
:classes
:bootRun FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_111\bin\java.exe''
* 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
BUILD FAILED in 4s
3 actionable tasks: 2 executed, 1 up-to-date
CreateProcess error=206, The filename or extension is too long
19:15:26: Task execution finished 'bootRun'.
How can I fix that ?
P.S.
My repo is https://github.com/gredwhite/spring-batch-hello-world
Use one of the options to shorten the command line:
I am trying to analyze all of the java files located inside the src/test directory, but I can't get this working.
I have tried the options below
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
Task :sonarqube FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':sonarqube'.
File src/test/java/LibraryTest.java can't be indexed twice. Please check that
nclusion/exclusion patterns produce disjoint sets for main and test files
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
ption to get more log output. Run with --scan to get full insights.
2)
I have also tried with -Dsonar.sources=src/test -Dsonar.inclusions= src/**/*.java
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
/test -Dsonar.inclusions= src/**/*.java
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
FAILURE: Build failed with an exception.
What went wrong:
Task 'src/**/*.java' not found in root project 'SonarQube'.
Try:
Run gradle tasks to get a list of available tasks. 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
BUILD FAILED in 1s
3)
C:\Users\Test\SonarQube>gradle clean sonarqube -Dsonar.sources=src
/test -Dsonar.inclusions=src/test/*.java
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
Task :test
Picked up JAVA_TOOL_OPTIONS: -Djdk.http.auth.tunneling.disabledSchemes=""
Task :sonarqube
Failed to set working directory hidden: C:\Users\Test\SonarQube\build\sonar
SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM
of your project, or disable the SCM Sensor in the project settings.
BUILD SUCCESSFUL in 10s
5 actionable tasks: 5 executed
But still, I can't see changes on sonarqube server
I am follwoing this tutorial
https://auth0.com/blog/integrating-spring-data-jpa-postgresql-liquibase/
at the moment.
But I have some problems with Gradle... Everytime when I try to run the project with "./gradlew bootRun" it returns an error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk-10.0.2\bin\java.exe'' finished wit
h non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 44s
4 actionable tasks: 2 executed, 2 up-to-date
I'm running Java 10.0.2 and Gradle 4.10.1.
I appreciate any kind of help!
I tried to build spring 3 framework using gradle, in ubuntu 12.04. but there was an error when build aspects progress.
the error is as follow:
spring-aspects:compileJava
Download http://repo.springsource.org/libs-release/org/aspectj/aspectjtools/1.6.12/aspectjtools-1.6.12.jar
[ant:iajc] <Unknown> [warning] Found #DeclareAnnotation while current release does not support it (see 'org.aspectj.weaver.bcel.AtAjAttributes')
[ant:iajc]
:spring-aspects:classes
:spring-aspects:jar
:spring-expression:javadoc
/home/hendri/spring-framework/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java:28: error: unmappable character for encoding UTF8
* <p>If any of the operands is of a reference type, unboxing conversion (�5.1.8) is performed. Then:<br>
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-expression:javadoc'.
> Javadoc generation failed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 24 mins 10.5 secs
can somebody help me to pass this error and build the spring 3 framework??
thanks..
Try update the Spring code. If that not works take a look at what encoding are you compiling against.