Project is hosted on:
GitHub - opencellsoft/core
Sonar project https://sonarcloud.io/project/configuration?id=opencellsoft_core
Both github actions and local maven where tested
the used command locally : mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
secret was added to github or to env variables, and properties where added to core/pom.xml
Different solutions where tested:
First Test
As suggested by the Sonarcloud configuration page the below properties where added but we got an error
<sonar.projectKey>opencellsoft_core</sonar.projectKey>
<sonar.organization>opencellsoft</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Error:
Project 'opencellsoft_core' can't have 2 modules with the following key: opencellsoft_core
Second attempt
transform the projectkey to
<sonar.projectKey>opencellsoft_core-${project.groupId}:${project.artifactId}</sonar.projectKey>
Error:
You're not authorized to run analysis. Please contact the project administrator.
3rd Attempt
Add modulekey properties
<sonar.projectKey>opencellsoft_core</sonar.projectKey>
<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
Error:
You're not authorized to run analysis. Please contact the project administrator.
Do you have any idea how to resolve this issue ?
Thanks
The third solution was correct but need to add the secret token in Repository secrets instead of environment secrets in Github. More information can be found here https://community.sonarsource.com/t/error-while-setting-up-sonarcloud-for-a-multimodule-maven-project/39880/2
Related
When adding firebase_auth to dependencies (pubspec.yaml) to my flutter project I'm getting this error:
The plugin firebase_auth doesn't have a main class defined in C:\Users(username)\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-3.1.3\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java or C:\Users(username)\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\firebase_auth-3.1.3\android\src\main\kotlin\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.kt. This is likely to due to an incorrect androidPackage: io.flutter.plugins.firebase.auth or mainClass entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the androidPackage entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile.
My code is just the dummy code created by android studio and the only thing i added is firebase_auth: ^3.1.3 in pubsbec.yaml , the .json file in the android/app directory and registered the app on Firebase website.
I get the same issue in VS Code, so Android Studio is not the problem.
I would really appreciate any help!
Add the firebase_core pugin because it is essential and if you did everything according to the documentation then flutter clean after that pub cache repair will do the the work. then again run.
I think you haven't added Firebase core in your pubspec.yaml file. Try to add firebase_core 1.7.0 in your pubspec.yaml and then clean your project using this command flutter clean
also Checkout this installation guide
In my Jhipster generated file entityNameQueryService.java , eclipse indicates the following line as error, but project compiles successfully.
So, this must be the configuration issue with the eclipse ide. Couldn't figure it out myself..
if (criteria.getId() != null) {
specification = specification.and(buildSpecification(criteria.getId(), FRCommunications_.id));
}
The error message is
"FRCommunications_ cannot be resolved to a variable"
For your information, FRCommunications is my entity name.
Does anyone have a fix for this?
For eclipse, After
mvn clean install -nsu
just right click on target/generated-sources/annotation and select "Use as Source Folder"
JPA static metamodel which is used for JPA filtering in JHipster requires generating classes (named like the entity but suffixed with '_') at build time through an annotation processor, this is configured for maven and gradle so you can run a build and it will generate missing classes.
Alternatively, if you don't want to build using maven or gradle see https://docs.jboss.org/hibernate/orm/5.0/topical/html/metamodelgen/MetamodelGenerator.html#_eclipse
I'm looking at the webpush-java code. I run into a problem attempting to build the project using gradle. (I'm a gradle newbie).
:signArchives FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':signArchives'.
Cannot perform signing task ':signArchives' because it has no
configured signatory
I guess that I need to configure a signatory. How do I do that?
Quoting the Signing plugin documentation you should be able to resolve the error when you provide the expected GPG variables in the gradle.properties file in your HOME directory:
# File location: ~/.gradle/gradle.properties - see https://docs.gradle.org/current/userguide/directory_layout.html
signing.keyId=24875D73
signing.password=secret
signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg
Gradle resp. the Signing plugin will automatically pick them up in the build process.
Another option that does not require a special command-line option is to add the following in your build.gradle:
signing {
setRequired {
// signing is only required if the artifacts are to be published
gradle.taskGraph.allTasks.any { it.equals( PublishToMavenRepository) }
}
....
See e.g. https://github.com/Vampire/command-framework/blob/master/buildSrc/src/main/kotlin/net/kautler/publishing.gradle.kts#L157
I got the same problem and it was because of several things:
I didn't distribute the gpg key to any server;
I was using inMemory to sign and I shouldn't
the link of the complete answer with build.gradle file and gradle.properties file: https://stackoverflow.com/a/68505768/7937498
Found solution here https://github.com/jaegertracing/jaeger-client-java/issues/202
Use the below command.
./gradlew assemble -x signArchives
After all the successful steps of my Jenkins build I get an error:
Recording test results
"ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?"
I tried to search the answer in Jenkins documentation and on stack-overflow, however I didn't find any answer.
If you use behat3, then make sure that its version has junit formatter support, as it was missed in early versions https://github.com/Behat/Behat/pull/676
Also check that you have configured profile at behat.yml
behat 2
jenkins:
formatter:
name: pretty,junit
parameters:
output_path: ,build/logs/behat
behat 3
jenkins:
formatters:
junit: [build/log/behat]
Also build.xml must call it as "behat --profile jenkins"
I may assume that you have configured your test result path not to be related to Jenkins workspace (usually, this is the directory which you run tests from). JUnit result xml path should be configured in relation with Jenkins workspace directory, which is the root directory for you xml reports.
I am developing an app named "AndroidDataBase".
while am trying to compile in eclipse I am getting this error
Error executing aapt: Return code -1073741819 AndroidDataBase line 1 Android ADT Problem
and
Project 'AndroidDataBase' is missing required Java project: 'GoogleMaps' .
Where GoogleMaps is another androidApp.
I have the GoogleMap.java in AndroidDataBase "Src" folder.
I have tried clean build ,restarting eclipse sort of things ,still no result
Why am i getting this error ,and how to resolve it?
Thanks in advance
I have added the GoogleMap.java
the issue is activity_googlemap its not getting identified
although it is present in res/layout
You need to add the "google-play-services_lib" project as a library project. You will find it in your_sdk_root_path/extras/google/google_play_services/libproject/google-play-services_lib
Set your Project Build Target to Google API Build. From right click on project and go to Preference>Android tab>Select Target build of Google API.
I Dint installed the "Google Play Service" present in the SDK Manager .
Once I did that ,all I need is to follow the solution of # Joan P.S(Stated above I have accepted the ans,thanks to him.).
After that I have to add the Google MAP project(import it to the current work space(another app )) in Properties->Java Build Path->Projects .
That's how it got solved