Unable to build JMeter 3.3 - jmeter

Whenever I am trying to build Jmeter 3.3 source code I am getting the following
Buildfile: E:\JMeter\apache-jmeter-3.3_src\apache-jmeter-3.3\build.xml
_check_3rdparty:
_message_3rdParty:
[echo] Cannot find all the required 3rd party libraries.
[echo] If building from a release, you can get most of them from the binary archive.
[echo] Use "ant download_jars" to download any missing jars.
BUILD FAILED
E:\JMeter\apache-jmeter-3.3_src\apache-jmeter-3.3\build.xml:1199: Cannot find required classes
Total time: 3 seconds
information the console I am using Eclipse IDE can anyone help with the steps on how to build an ant project and where should I use ant download_jars.

As per Executing Ant tasks from Eclipse you should be able to run download_jars task just like you're running build task.
If you need more detailed steps (however it shouldn't be the case for a person who wants to build JMeter from source)
From Eclipse main menu choose Window -> Show View -> Ant
Click "Add Buildfiles"
Locate build.xml in the root of JMeter sources downloaded folder
Now you have download_jars task
which can be run as ant build from context menu, it will retrieve all the dependencies and store them to "lib" folder
Just in case be informed that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter and JMeter 3.3 is kind of 5 years old so maybe considering migrating to JMeter 5.4.3 would be a better idea?

Related

Unable to run Jmeter 3.3 after updating core.jar in jmeter

I have a custom plugin for jmeter 2.13 earlier when I was creating a jar of the core package from the version 2.13 and using that jar in version 3.3 it was running fine Jmeter 3.3 was getting launched and all the functionalities were working fine but now when I am doing the same and starting the Jmeter.bat after updating the core.jar jmeter in jmeter 3.3, jmeter 2.13 is being launched.
How is the version being determined from the core jar?
One more thing I was trying to build the Jmeter 5.4.3 and 3.3 source code but there were lot of error due to jar dependencies I am feed up with removing the jar dependencies as due to different jar versions not supporting a set of methods.
What is the best way to build Jmeter 5.4.3 source code?
How is the version being determined from the core jar?
As of JMeter 5.4.3 the version is being returned by JMeterVersion.getVERSION() function
The same for JMeter 3.3
What is the best way to build Jmeter 5.4.3 source code
it's sufficient to invoke ./gradlew build command from the unpacked JMeter source bundle
With regards to your version mismatch problem take a look at compile time and run time dependencies concept, most probably you created some form of a Jar Hell due to your plugin "fat" jar includes JMeter core and it shouldn't be the case.
More information:
How to Write a plugin for JMeter
How to Develop a JMeter Plugin: Intro & Best Practices

Sonarqube configuration in jenkins for windows

I am trying to integrate Sonarqube in Jenkins for windows.
I have installed Jenkins 2.138.2 and Sonarqube scanner plugin version 2.8.1
Also installed Sonarqube-7.3 and added it to path variable.
Below is my configuration in Jenkins:
Under "Global Tool Configuration", for SonarQube Scanner
installations - I have selected "Install automatically" and choose
"Install from Maven Central".
Under "Configure System", I have specified name and server url for
Sonarqube servers.
For the job, I have selected "Sonarqube analysis with Maven" under
post build action step(shows this is deprecated).
I am getting the below error.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
SonarQube analysis completed: FAILURE
Build step 'SonarQube analysis with Maven' changed build result to FAILURE
Build step 'SonarQube analysis with Maven' marked build as failure
Is there anything wrong with the configuration.
Edit: Added job configuration screenshots.
Downloading of sonarqube can be done form https://www.sonarqube.org/downloads/ where downloading can be done irrespective to the requirements(here, downloading of Developers Version ver 7.4 is done)
a. It will be downloaded in a zip format and will contain the sonarqube accessing file in various platforms, unzip the folder and extract all the files in your local system.
b. Download the sonarqube scanner, it is helpful cause, it is the only way to start the code analysis, it is the most required or can be said as default launcher to analyse project with SonarQube.
c. To start sonarqube, the start/open the startsonar.bat file.
d. The sonarqube can be runs in default 9000 port.
e. Launch sonarqube locally in the system.

Maven Site / Project Info Reports Plugins Produce Empty Dependency Report

A dependencies report generated using the maven-project-info-reports-plugin is erroneously reporting only one project and zero transitive dependencies. However, a dependency-convergence report produces a complete list of dependencies. When running the project-info-reports:dependencies goal from the command line, either no output is being generated or the outputDirectory parameter is not working correctly (no report file is generated in the specified outputDirectory). Is there a default directory? I have only been able to produce the report with the mvn site plugin.
The only noticeable error I am getting is a series of "Artifact: XXXX has no file" errors, as reported in MPIR-251, but I'm wondering if this is a red herring and not indicative of the cause of the problem. Thoughts?
Configuration:
maven: 3.0.3
maven-site-plugin:3.1
maven-project-info-reports-plugin: 2.6
OS: Mac OS-X
As mentions at the usage page as
Maven has been configured to create the project info reports by default. There's no need to configure anything in your pom.xml to generate the project information reports.
Simply running
mvn site
If you would not to execute the site, please copy the maven-project-info-reports-plugin to the build. Please see the detail at my answer here. You may able to execute
mvn project-info-reports:dependencies
and you may see the result as your expected.
I hope this may help.
Regards,
Charlee Ch.

Integrating JMeter as part of Maven project

I'm starting my work on the project related to creating some custom set of jmeter components that would be bundled in my custom jmeter distribution.
Those custom components are part of the Maven project and what I would like to do is try to integrate this maven project with latest jmeter project to be able to build and deliver jmeter build that contains my custom set of components with all related dependency jars.
Problem is that jmeter project is ant project.
I've came across this: http://maven.apache.org/guides/mini/guide-using-ant.html, maven-antrun-plugin which gives a possibility to embed ant task inside the maven pom.
Since I've never worked with ant (only worked with maven), my idea of using this plugin inside pom would be to define following targets:
download jmeter source from svn repository
build jmeter distribution
after building maven project (after install phase), copy jars (component and dependency jars) to the jmeter lib to form the final jmeter distribution with my custom components.
My question is: Do you find this approach as the right one (are there some things to consider while doing this) and if not, can you suggest me some other ways of achieving the same goal?
Thanks in advance
Since JMeter 2.6, Apache JMeter artifacts are published on maven2 repositories.
See:
http://mvnrepository.com/artifact/org.apache.jmeter/
See for an example :
https://github.com/Ronnie76er/jmeter-maven-plugin/wiki
So what you can do is have your maven project that references these artifacts as dependencies.
And if you want to generate a full bundle containing JMETER+You Plugins then use AntRunner to :
Unzip the official distribution
Copy your artifact in jmeter/lib/ext and dependencies in jmeter/lib
rezip it

Sonar not picking up clover test results created by running maven in jenkins

I've been working on this all day and haven't been able to find a solution, so thought i'd turn to the stackoverflow community.
I have a server setup with Jenkins (version 1.454). It's configured to perform the build with Maven (version 3.0.4). The build command is as follows:
clean clover2:setup verify clover2:aggregate clover2:clover
Jenkins has the sonar plugin installed and configured. My sonar install (version 3) is on a different server to jenkins. After the build is completed, i can see the results on sonar (the basics of the build).
I have installed to sonar the clover plugin (sonar-clover-plugin-2.8.jar) manually by putting it into the 'extentions/plugins' folder. It appeared in sonar and I can configure it. I put in the license, version (3.1.4) and sonar.clover.reportPath as "target\site\clover\clover.xml".
When I run the build, it is successful as before, and I can see the basic results as before in Sonar, however, I cannot see any test code coverage results.
When I look at the maven build output I notice the following:
[INFO] Writing report to '/opt/jenkins/jobs/foo/workspace/target/site/clover/clover.xml'
and then near the bottom of the output:
[INFO] [15:08:36.586] Clover XML report not found
The following are also in my pom:
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.clover.reportPath>target\site\clover\clover.xml</sonar.clover.reportPath>
<sonar.surefire.reportsPath>target\surefire-reports</sonar.surefire.reportsPath>
<sonar.core.codeCoveragePlugin>clover</sonar.core.codeCoveragePlugin>
<sonar.clover.version>${clover.version}</sonar.clover.version>
When I look on the jenkins box, I can see that it has generated the clover.xml file (infact in my fiddling I have the clover plugin working on jenkins, so i can see the results there!).
I'm guessing at this stage that there is some issue with jenkins and sonar being on seperate boxes.
Any help would be appreciated!
Cheers.
After a lot more fiddling around, it appeared that I needed to change the following:
<sonar.clover.reportPath>${project.build.directory}/site/clover/clover.xml</sonar.clover.reportPath>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
A good reference was the following:
all about pom variables

Resources