Welcome to the Question and Answer site for Software Testing Professionals

You can get your queries resolved from Software Testing Professionals.

Ask a Question

Get answers and give answers to questions from other members.

View All Questions

Get votes and earn points to build your reputation in community.

View Hot Questions

0
Can u explain what is Maven all about and what is dependency?

Solved 2 Answers 52 Views
0 2
I am new to Java and Maven. Can u explain what is Maven all about and what is dependency?

2 Answers

1
Best answer
1

As per the test automation services Apache Maven is a Software project management and comprehension tool. It is based on the concept of a project object model (POM).Maven can perform many operations like manage a project's build, reporting and documentation from a central piece of information.

Maven provides developers a complete build lifecycle framework. Development team can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.
Maven provides developers ways to manage following:
• Builds
• Documentation
• Reporting
• Dependencies
• SCMs
• Releases
• Distribution
• Mailing list

Maven Dependency:
Maven's dependency-handling mechanism is organized around a coordinate system identifying individual artifacts such as software libraries or modules.Dependency management is one of the features of Maven that is best known to users. Through the local repository,projects developed on a single machine can depend on each other . The local repository acts both as a cache for downloaded dependencies and as it is a centralized location for locally built artifacts.

For a single project, it is not difficult to manage dependencies but for handling a project with multiple modules Maven is capable enough for maintaining control and stability.
Section for maven dependency is a mechanism for centralizing dependency information. For a set of projects that inherits a common parent, it's promising to put all information about
the dependency in one common POM and have references to artifacts in the child POMs.

 

answered by (408 points)
selected by
2Comments
commented by (200 points)
Hi Rajeev,

Thank you for posting the answer. Kindly specify the source.

Thank you
commented by (408 points)
The Maven Source Plugin creates a jar archive of the source files of project. By default, this jar file is created in the target directory of the project.
The Maven Source Plugin have 5 goals:

1. source:aggregate :The aggregates sources are for all modules in an aggregator project.
2. source:jar: This is used to bundle the main sources of project into a jar archive.
3. source:test-jar: It is used to bundle the test sources of the project into a jar archive.
4. source:jar-no-fork : This is similar to jar but does not fork the build lifecycle.
5. source:test-jar-no-fork :This is similar to test-jar but does not fork the build lifecycle.

POM Syntax For Maven Source Plugin:
    <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
0
0

What is maven?

Maven is a project management tool. It will help you define project structure and define group ID, artifact name, your CI URL and many more things about the project you can include into Maven.

Most of the time we use maven to manage the dependencies.

So, when you use Maven, it will put all your dependency into the central location and all your projects will use dependency from there. It will ultimately reduce your project size.

Say, you have the project where you are using Selenium and Cucumber dependency
your project size will be around 25 MB.

If you use Maven, all you need is just one pom.xml file and inside pom.xml file you can define your Selenium and Cucumber dependency. So, maven will automatically download it and add it to your build path.

So, your project size will be reduced to some KBs like approx 500 KBs.
Also, updating and managing dependencies will be easy with maven.

What is the dependency?
Dependencies are set of the JAR files that are required by your project

answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

We have resolved 1.2k+ Software Testing queries!

Software Testing Board Weekly update

We will send you handpicked questions that you would love to answer.

View previous campaigns.

Top Contributors

...