SDET Interview Questions and Answers.
Jenkins Interview Questions and Answers.
Appium Interview Questions and Answers
Selenium Interview Questions and answers.
GIT Interview Questions and Answers
MAVEN:
Jenkins Interview Questions and Answers.
At first glance Maven can appear to be many things, but in a nutshell Maven is an attempt to apply patterns to a project's build infrastructure in order to promote comprehension and productivity by providing a clear path in the use of best practices. Maven is essentially a project management and comprehension tool and as such provides a way to help with managing:
- Builds
- Documentation
- Reporting
- Dependencies
- SCMs
- Releases
- Distribution
Pipeline Script Fundamentals
Click Here: DevOps Related Posts
- How does Maven manage dependencies and transitive dependencies? Ans: Maven manages dependencies and transitive dependencies through the use of a Project Object Model (POM) file. This file contains information about the project, including a list of dependencies and their versions. When a project depends on another project, Maven will automatically include that project's dependencies (transitive dependencies) in the final build, eliminating the need for manual management of these dependencies. Maven uses a repository to store these dependencies, and it will automatically download them from the repository when they are needed. Additionally, Maven uses a dependency hierarchy to resolve conflicts between different versions of the same dependency, using the "nearest definition" strategy.
- How to install Maven on Linux machine? Ans: Click Here for Answer with code & Screenshots
- What is a SNAPSHOT version?
pom.xml
file shown below has the suffix: -SNAPSHOT
.
- <project xmlns="http://maven.apache.org/POM/4.0.0"
- ...
- <groupId>...</groupId>
- <artifactId>my-app</artifactId>
- ...
- <version>1.0-SNAPSHOT</version>
- <name>Maven Quick Start Archetype</name>
- ...
The SNAPSHOT
value refers to the 'latest' code along with a development branch, and provides no guarantee the code is stable or unchanged. Conversely, the code in a 'release' version (any version value without the suffix SNAPSHOT
) is unchanging.
In other words, a SNAPSHOT version is the 'development' version before the final 'release' version. The SNAPSHOT is "older" than its release.
During the release process, a version of x.y-SNAPSHOT changes to x.y.
The release process also increments the development version to x.(y+1)-SNAPSHOT. For example, version 1.0-SNAPSHOT is released as version 1.0, and the new development version is version 1.1-SNAPSHOT.
How do I send email notifications with groovy script in Jenkins pipeline?
Ans: This command removes the target directory before the starting of a build process.
• Compile: It is the default scope, and it indicates what dependency is available in the classpath of the project
• Provided: It indicates that the dependency is provided by JDK or web server or container at runtime
• Runtime: This says that the dependency is not needed for compilation but is required during execution
• Test: It says dependency is available only for the test compilation and execution phases
• System: It indicates you have to provide the system path
• Import: This indicates that the identified or specified POM should be replaced with the dependencies in that POM’s section
In Maven, the settings files are called settings.xml, and the two settings files are located at
• Maven installation directory: $M2_Home/conf/settings.xml
• User’s home directory: ${ user.home }/ .m2 / settings.xml
Click Here For POM.xml
Both plugins and dependencies are Jar files.
But the difference between them is, most of the work in maven is done using plugins; whereas dependency is just a Jar file which will be added to the classpath while executing the tasks.
So, we can say, plugin is a Jar file which executes the task, and dependency is a Jar which provides the class files to execute the task.
groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. You have to follow the package name rules, which means that it has to be at least as a domain name you control, and you can create as many subgroups as you want.
eg. org.apache.maven, org.apache.commons
artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. If it's a third party jar you have to take the name of the jar as it's distributed.
eg. maven, commons-math
1. surefire plugin
2. compiler plugin
3. resource plugin
12. What is the default scope that the maven uses if we do not specify the scope element in pom.xml?
Answer: Compile
How do I create documentation?
To get you jump started with Maven's documentation system you can use the archetype mechanism to generate a site for your existing project using the following command:
mvn archetype:generate \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DarchetypeArtifactId=maven-archetype-site \ -DgroupId=com.mycompany.app \ -DartifactId=my-app-site
Answer: We will use maven archetype to generate the maven folder structure based on the inputs.
Ex: mvn archetype:generate.
TOP INTERVIEW QUESTIONS
****************************************
TOP 15 BDD - CUCUMBER Interview Q&A
************************************************
✍️AUTHOR: LinkedIn Profile
************************************************
Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session
*************************************************
SeleniumWebdriver Automation Testing Interview Questions:
https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver
API Testing Interview Question Set:
https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html
DevOps Interview Q&A:
https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes
Docker Interview Question Set
https://automationreinvented.blogspot.com/Docker
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign
Java Related Interview Question Set
https://automationreinvented.blogspot.com/search/label/Java
GIT Interview Question Set:
https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html
Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions
Mobile Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Mobile%20Testing
Python Interview Question Set for QAE - SDET - SDE:
https://automationreinvented.blogspot.com/search/label/Python