For BE/B.Tech/BCA/MCA/ME/M.Tech Major/Minor Project for CS/IT branch at minimum price Text Message @ 9424820157

Top 20 Maven Interview Questions | Maven Interview Questions

Below are the Top 20 Maven Interview Questions based on the candidate's experiences and the company's interview pattern.

 

 

1. What is Maven?

Maven is a project management tool. It provides the developer a complete build lifecycle framework. On executing Maven commands, it will look for a POM file in Maven; it will run the command on the resources described in the POM.

 

2. Explain what is POM?

In Maven, POM (Project Object Model) is the fundamental unit of work. It is an XML file that holds the information about the project and configuration details used to build a project by Maven.

 

3. Explain what is Maven artifact?

Usually, an artifact is a JAR file that gets arrayed to a Maven repository. One or more artifacts a maven build produces such as compiled JAR and a sources JAR.

Each artifact includes a group ID, an artifact ID, and a version string.

 

4. Explain what is Maven Repository? What are their types?

A Maven repository is a location where all the project jars, library jars, plugins, or any other particular project-related artifacts are stored and can be easily used by Maven.

Their types are local, central and remote.

 

5. Explain how you can exclude dependency?

By using the exclusion element, dependency can be excluded

 

6. List out what are the build phases in Maven?

Build phases in Maven are:

1) Validate

2) Compile

3) Test

4) Package

5) Install

6) Deploy

 

7. Where do you find the class files when you compile a Maven project?

You will find the class files ${basedir}/target/classes/.

 

8. For POM what are the minimum required elements?

The minimum required elements for POM are project root, modelVersion, groupID, artifactID, and version.

 

9. Explain how to run test classes in Maven?

To run test classes in Maven, you need a surefire plugin, check and configure your settings in setting.xml and pom.xml for a property named "test."

 

10. What aspects are managed by Maven?

1) Builds

2) Documentation

3) Reporting

4) SCMs

5) Releases

6) Distribution

 

11. Define SNAPSHOT in terms of maven.

The snapshot indicates the current development copy.

 

12. What does the central repository consist of?

It consists of a large number of libraries that are frequently used.

 

13. Mention the phases of the cleaning lifecycle.

The lifecycle of cleaning consists of:

1) pre-clean

2) clean

3) post-clean

 

14. What is the purpose of mvn clean command?

The command removes the target directory before the starting of a build process.

 

15. What is an archetype?

Archetype is the maven plugin. It creates the project structure.

 

16. What are the minimum required elements for POM? 

The minimum required elements for POM are:

1) project root

2) modelVersion – should be 4.0.0

3) groupId – project’s group id

4) artifactId – artifact (project) id

5) version – version of the artifact

 

17. What is meant by the term ‘Build Tool’?

A build tool is essential for the process of building. It is needed for the following procedures:

1) Generating source code.

2) Generating documentation from the source code.

3) Compiling of source code.

4) Packaging of the compiled codes into JAR files.

5) Installing the packaged code in a local repository, server, or central repository.

 

18. What is meant by Maven Plugins?

Maven plugins are essential features of Maven that are used to reuse the common build logic across several projects.

The plugins are needed to carry out tasks like compiling code, testing them, creating JAR files, and documenting the projects.

 

19. What are the types of Maven Plugins?

There are two types of Maven Plugins:

 

1) Build plugins – These plugins are executed during the build and are configured in the <build/> element of pom.xml

2) Reporting plugins – These plugins are executed during the stage generation and are configured in the <reporting/> element of the pom.xml.

 

20. What is the ‘Goal’ in the Maven terminology? 

1) The term goal refers to a specific task that makes it possible for the project to be built and organized.

2) Phases that are a stage in the life cycle define the sequence in which the desired goals are to be accomplished.

 

No comments:

Post a Comment



Please go through below tutorials:


Mule 4 Tutorials

DEPLOY TO CLOUDHUB C4E CLIENT ID ENFORCEMENT CUSTOM POLICY RABBIT MQ INTEGRATION
XML TO JSON WEBSERVICE CONSUMER VM CONNECTOR VALIDATION UNTIL SUCCESSFUL
SUB FLOW SET & REMOVE VARIABLE TRANSACTION ID SCATTER GATHER ROUND ROBIN
CONSUME REST WEBSERVICE CRUD OPERATIONS PARSE TEMPLATE OBJECT TO JSON LOAD STATIC RESOURCE
JSON TO XML INVOKE IDEMPOTENT FILTER FOR EACH FLAT TO JSON
FIXWIDTH TO JSON FIRST SUCCESSFUL FILE OPERATIONS EXECUTE ERROR HANDLING
EMAIL FUNCTIONALITY DYNAMIC EVALUATE CUSTOM BUSINESS EVENT CSV TO JSON COPYBOOK TO JSON
CHOICE ASYNC

Widely used Connectors in Mule 3

CMIS JETTY VM CONNECTOR SALESFORCE POP3
JMS TCP/IP WEBSERVICE CONSUMER QUARTZ MONGO DB
FILE CONNECTOR DATABASE CONNECTOR


Widely used Scopes in Mule 3

SUB FLOW REQUEST REPLY PROCESSOR CHAIN FOR EACH CACHE
ASYNC TCP/IP COMPOSITE SOURCE POLL UNTIL SUCCESSFUL
TRANSACTIONAL FLOW

Widely used Components in Mule 3

EXPRESSION CXF SCRIPT RUBY PYTHON
JAVASCRIPT JAVA INVOKE CUSTOM BUSINESS EVENT GROOVY
ECHO LOGGER


Widely used Transformers in Mule 3

MONGO DB XSLT TRANSFORMER REFERENCE SCRIPT RUBY
PYTHON MESSAGE PROPERTIES JAVA TRANSFORMER GZIP COMPRESS/UNCOMPRESS GROOVY
EXPRESSION DOM TO XML STRING VALIDATION COMBINE COLLECTIONS BYTE ARRAY TO STRING
ATTACHMENT TRANSFORMER FILE TO STRING XML TO DOM APPEND STRING JAVASCRIPT
JSON TO JAVA COPYBOOK TO JSON MAP TO JSON JSON TO XML FLATFILE TO JSON
FIXWIDTH TO JSON CSV TO JSON


Widely used Filters in Mule 3

WILDCARD SCHEMA VALIDATION REGEX PAYLOAD OR
NOT MESSAGE PROPERTY MESSAGE IDEMPOTENT FILTER REFERNCE
EXPRESSION EXCEPTION CUSTOM AND


Exception Strategy in Mule 3

REFERENCE EXCEPTION STRATEGY CUSTOM EXCEPTION STRATEGY CHOICE EXCEPTION STRATEGY CATCH EXCEPTION STRATEGY GLOBAL EXCEPTION STRATEGY


Flow Control in Mule 3

CHOICE COLLECTION AGGREGATOR COLLECTION SPLITTER CUSTOM AGGREGATOR FIRST SUCCESSFUL
MESSAGE CHUNK AGGREGATOR MESSAGE CHUNK SPLITTER RESEQUENCER ROUND ROBIN SOAP ROUTER