https://github.com/dataliquid/parent-oss
Open Source Software - Maven Parent
https://github.com/dataliquid/parent-oss
maven opensource parent software
Last synced: 15 days ago
JSON representation
Open Source Software - Maven Parent
- Host: GitHub
- URL: https://github.com/dataliquid/parent-oss
- Owner: dataliquid
- License: apache-2.0
- Created: 2019-05-04T16:56:12.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2025-12-20T16:18:10.000Z (about 1 month ago)
- Last Synced: 2026-01-11T02:58:58.547Z (16 days ago)
- Topics: maven, opensource, parent, software
- Homepage: https://www.dataliquid.com
- Size: 140 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Parent OSS
[](https://github.com/dataliquid/parent-oss/actions/workflows/ci.yml)
[](https://search.maven.org/artifact/com.dataliquid/parent-oss)
Parent POM for open source projects.
## Overview
This project provides a parent POM configuration for open source Maven projects. It includes common configurations, plugin management, and dependency management to standardize build processes across multiple projects.
## Usage
To use this parent POM in your project, add the following to your `pom.xml`:
```xml
com.dataliquid
parent-oss
2.1.0
```
## Features
- Standardized plugin configurations
- Common dependency management
- Build optimization settings
- Release management configuration
- Quality assurance tools integration
- Automatic code formatting with CI-aware profiles
## Code Formatting
This parent POM provides automatic code formatting using the `formatter-maven-plugin` with CI-aware profile activation.
### Automatic Profile Activation
The formatter profiles activate automatically based on the CI environment:
- **Local Development** (CI environment variable not set):
- Profile `format-code` activates automatically
- Runs `formatter:format` during the validate phase
- Automatically formats code according to the configured style guide
- **CI/CD Pipeline** (CI=true):
- Profile `format-code-validation` activates automatically
- Runs `formatter:validate` during the validate phase
- Fails the build if code is not properly formatted
### Default Configuration
The parent POM includes:
- **Dependency**: `com.dataliquid.guidelines:coding-conventions` containing formatter styles
- **Default Styles**:
- Java: `codestyles/default/java-formatter.xml`
- JavaScript: `codestyles/default/javascript-formatter.xml`
- JSON: `codestyles/default/json-formatter.properties`
- HTML: `codestyles/default/html-formatter.properties`
- CSS: `codestyles/default/css-formatter.properties`
- **Line Ending**: LF (Unix-style)
- **Encoding**: UTF-8
### Overriding Formatter Configuration
Child projects can override the formatter configuration while still using the styles from the parent's dependency:
```xml
net.revelc.code.formatter
formatter-maven-plugin
codestyles/traditional/eclipse-codestyle.xml
```
All styles are loaded from the classpath, so no local files are needed in your project.
### Disabling Formatter
To skip formatting completely, deactivate both profiles:
```bash
mvn clean validate -P!format-code,!format-code-validation
```
## Projects Using This Parent
- [distribution-verifier-maven-plugin](distribution-verifier-maven-plugin/): Maven plugin for verifying distribution archives
- [json-yaml-validator-maven-plugin](json-yaml-validator-maven-plugin/): Maven plugin for validating JSON and YAML files against schemas
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.