I have recently started exploring Maven, but I feel a bit overwhelmed of all xml configuration in all the pom files. Are there any good tools i can use?
This tip works with any good XML editor.
By far the best guide you can have is the XML schema (the 'XSD' file), which defines all the structures and what they do.
At the top of your POM, ensure the 'project' element is defined like this:
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Now when you edit the file in any good editor (including jEdit or Eclipse) the editor will actually download the .xsd file from the URL above and use it to guide you and validate the POM.
e.g. in Eclipse, go somewhere in the POM and hit Ctrl-Space - it will bring up a list of valid elements for the current position.
m2eclipse, it provides a very nice form-based editor. But I only use the XML view most of the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With