Solved

convention vs configuration---maven

Posted on 2013-11-20
1
380 Views
Last Modified: 2013-11-25
Hi,

I was reading about Maven. Author says 'Maven uses convention over configuration'.

'Developers can build any given Maven project without need to understand how the individual plugins work. '
I have not understood clearly what it means. Is it not same with ANT builds as well.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39664531
convention over configuration
Basically just means that as far as possible, some sane default values have been chosen for plugin parameters. So for example, you don't need to tell the maven-compiler-plugin that your Java source files are in  "src/main/java". It is the default, and it is a well known default, so that you (or a tool) can just create those directories and place .java files within, and the build process will just work.

That is what the tag line is all about... "convention" ie. look in src/main/java, over "configuration" ie. rather than having to explicitly say that my source files are in src/main/java.

Note, that this doesn't mean that you can't configure the build process with different parameters, ie. you can put your source files elsewhere and configure the compiler to match.

The difference with Ant is that it's build file will explicitly state a lot (most) of the required parameters. Note though, that you probably don't see much of a difference if you are using some other tools on top of these, such as a modern IDE like Eclipse. It will hide a lot of the configuration, even for an Ant build.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question