Unable to build Lagom sample project - maven-3

I have setup sample java based lagom project from Tech Hub Project Starter.
I try to run the project as per given command at lagom site
mvn lagom:runAll
Gets this below error.
[ERROR] Failed to execute goal com.lightbend.lagom:lagom-maven-plugin:1.4.5-M1:runAll (default-cli) on project MyProject: Execution default-cli of goal com.lightbend.lagom:lagom-maven-plugin:1.4.5-M1:runAll failed: Unable to load the mojo 'runAll' (or one of its required components) from the plugin 'com.lightbend.lagom:lagom-maven-plugin:1.4.5-M1': java.util.NoSuchElementException
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: com.lightbend.lagom:lagom-maven-plugin:1.4.5-M1:runAll
Maven version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T01:19:05+05:30)
Java version: 1.8.0_102, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre
Help me to solve the build issue.

Related

TFS, Could not find a file on the SonarQube server SonarQube.MSBuild.Runner.Implementation.zip

SonarQube version 9.6 (Community Edition) Deployed on Azure
TFS 2018 Update 16.131 TFS
Sonarqube extension version 4.23.1.266 (Had to use an older version
because TFS only allowed <25mb extensions)
Code .NET Framework 4.7.2
I deployed sonarqube using this github repo. https://github.com/vanderby/SonarQube-AzureAppService. When executing the build in TFS, I get the following error.
2022-09-08T07:02:17.1827740Z ##[section]Starting: [DEPRECATED] Fetch the Quality Profile from SonarQube
2022-09-08T07:02:17.1936543Z ==============================================================================
2022-09-08T07:02:17.1940305Z Task : SonarQube for MSBuild - Begin Analysis
2022-09-08T07:02:17.1941880Z Description : [DEPRECATED] Fetch the Quality Profile from SonarQube to configure the analysis
2022-09-08T07:02:17.1943771Z Version : 1.0.50
2022-09-08T07:02:17.1945481Z Author : Microsoft Corporation
2022-09-08T07:02:17.1946562Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=620063)
2022-09-08T07:02:17.1947917Z ==============================================================================
2022-09-08T07:02:17.2127920Z ##[warning]Task 'SonarQubePreBuild' (1.0.50) is using deprecated task execution handler. The task should use the supported task-lib: https://aka.ms/tasklib
2022-09-08T07:02:17.2137624Z Preparing task execution handler.
2022-09-08T07:02:18.4131002Z Executing the powershell script: D:\Agent\TFS_AGENT_06\_work\_tasks\SonarQubePreBuild_eae5b2cc-ac5e-4cba-b022-a06621f9c01f\1.0.50\SonarQubePreBuild.ps1
2022-09-08T07:02:18.9665316Z ##[warning] The ownership of the SonarQube related build tasks is being transferred to SonarSource.
2022-09-08T07:02:18.9674084Z ##[warning] Please replace this build task with the one brought by SonarSource's extension on the marketplace: https://aka.ms/sqextension
2022-09-08T07:02:18.9681553Z ##[warning] For more details go to https://aka.ms/sqtransfer
Removed blank lines
2022-09-08T07:02:19.6273139Z SonarQube Scanner for MSBuild 1.1
2022-09-08T07:02:19.7283557Z Default properties file was not found at D:\Agent\TFS_AGENT_06\_work\_tasks\SonarQubePreBuild_eae5b2cc-ac5e-4cba-b022-a06621f9c01f\1.0.50\SonarQube.Bootstrapper\SonarQube.Analysis.xml
2022-09-08T07:02:19.7285250Z Pre-processing started.
2022-09-08T07:02:19.7285878Z Preparing working directories...
2022-09-08T07:02:19.7287268Z Checking for updates...
2022-09-08T07:02:20.2338425Z ##[error]Could not find a file on the SonarQube server. Url: https://myurl.azurewebsites.net/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2022-09-08T07:02:20.2342400Z ##[error]Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
2022-09-08T07:02:20.2344784Z ##[error]Pre-processing failed. Exit code: 1
2022-09-08T07:02:20.2596838Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
2022-09-08T07:02:20.2600986Z at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeBatchScriptCmdlet.ProcessRecord()
2022-09-08T07:02:20.2603205Z at System.Management.Automation.CommandProcessor.ProcessRecord()
2022-09-08T07:02:20.2918529Z ##[error]PowerShell script completed with 1 errors.
2022-09-08T07:02:20.2948851Z ##[section]Finishing: [DEPRECATED] Fetch the Quality Profile from SonarQube
I have seen multiple posts with the answer to install a C# plugin, but I am unable to find it in the plugin list. For example I found this github page which contains a link to download the plugin, but the url is not valid anymore.

Newer version Artifactory is having problems with Jenkins Artifactory plugin

