Solved

convention vs configuration---maven

Posted on 2013-11-20
1
377 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now