Is it true that the only configuration file I need to bother with is pom.xml
?
It seems to me that Java guys live xml
more than any other stuff,is that true?
Is it true that the only configuration file I need to bother with is pom.xml
?
It seems to me that Java guys live xml
more than any other stuff,is that true?
You probably want to give some attention to the settings.xml file too. However, for the most part you are correct, everything is in the pom.xml
Is it true that the only configuration file I need to bother with is pom.xml ?
Yes, Maven uses a pom.xml
file to describe a project's medata and extend Maven's behavior, which also known as the Project Object Model (POM) file.
Maven will also look by default for a per user configuration file in ~/.m2/settings.xml
but this file is optional.
Why doesn't maven use scripts for this kind of job, I don't see xml has any advantage here, which is why I don't like ant
What should Maven have used in 2002 if not XML? Makefiles? In my opinion, XML was and still is a very decent choice for a declarative Project Object Model. Yes XML is verbose but it is perfect for the job and allows to benefit from nice things like validation, transformation, code completion which seem important to me.
Now, nothing forces you to use Maven if you don't like it and feel free to use Gradle or Gant or Buildr (if the size of their communities is not a concern).
Just in case, note that Maven 3 offers polyglot support (see this post and this one) but as I said, writing a pom in Groovy, YAML, etc doesn't only have advantages (e.g. validation).
Maven uses XML for POM files because XML is a good choice for describing things ... and a POM file is a description of a project. I supposed that the Maven implementors could have invented a custom language, but then lots of people would have complained about having to learn another language syntax.
It would make no sense to express Maven POM files in some kind of scripting language because they are not "scripts" in any recognizable sense.
It seems to me that Java guys live xml more than any other stuff,is that true?
No. "Java guys" use all sorts of technologies for configuring things: XML, JSON, properties files, databases, bespoke languages, you name it someone has used it.
If your problem is that you hate using XML, either:
Make
, But I'll stick with Maven, thanks.