Class PomParser

  • All Implemented Interfaces:
    Constants, Registry, Report, Reporter, java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.lang.String>

    public class PomParser
    extends Processor
    Provides a way to parse a maven pom as properties. This provides most of the maven elements as properties. It also provides pom.scope.[compile|test|runtime|provided|system] properties that can be appended to the build and run path. That is, they are in the correct format for this.
    • Field Detail

      • dbf

        static javax.xml.parsers.DocumentBuilderFactory dbf
      • xpathf

        static javax.xml.xpath.XPathFactory xpathf
      • multiple

        static java.util.Set<java.lang.String> multiple
      • skip

        static java.util.Set<java.lang.String> skip
    • Constructor Detail

      • PomParser

        public PomParser()
    • Method Detail

      • getProperties

        public java.util.Properties getProperties​(java.io.File pom)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toBsn

        private java.lang.Object toBsn​(org.w3c.dom.NodeList set)
                                throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • traverse

        static void traverse​(java.lang.String name,
                             org.w3c.dom.Node parent,
                             java.util.Properties p)
        The maven POM is quite straightforward, it is basically a structured property file.
        Parameters:
        name -
        parent -
        p -