Sonarqube src/test execution on version 7.6 with gradle - java

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

Related

GitHub Actions Could not download xml-apis.jar (xml-apis:xml-apis:1.4.01) during build

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

Error building react native app on Android

Hi I´m trying to run my react native app on android but when i build it shows me this error:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 952 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Task :react-native-safe-area-context:compileDebugJavaWithJavac FAILED
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.9/userguide/command_line_interface.html#sec:command_line_warnings
48 actionable tasks: 2 executed, 46 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-safe-area-context:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
* 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 5s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-safe-area-context:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
* 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 5s
at makeError (/Users/calebgarcia/Dev/Auth/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /Users/calebgarcia/Dev/Auth/node_modules/#react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/calebgarcia/Dev/Auth/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/Users/calebgarcia/Dev/Auth/node_modules/#react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
It´s a bit puzzling since when i build the app on the ios simulator it runs perfectly.
Do you guys have any idea how i can solve the issue?
Thanks.
npm install react-native-safe-area-context
Try this and build.
If not,
Please check your computer's environment variables and set JAVA_HOME if it has not already been setup.

I am new to flutter app development. Got handover of the flutter project and tried to run, but getting Build Failed Exception by terminal command

My app was working fine and all of a sudden this error popped up and no longer works
Launching lib\main.dart on Redmi Note 9S in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\abumo.gradle\caches\transforms-2\files-2.1\e8b87230ecc8f4137f972d2f499610c1\play-services-ads-lite-20.0.0\AndroidManifest.xml:27:5-43:15: AAPT: error: unexpected element found in .
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 2m 46s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin apple_sign_in...
Running Gradle task 'assembleAarRelease'...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'apple_sign_in'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
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 5s
Exception: The plugin apple_sign_in could not be built due to the issue above.
pleas help me

Flutter FireBase Storage setup .......... can't even build empty project

I have watched every YouTube video and I can't get right
I followed the firebase docs step by step
still it gives me this
error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_storage:javaPreCompileRelease'.
> Could not resolve all files for configuration ':firebase_storage:releaseCompileClasspath'.
> Could not find firebase-common.jar (com.google.firebase:firebase-common:17.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-common/17.0.0/firebase-common-17.0.0.jar
* 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 45s
Running Gradle task 'assembleRelease'... 46.4s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1
Please help.
I lowered the version of Flutter storage package to 3.0.0 and it works fine.

Flutter Build Fail after reinstalling Windows

I reinstalled Windows and AndroidStudio, now my project gets this Build error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signingConfigWriterDebug'.
> java.nio.file.AccessDeniedException: E:<theprojectpath>\build\app\intermediates\signing_config\debug\out\signing-config.json
* 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 1s
Finished with error: Gradle task assembleDebug failed with exit code 1
Okay, I fixed it:
Delete your build-cache and your cache folder in your .android folder.
Usually located here C:\Users\username\.android
Delete the build folder in your flutter project folder.
(...)\flutter_project_name\build

Categories

Resources