All Projects → intuit → node-pom-parser

intuit / node-pom-parser

Licence: MIT License
Parsing Java's pom.xml and properly returning the json object, including attributes and values.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-pom-parser

meanterprise
MEAN based single page application with common SPA enterprise application add-ons.
Stars: ✭ 23 (+9.52%)
Mutual labels:  enterprise
React-Redux-Enterprise
A React-Redux boilerplate for enterprise/large scaled web applications
Stars: ✭ 77 (+266.67%)
Mutual labels:  enterprise
CoreLibraries
A set of .NET libraries for building enterprise level solutions quickly
Stars: ✭ 22 (+4.76%)
Mutual labels:  enterprise
enterprise
Code coverage done right.® On-premise enterprise version.
Stars: ✭ 63 (+200%)
Mutual labels:  enterprise
basepom
All the base POMs in the world.
Stars: ✭ 35 (+66.67%)
Mutual labels:  pom
boilerplate-nexus-prisma-apollo-graphql-express
Boilerplate project for a graphql server using nexus-prisma and apollo-server-express
Stars: ✭ 31 (+47.62%)
Mutual labels:  nexus
Cloud-PAW-Management
Simplify PAW and SPA for the masses, unify the MS Internal, and public PAW specs, and expedite deployment to ~5min or less.
Stars: ✭ 45 (+114.29%)
Mutual labels:  enterprise
awesome-lowcode
App Builders、Enterprise Platforms、LowCode、Low-Code
Stars: ✭ 46 (+119.05%)
Mutual labels:  enterprise
jmix-core
Jmix framework
Stars: ✭ 201 (+857.14%)
Mutual labels:  enterprise
search-tweets-ruby
Ruby client for the Twitter search endpoints (v2/Labs/premium/enterprise). Now supports Twitter API v2 /recent and /all search endpoints.
Stars: ✭ 45 (+114.29%)
Mutual labels:  enterprise
netapp-cdot-nagios
Nagios-Checks for monitoring NetApp cDOT-Systems via NetApp Perl API
Stars: ✭ 40 (+90.48%)
Mutual labels:  nexus
meza
Setup an enterprise MediaWiki server with simple commands
Stars: ✭ 38 (+80.95%)
Mutual labels:  enterprise
ruby-stream-api
Ruby Stream API. Inspired by Java 8's Stream API.
Stars: ✭ 21 (+0%)
Mutual labels:  enterprise
maven-learning-notes
For more notes, see notes-and-code-about-learning
Stars: ✭ 58 (+176.19%)
Mutual labels:  pom
nexus-federation-example
Example of using Apollo Federation and Nexus JS
Stars: ✭ 16 (-23.81%)
Mutual labels:  nexus
python-sonarqube-api
Python wrapper for the SonarQube (Community Edition and Enterprise Edition) and SonarCloud API.
Stars: ✭ 107 (+409.52%)
Mutual labels:  enterprise
piranha
Piranha - a modern cloud runtime
Stars: ✭ 136 (+547.62%)
Mutual labels:  enterprise
vrnetlab
Run virtual routers with docker
Stars: ✭ 879 (+4085.71%)
Mutual labels:  nexus
nextjs-graphql-adminpanel
Admin panel built with NextJS(Typescript), Material UI, Apollo Client & GraphQL. In the backend, Prisma 2 with Nexus and Mysql is used.
Stars: ✭ 119 (+466.67%)
Mutual labels:  nexus
scuri
Automate Angular unit test and boilerplate with this schematic.
Stars: ✭ 54 (+157.14%)
Mutual labels:  enterprise

Node.js pom.xml Parser

Build Status npm version Codacy Badge Coverage Status License

Parsing Java's pom.xml and properly returning the json object, including attributes and values.

NPM

Motivation

  • Your enterprise decided to move production code written in Java to Node.js
  • Your enterprise uses a centralized Nexus repository where your Java project uses pom.xml to manage app packaging.
  • Your enterprise still plans to use Nexus repository to package Node.js applications.
  • Your enterprise engineers want an API to retrieve information from the pom.xml file from those Node.js apps.

Features

  • Reads any pom.xml.
  • All xml elements are placed into properties.
  • All xml element attributes are merged into the parent element.
  • Both the xml string and the parsed object are returned.
  • You can provide parsing options.

