Monday, October 26, 2015

Documentation for Maven archetypes

I don't start new projects in Java often. Each time I do it I have to go thru terribly written Maven documentation. 10 maybe 13 years ago when I was writing my first projects with Maven documentation was terrible and absolutely nothing has changed. If I didn't know what I am looking for I would be terribly lost. Even when I know what I want it takes me huge amount of time to figure out how it is labeled in Maven project. Have a look at a difference between Simple and Quickstart project archetypes.
  1. Simple: An archetype to generate a simple Maven project.
  2. Quickstart: An archetype to generate a sample Maven project.

Wow, now I learned something definitely. Guys, what is the difference between simple and sample. Which archetype should be used just to create a playground application to write some code and unit test it. I mean library project type. I just want to run tests on my code to check something.
What a wonderful explanation we get when we dig into a given archetype. When you click on Simple project you see this. What is it - empty page. Maybe some explanation of what do I see here. Not to mention that I would expect to see a in depth explanation of when should I use it and why should I use this one.
I am speeches, how can you have something like that. The sad part is that Maven is not the only project in Jave world that is terrible in documentation.
To answer my question about which archetype to use. I recommend using quickstart, that will create a following project structure.
project
|-- pom.xml
`-- src
    |-- main
    |   `-- java
    |       `-- App.java
    `-- test
        `-- java
            `-- AppTest.java

No comments: