Maven Course
Maven Course
Maven Course
->mvn -version
4.Maven is _______________
->mvn help:effective-pom
7.What are the minimal coordinate attributes required for pom xlm file
->groupId:artifactId:version
->project.xml
->[3.8,4.6)
->repository
12.Maven search for dependency in ___________________
->2.0.7,2.0.8
->F
->[, 3.8]
->compile->Test->Package->integrate->validate->verify->install->deploy
-> Repositories
A build goal is peripheral for a phase when pom binds all goal to the corresponding life cycle
->T
->V,c,t
->default,clean,site
->where is mvn
i. groupId
ii. artifactId
iii. package
iv. version
->mvn-compile-plugin
24.How can we compile and generate war file using single command
->mvn package
26.What is archetype
27.To generate war file using single command,which command in these option is correct
->Web Application
29.Syntax to create maven project.
->mvn archetype:generate
->-Dsurefire.junit4.upgradecheck
32.Maven plugin is
->mvn surefire-report:report
a: exec-maven-plugin
Build Plugin - Used while executing the build. They are included in <build> element of the POM.
Reporting Plugin - Used while generating the site. They are included in <Reporting> element of the POM.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
Click manage plugins, then select the available tab by searching for GitHub from the search box.
Select the GitHub plugins for installation and click download button.
Click Save.
Click Advance button twice, and you will get a checkbox option.
Select Skip internal tag. (If it is not checked, Jenkins will create separate tags in the repository.)
Scroll down to Build section, select Invoke top-level, then Maven targets from the drop-down list.
Go to Git and find your folder where POM.xml file exists. (e.g. App/pom.xml)
Go to Test right click -> Select Add-> select Threads (Users)-> Thread User -> select Thread Group.
Now we can create actual test script or manual record the process.
Set Port.
Go to Thread Group-> Select Add -> Add Select Listener-> View Result in Table.
Take JMeter script and build it with Maven. We need JMeter Maven plugin.
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Change directory to the project from terminal and enter mvn verify.
To get a result in the form of a graph, use JMeter Graph Maven Plugins.
<groupId>de.codecentric</groupId>
<artifactId>jmeter-graph-maven-plugin</artifactId>
<version>0.1.0</version>
<configuration>
<inputFile>${project.build.directory}/jmeter/results/20170319-BlazeDemo Home
Page.jtl</inputFile>
<graphs>
<graph>
<pluginType>ResponseTimesOverTime</pluginType>
<width>800</width>
<height>600</height>
<outputFile>${project.build.directory}/jmeter/results/BlazeDemo
Request.png</outputFile>
</graph>
</graphs>
</configuration>
</plugin>
After this, we need to make some changes in the script, open the JMeter GUI and in Thread group for
Loop Count, increase parameter value to 100. This will help us to execute Thread request 100 times.