Installation

npm install --save pom-parser

Use

  • Printing the object
var pomParser = require("pom-parser");
// The required options, including the filePath.
// Other parsing options from https://github.com/Leonidas-from-XIV/node-xml2js#options
var opts = {
  filePath: __dirname + "/pom.xml", // The path to a pom file
};
// Parse the pom based on a path
pomParser.parse(opts, function(err, pomResponse) {
  if (err) {
    console.log("ERROR: " + err);
    process.exit(1);
  }

  // The original pom xml that was loaded is provided.
  console.log("XML: " + pomResponse.pomXml);
  // The parsed pom pbject.
  console.log("OBJECT: " + JSON.stringify(pomResponse.pomObject));
});

It should print the follow object with the following properties:

  • '_' represents the text value of an element with attributes and text values.
{
  "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",
    "parent": {
      "artifactid": "tynamo-parent",
      "groupid": "org.tynamo",
      "version": "0.0.9"
    },
    "modelversion": {
      "_": "4.0.0",
      "parallel": "now"
    },
    "groupid": "org.tynamo.examples",
    "artifactid": "tynamo-example-federatedaccounts",
    "version": "0.0.1-SNAPSHOT",
    "packaging": "war",
    "name": "Tynamo Example - Federated Accounts",
    "properties": {
      "tapestry-release-version": "5.3.1",
      "gae.version": "1.3.0",
      "gae.home": "${settings.localRepository}/com/google/appengine/appengine-api-1.0-sdk/${gae.version}/appengine-java-sdk-${gae.version}",
      "gae.application.version": "0"
    },
    "build": {
      "finalname": "federatedaccounts",
      "resources": {
        "resource": [
          {
            "directory": "src/main/resources"
          },
          {
            "directory": "src/main/filtered-resources",
            "filtering": "true"
          }
        ]
      },
      "plugins": {
        "plugin": [
          {
            "groupid": "org.apache.maven.plugins",
            "artifactid": "maven-compiler-plugin",
            "configuration": {
              "source": "1.6",
              "target": "1.6",
              "optimize": "true"
            }
          },
          {
            "groupid": "net.kindleit",
            "artifactid": "maven-gae-plugin",
            "version": "0.8.0",
            "configuration": {
              "serverid": "tynamo-example-federatedaccounts"
            }
          },
          {
            "groupid": "org.apache.maven.plugins",
            "artifactid": "maven-war-plugin",
            "configuration": {
              "webresources": {
                "resource": {
                  "directory": "src/main/webapp",
                  "filtering": "true",
                  "includes": {
                    "include": "**/appengine-web.xml"
                  }
                }
              }
            }
          }
        ]
      }
    },
    "reporting": {
      "plugins": {
        "plugin": {
          "groupid": "org.apache.tapestry",
          "artifactid": "tapestry-component-report",
          "version": "${tapestry-release-version}",
          "configuration": {
            "rootpackage": "org.tynamo"
          }
        }
      }
    },
    "dependencies": {
      "dependency": [
        {
          "groupid": "com.google.appengine",
          "artifactid": "appengine-api-1.0-sdk",
          "version": "${gae.version}"
        },
        {
          "groupid": "com.h2database",
          "artifactid": "h2"
        },
        {
          "groupid": "org.apache.tapestry",
          "artifactid": "tapestry-core",
          "version": "${tapestry-release-version}"
        },
        {
          "groupid": "javax.servlet",
          "artifactid": "servlet-api",
          "version": "2.5",
          "type": "jar",
          "scope": "provided"
        }
      ]
    },
    "profiles": {
      "profile": {
        "id": "repositories",
        "repositories": {
          "repository": {
            "id": "maven-gae-plugin-repo",
            "name": "maven-gae-plugin repository",
            "url": "http://maven-gae-plugin.googlecode.com/svn/repository"
          }
        },
        "pluginrepositories": {
          "pluginrepository": {
            "id": "maven-gae-plugin-repo",
            "name": "maven-gae-plugin repository",
            "url": "http://maven-gae-plugin.googlecode.com/svn/repository"
          }
        }
      }
    }
  }
}

License

node-pom-parser is provided under the MIT license.

Contributing

Pull requests are welcome!

  • Please send PRs to the develop branch for the next release!
  • Make sure to watch all the Github Actions status are passing!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].