New question about maven
Maven uses XML for POM files because XML is a good choice for describing things ... and a POM file is a project description. I assumed that the Maven developers could invent their own language, but then many people would complain about learning the syntax of another language.
It would be pointless to express MOV POM files in some 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 this true?
No. The "Java guys" use all sorts of technologies for customization: XML, JSON, properties files, databases, typed languages, you name it, someone else used it.
If your problem is that you hate using XML, follow these steps:
- Deal with it,
- get an editor that hides the XML syntax from you,
- use (shudder)
Make
, - use (whimper) build scripts written in some old scripting language, or
- leave and implement the best solution.
But I'll stick with Maven, thanks.
a source to share
Is it true that the only config file I need to worry about is pom.xml?
Yes, Maven uses a file pom.xml
to describe project metadata and extends Maven's behavior, which is also known as a project object model (POM) file.
Maven will also appear by default for each custom config file in ~/.m2/settings.xml
, but this file is optional.
Why doesn't maven use scripts for this type of work, I don't see the xml has any advantage here, so I don't like ant
What was Maven supposed to use in 2002 if not XML? Makefiles? In my opinion, XML was and remains a very worthy choice for a declarative project object model. Yes, XML is verbose, but it's perfect for the job and allows you to take advantage of nice things like validation, transformation, code completion that I find important.
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 community is not an issue).
Just in case, note that Maven 3 offers polygon support (see this post and this one ), but as I said, writing pom in Groovy, YAML, etc. has more than advantages (e.g. validation).
a source to share
You probably want to pay attention to the settings.xml file . However, for the most part, you're right, everything is inpom.xml
a source to share