- Error Execution failed for task ':sonarqube'.
Unable to load component class org.sonar.scanner.scan.ProjectLock
Tested with Gradle 4.8 and plugin org.sonarqube 2.5
- Solution
I upgraded the sonarqube plugin to version
2.6.2
and now its working.
Task.metaClass.runFirst = { Task... others -> | |
delegate.dependsOn(others) | |
delegate.mustRunAfter(others[0]) | |
for (def i=0; i < others.size() - 1; i++) { | |
def before = others[i] | |
def after = others[i+1] | |
after.mustRunAfter(before) | |
} | |
} |
Unable to load component class org.sonar.scanner.scan.ProjectLock
Tested with Gradle 4.8 and plugin org.sonarqube 2.5
2.6.2
and now its working.We run ./gradlew sonarqube
And get the error:
Execution failed for task ':sonarqube'.
You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.
Tested with Gradle 4.8 and plugin org.sonarqube 2.6.2.
task deployEb(type: AWS, group: group) { | |
description 'Deploys application in AWS Elastic Beanstalk' | |
doFirst { | |
run "aws configure set default.region $awsRegionName" | |
run "aws s3 cp $buildDir/$jarLocal s3://$awsBucketName/$awsJar" | |
run "aws elasticbeanstalk create-application-version --application-name=$awsAppName --version-label=$buildNumber --source-bundle S3Bucket=$awsBucketName,S3Key=$awsJar" | |
run "aws elasticbeanstalk update-environment --environment-name=$awsEnvName --version-label=$buildNumber" | |
} | |
} |
branch-defaults: | |
dev: | |
environment: PROD | |
master: | |
environment: PROD | |
deploy: | |
artifact: build/fobit-docker.jar | |
environment-defaults: | |
PROD: | |
branch: master |
sourceSets { | |
myCustomSourceFolder { | |
// Create the structure myCustomSourceFolder/java/your-package | |
// Ref https://docs.gradle.org/current/userguide/organizing_gradle_projects.html | |
} | |
} |
# [python3][pip] | |
apt install python3-pip | |
sudo vi /usr/bin/pip3 | |
# change from | |
from pip import main | |
# to | |
from pip._internal import main | |
# after this pip3 and pip are poiting to pip3! |
pip install awscli --upgrade --user | |
# add on PATH: ~/.local/bin | |
complete -C aws_completer aws | |
# then run it in your .git folder | |
aws configure |
task createPackageToAWS(type: Exec) { | |
doFirst { | |
executable "sh"; args "-c", "jar cf build/app-docker.jar Dockerfile build/libs/app.jar" | |
} | |
} |
export AWS_ACCESS_KEY_ID="AAAAAAAAAABBBBBBCCCC" | |
export AWS_SECRET_ACCESS_KEY="AAAAAAAABBBBBBBBBCCCCCCCDDDDDDDEEE" | |
export AWS_DEFAULT_REGION="us-east-1" |