I have two Artifactory servers, one is a version 3.4.1 and the other is 6.0.2
The Jenkins is configured to push to two Artifactories with different Ids as shown below
The old Artifactory is working fine and Jenkins is able to connect to it but, the new Artifactory is throwing an exception and is not able to connect to it.
Here is an excerpt from the log:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project JavaApplications: Could not resolve dependencies for project JavaApplications:JavaApplications:jar:1.0.0: Failed to collect dependencies at net.sf.jt400:jt400-full:jar:5.4: Failed to read artifact descriptor for net.sf.jt400:jt400-full:jar:5.4: Could not transfer artifact net.sf.jt400:jt400-full:pom:5.4 from/to central (http://artifactory/artifactory/libs-release): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
Clearly, something to do with the certificates? please help
You need to add Jenkis *.crt file into cacerts. There is simple guild on Artifactory page.

TFS sonar build failed with .pdb file not found

Our sonar build (XAML Build) for TFS is failing with below mentioned error
Start Sonar-runner
ERROR: Error during Sonar runner execution
ERROR: Unable to execute
Sonar ERROR: Caused by: Cannot find the .pdb file "C:\Builds\1\ABC\Sonar_t\src\NET-WIN\Order\Entry\Entryl\Loss.......\Referentials\Commercial\Rules\bin\Debug\essel.Order.Referentials.Commercial.Rules.pdb" inferred from the property "sonar.cs.fxcop.assembly".
ERROR: ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch. ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
The project/solution was created in Visual Studio 2008 version and our build server runs Visual Studio 2015 so I pass /toolsversion:3.5 as an MSbuild argument.
Environment details
TFS 2015 update 1 (build server)
sonar version 4.5.1, sonar runner - 2.4, C# plugin 3.3
The CI build for the same solution is successful but sonar build is showing partially succeed with missing .pdb file
What could be causing this ?

SonarQube 6.0 doesn't find project on TFS 2015

I have a ASP.Net Web Application using .Net Framework 4.5.1 and it's building on the TFS Buildserver (on premise), but SonarQube doesn't perform the analysis. All other buildsteps are successfull. SonarQube 6.0 is a fresh installation, the Runner was installed around a year ago.
The necessary .Net Frameworks for SonarQube and Builds are installed on the build machine.
On a WebAPI Project the analyzer works like a charm. What could it be?
******************************************************************************
Starting task: Fetch the Quality Profile from SonarQube
******************************************************************************
Executing the powershell script: C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.ps1
SonarQube Scanner for MSBuild 1.1
Default properties file was not found at C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
Checking for updates...
SonarQube Scanner for MSBuild Begin Step 2.1
14:41:58.919 Default properties file was not found at C:\Agents\Agent1\_work\14\.sonarqube\bin\SonarQube.Analysis.xml
14:41:58.929 Updating build integration targets...
14:41:58.939 Fetching analysis configuration settings...
14:41:59.039 Generating rulesets...
14:42:00.119 Provisioning analyzer assemblies...
14:42:00.119 Installing required Roslyn analyzers...
Pre-processing succeeded.
******************************************************************************
Finishing task: SonarQubePreBuild
******************************************************************************
... building solution, publish symbols & drop ...
******************************************************************************
Starting task: Finish the analysis and upload the results to SonarQube
******************************************************************************
Executing the powershell script: C:\Agents\Agent1\tasks\SonarQubePostTest\1.0.36\SonarQubePostTest.ps1
SonarQube Scanner for MSBuild 1.1
Default properties file was not found at C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml
Post-processing started.
SonarQube Scanner for MSBuild End Step 2.1
14:40:50.486 WARNING: Failed to find the code coverage command line tool. Possible cause: Visual Studio is not installed, or the installed version does not support code coverage.
The exclude flag has been set so the project will not be analyzed by SonarQube. Project file: C:\Agents\Agent1\_work\14\s\TdbWeb\TdbWeb\TdbWeb.csproj
No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details.
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
14:40:50.526 Creating a summary markdown file...
Post-processing failed. Exit code: 1
Unexpected exit code received from batch file: 1
The build was not set to fail if the associated quality gate fails.
******************************************************************************
Finishing task: SonarQubePostTest
******************************************************************************
You need Visual Studio Enterprise edition for code coverage and you are using VS Pro. Have a look at this page and expand the 'tesing tools' section. Code coverage is only listed for the Enterprise edition.

Issue building Grails project with Maven

I'm creating a "Mavenised" Grails project but am having trouble running the maven install goal on the project.
To create the project I've used the following archetype: grails-maven-archetype
It has built my project structure correctly and set up all the necessary configuration files (pom.xml etc)
However, when I run mvn install on this I get the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.206s
[INFO] Finished at: Thu Mar 15 10:40:15 GMT 2012
[INFO] Final Memory: 65M/366M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.0.1:maven-test (default) on project MyApp: Unable to start Grails: java.lang.reflect.InvocationTargetException: Native Library C:\Users\<username>\AppData\Local\Temp\jline_.dll already loaded in another classloader -> [Help 1]
However when I run the grails goals that this is trying to run individually e.g. mvn grails:maven-compile they work and I am able to fully build the project.
I am guessing when running mvn install the process is locking the jline_.dll and not releasing it before trying to read it in again in the next goal.
Has anyone seen this issue before? Any advice on how to get around this?
I really need mvn install to build the project correctly so I can set up effective build scripts.
Thanks!
The 2.0.1 version doesn't work on Windows machines. Known issue. Sorry about that, you will need to wait for 2.0.2

Resources