"Execute decorators" phase takes forever - maven-3

I was just analyzing our (1 main/ 3 sub) project and wanted to analyze the code with my local Sonar server by typing mvn sonar:sonar (after cleaning and packaging the project(s)).
It successfully analyzes the EJB project but in the phase Execute decorators ... it takes forever to complete (around half an hour). This makes the analysis of the project very slow. What is going on in that phase and how can I improve the speed?
Best regards,
Sebastian
Versions used:
Maven 3.0.3
Sonar 2.10

According to this, it could be linked to using Derby, the only proposed solution is using a stronger db instead.
Following comments from sinbadblue here are links to discussions with answers from sonar team members which suggest 2 known reasons for execute decorator to be slow :
Using derby
Having the database server on a different network from the analyzer
Here are the links
2010 http://comments.gmane.org/gmane.comp.java.sonar.general/4902
2011 http://sonar.15.x6.nabble.com/Sonar-slow-in-quot-Execute-Decorators-quot-td3187847.html
2012 http://sonar.15.x6.nabble.com/Sonar-analysis-remains-on-Execute-Decorators-for-Net-Applications-tp4514700p4515249.html
The database is not always the issue but these 2 should definitely be checked before further investigation.

Related

Number of lines of code - SonarQube licensing

With below configuration setting in Jenkinsfile(groovy) for sonar-project.properties:
1) sonar.projectKey=MyProject-${BUILD_NUMBER}
and
2) sonar.projectName=MyProject-${BUILD_NUMBER}
where ${BUILD_NUMBER} is Jenkins build number
new project is created in SonarQube server for every new ${BUILD_NUMBER}
1) With such naming convention, Is their an impact on licensing of SonarQube V6 in terms of lines of code coverage? if yes, Does sonar.projectName=MyProject & sonar.projectKey=MyProject naming help resolve such licensing issue?
2) Does above approach consume more memory in SonarQube database or other resources in SonarQube server?
3) How to delete all these projects at one go, in SonarQube server? if needed ..
If you change the project key for every analysis, then each analysis will be considered as a new project, adding line of code until you reach your license limit.
It will also use more space in DB.
To delete all projects, you can go to Administration > Projects > Management (at least with SonarQube 7.7) and do a bulk delete.

Jenkins +Sonar +ANT+Cactus +hangs at clean snapshot

I'm having problem running Sonar analysis through Jenkins. Using a Post Step with "Invoke Standalone Sonar Analysis" to start a Sonar Runner task. I can see the result from the analysis in the dashboard but the build in Jenkins never ends. It seems that the cleanup task in Sonar hangs. I am using H2 database and CANNOT change to other databases.
Jenkins is installed in Linux machine and is Sonar version is 3.7.4
How to resolve that clean snapshot hang part?
H2 database is not supported for production environments (but you seem to be aware of this fact). Furthermore, it is preventing you from upgrading to a recent version of SonarQube, since database migrations are not supported either on H2.
That being said, and if losing your project history is not important, you can try to switch to a recent SQ server and runner (respectively 4.4 and 2.4 as of writing), as there were quite a few improvements and bug fixes since last year.
H2 is not recommended for production as in sonar documentation stated. But if you are not awared of the history of sonar analysis, you can do the following (keep on using H2):
In Linux:
Stop sonar: service sonar stop
Delete sonar*.db under /opt/sonar/data
Start sonar again: service sonar start
Then run analysis again.
It should work, good luck.

DotNetNuke Install.aspx?mode=InstallResources Automation

Issue:
I am trying to automate the build and installation of DNN modules on a build server. We are currently using DNN 5.5 and TFS for source control and build automation. The TFS build works as expected (getting, compiling, building/copying DNN packages) but when executing the Install.aspx?mode=InstallResources URL we get the "Site is under construction". The event log for DNN does not reveal any information. If I log in to the build server using my Id or the build server id and run the this script, everything works as expected. It’s when the script is started from the scheduler that the DNN InstallResouces URL has issues. The build id used is an administrator on the build server. I have search the web for others doing the same but only found one that stated they wrote an exe utility that submits a HTTP request and parses the response for the success or fail of the resources. Is this the only option? Any other ideas?
I would recommend that you nit work with Instances of your software from build. It is a bad practice and you need many workarounds to get things going. I would recommend that you install Release Management which is specifically designed to do what you are asking. It just has better tooling and configuration options for this.
http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/
I created a post on this not to long ago and you can get more info in Professional ALM with Visual Studio 2013 on building and configuring a release pipeline. This way you are deploying tested binaries and not creating untested new ones for future deployments.
Resolution: The issue was resolved by setting the correct permissions for the TFS build user to execute the DNN install resources. The script being executed needed to load the Windows user profile when the script was being executed.

Continuous Integration Clarification

I work in a team which maintains a Java website and back end java jobs and shell script jobs.
After all developers complete their updates, only the relevant ones are committed to source control system.
Later ant build scripts are run and war files are generated.
Along with these war files there will genrally be shell scripts etc to be copied to QA/PROD.
Then one fine day there is a team call the release management team which will transfer the code from our Dev environment to QA/PROD.
Recently I came across the Continuous Integration systems like Jenkins/Hudson.
Can these tools build all the changes committed and automatically transfer my code to QA/PROD.
BTW I work in a AIX Server environment and use Tomcat as the Container.
I am more curious whether the tool will be able to copy my code to QA/PROD.
Please Clarify.
The answer is almost certainly yes, depending on your particular setup for copying the code. There is a large number of plugins for this purposes at the appropriate Jenkins wiki page. You should be able to find something there for your needs.

