Hi all.
Today the pom checker gave a huge step and it's already verifying if the
pom.xml has duplicate dependencies (managed or not) and properties.
Now I would like to bring the discussion about the pom xml elements
order. I tried to use XSD but it seems to strict since I think we only
need to check some main elements. I chose the following elements in the
following order: parent, modules, properties, dependencyManagement,
dependencies, build, profiles.
All of them are optional. They don't need to be present, but if so, they
must follow it's place in the order. If you have any comments about the
chosen elements and it's order, please let me know.
Thanks.
Em 14/02/13 18:25, Rafael Benevides escreveu:
Hi all,
JDF is growing each day. As a consequence, keep the quickstarts
consistent is becoming a hard work.
To mitigate this and help the maintenance of the quickstart and also
to help the contributors to see if their quickstarts are ready to
review, we are planning and starting the development of a tooling for
quickstart automation.
This tool will make use of some other well know and opensource
projects like PMD (
pmd.sf.net), checkstyke (
checkstyle.sf.net), Maven
Enforcer plugin, etc to attend the following requirements:
* Validating quickstart POM files:
o Check for the License header (checkstyle headers
<
http://checkstyle.sourceforge.net/config_header.html>)
o Check for proper spacing and Indentation (trycheckstyle
<
http://checkstyle.sourceforge.net/>-whitespace rule
<
http://checkstyle.sourceforge.net/config_whitespace.html>andindentation
rule
<
http://checkstyle.sourceforge.net/config_misc.html#Indentation>)
o Check and verify if all quickstarts are using the same/latest
BOM versions
o Verify is it using the standard properties names (We will
provide the standard properties name)
o Check for non bom versions (and identify if we should create a
new BOM)
o Check javascript and css versions
o Check for duplicate properties and dependencies
o Check the pom.xml elements order
o Create scripts to update versions (quickstart, boms, etc)
o When a new quickstart is added, if it has a pom.xml file, make
sure the <module> is defined in one of the following profiles:
default, requires-postgres, complex-dependencies,
requires-full, requires-xts, non-maven.
* Validating quickstart README files:
o Check for the required metadata tags in README (Level, Author,
Target Product, etc)
o Verify the quickstart name in the README matches the folder
name and the project name
* Validating quickstart source code
o Check the quantity of comments in the code (evaluatePMD
<
http://pmd.sourceforge.net/pmd-5.0.2/rules/java/comments.html>)
* General validation (desired):
o If a quickstart with a source other than the current
repository is modified, create an alert of some sort so we can
notify the upstream repository of the change.
o When we update a BOM property version in the quickstarts, we
need to make the same changes in the archetypes.
o Also, if there is a code fix in the kitchensink or
kitchensink-ear, we need to make the same fix in the archetype
code and check other quickstarts based on the same archetype
to see if they need the fixes applied.
If you have some comments, I will be glad to hear you.
Thanks
--
Rafael Benevides | Senior Software Engineer
Red Hat Brazil
+55-61-9269-6576
Better technology. Faster innovation. Powered by community collaboration.
See how it works at
redhat.com