Convert Maven pom.properties to JSON

Transform Maven-generated pom.properties and settings into JSON for build metadata extraction and artifact management.

Build Tools

Detailed Explanation

Maven Properties Files

Maven generates pom.properties files inside built artifacts (JARs, WARs) containing metadata about the build. Additionally, Maven projects can define custom properties files for version management and plugin configuration.

Example pom.properties

# Auto-generated by Maven
groupId=com.example
artifactId=my-service
version=3.2.1
build.timestamp=2024-12-01T10:30:00Z

# Custom build properties
project.build.sourceEncoding=UTF-8
maven.compiler.source=17
maven.compiler.target=17
maven.compiler.release=17

# Dependency versions
spring-boot.version=3.2.0
jackson.version=2.16.1
lombok.version=1.18.30
junit.version=5.10.1

JSON Output

{
  "groupId": "com.example",
  "artifactId": "my-service",
  "version": "3.2.1",
  "build": {
    "timestamp": "2024-12-01T10:30:00Z"
  },
  "project": {
    "build": {
      "sourceEncoding": "UTF-8"
    }
  },
  "maven": {
    "compiler": {
      "source": 17,
      "target": 17,
      "release": 17
    }
  }
}

Use Cases

The JSON output is useful for:

  • Build metadata APIs: Expose build info as a JSON endpoint (/actuator/info in Spring Boot)
  • Dependency management dashboards: Parse version information for automated dependency tracking
  • CI/CD pipelines: Extract artifact coordinates (groupId, artifactId, version) for deployment scripts
  • Bill of Materials (BOM): Generate dependency inventories in JSON format for security scanning

Use Case

Extracting Maven build metadata from pom.properties for CI/CD pipeline scripts, building dependency dashboards, or exposing build information through JSON API endpoints like Spring Boot Actuator.

Try It — Properties \u2194 JSON Converter

Open full tool