Continuous Integration System for Delphi

Are there any CI-Systems for Delphi like Hudson for Java?
Does Hudson has any Delphi integrations?
We use Hudson :), which works just fine with Delphi.
Here's a complete setup for one of my projects:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.CVSSCM">
<cvsroot>:sspi:cvsonly:foo#bar:/baz</cvsroot>
<module>SIP</module>
<canUseUpdate>false</canUseUpdate>
<flatten>true</flatten>
<isTag>false</isTag>
<excludedRegions></excludedRegions>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<triggers class="vector"/>
<builders>
<hudson.tasks.BatchFile>
<command>"C:\Program Files\Nant\bin\nant" -buildfile:etc\sip.build build-d7 test</command>
</hudson.tasks.BatchFile>
</builders>
<publishers>
<hudson.tasks.BuildTrigger>
<childProjects>quux, foozle, wibble</childProjects>
<threshold>
<name>SUCCESS</name>
<ordinal>0</ordinal>
<color>BLUE</color>
</threshold>
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers/>
</project>
sip.build's delphi-7 target builds the project's test suite (DUnit's TextTestRunner) and so the output of the job is simply the count of failed/error tests thanks to:
var
R: TTestResult;
begin
R := TextTestRunner.RunRegisteredTests;
ExitCode := R.ErrorCount + R.FailureCount;
end;
FinalBuilder Server
now replaced with :
Continua CI
We use CruiseControl.NET, which works perfectly with Delphi.
It seems Embarcadero itself uses Hudson. See the comment from Nick Hodges, Development Manager at Embarcadero. http://blogs.embarcadero.com/nickhodges/2010/03/10/39369#comment-29952
Hudson is great, it is also available as MSI setup. Users of older Delphi versions (pre MSBuild), can create build scripts with the popular Apache Ant and NAnt build script environments. Simple command line (batch script) builds are possible too of course.
One of the highlights of this
installer is that it comes with a JRE,
to be fully self-contained. This is
because Windows users don't normally
know what to do with the *.war file,
and they generally don't like going to
the command prompt and running Java
command manually.
So it is easy to try without going through too many installers and command lines first.
And after installation make sure to visit the plug in page in the administration app, there are many extensions available which are also useful for Delphi developers. A plugin overview is online here.
Hudson tools for Delphi: there is also a Code Coverage tool for Delphi with Hudson support here.
TeamCity is another very nice CI system. It is a commercial product, but offers a free license for up to 20 users and 20 build configurations on 3 build agents.
Bamboo is a CI system for any language. It is available from Atlassian. Its price starts at $10 - this includes all features and unlimited users, but limited to 10 plans, running builds only on the server where it is installed. It can use Amazon Elastic Compute Cloud instances as remote agents.
Automated Build Studio from SmartBear. With Automated Build Studio Server, it introduced CI some time before FinalBuilder.
We use jenkins.
Jenkins has a RAD Studio plugin to integrate the compilation of Delphi projects into jobs. It's not mandatory to use it (plugin), we use command-line tools and MSBuild to compile the projects.
The project DUnItX (to create unit testing) integrates seamlessly with Jenkins.
Here you can find some articles about the integration of Jenkins and Delphi. Introduction, installation,... Are in Spanish but you can translate without problems and with included images and code are quite simple.
1- Integración continua con Delphi (GIT) (INTRODUCTION)
2- Integración continua con Delphi (Jenkins) – Instalación (INSTALLATION)
3- Integración continua con Delphi (Jenkins) – Primer proyecto (FIRST PROJECT)
4- Integración continua con Delphi (Jenkins) – Pipelines (USE OF PIPELINES)
Add our Parabuild to the list of tools to check out - it builds practically anything that can be built from the command line - that includes Delphi, and it provides integration with Perforce and other version control systems such as Git and Bazaar.
Hudson is simple to use, with some web-based assistants, as Delphi projects are built with MSBuild.
If you need more customization and 3rd party tools integration (integrate metrics tools for example) then CruiseControl.NET is the ideal solution.
Have a look to my CC.NET Dashboard page for DelphiCodeToDoc (and you can have a look to the configuration file also). I'm doing checkout + compilation of gui and command line version and unit test + unit test execution and report + ftp upload build delivery.
Just to throw my support for CruiseControl.NET, as Delphi 2007 and above are based around MSBuild, then there should be no problem with builds via CC.NET. There is a patch somewhere for DUNit, so that it outputs the results to an XML file, and this can then be integrated into the builds results charts.
errrm, can you define what you are actually looking for?
You use the phrase continuous integration, but do you just mean continuous build to make sure it compiles and likes, or do you actually mean continuous integration in the sense that you also run regression tests?
I would be curios as to how you do that (Auto-it?).
Not that it really matters too much, because the wonderful Hudson (which is decidedly not just for java) has numerous plug-ins, but will also allow you to execute a DOS batch script - any script that you care to write, to build, to test, to report results, etc.
Another option (although not free, $10 for limited # of users) is Atlassian Bamboo. And JetBrains TeamCity is another that is free (with limited # of users). I've tried both with Delphi 2009/2010, and they work quite well. Both allowed integration with Perforce among other SCM's.
We use Jenkins CI system with Owly CI tool as the build system and dependency handler.
Take a look on this tutorial
Initial setup takes less than 5 minutes

Resources