https://github.com/toolisticon/byoct
https://github.com/toolisticon/byoct
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/toolisticon/byoct
- Owner: toolisticon
- License: mit
- Created: 2018-01-05T16:24:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T02:22:32.000Z (over 2 years ago)
- Last Synced: 2025-03-04T14:49:17.806Z (over 1 year ago)
- Language: Smarty
- Size: 48.8 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BYOCT - Bring Your Own Compliance Test
[](https://maven-badges.herokuapp.com/maven-central/io.toolisticon.byoct/byoct-parent)
[](https://travis-ci.org/toolisticon/byoct)
[](https://codecov.io/gh/toolisticon/byoct)
# Why you should use this project?
Nowadays most Java frameworks and standards make heavily use of annotations.
One drawback of annotations is that java offers only little support to apply constraints regarding how to use annotations.
Usually constraints about how to use annotations are just described in their Java docs.
Annotation processors can help to provide compliance tests to check the correct usage of annotation based apis in most cases.
This project helps you to generate a working maven compliance test annotation processor project for any kind of annotation based api.
# Features
Generates Maven project for annotation processor based compliance tests to validate if an annotation based api is used correctly.
This includes
- annotation processors for all runtime annotations
- unit tests classes for all annotation processors
- example unit testcases for all annotation processors
# How does it work?
It's quite simple. Create a package-info.java file.
Annotate that package with the _GenerateProjectStructure_ annotation.
For example for JPA:
@GenerateProjectStructure(
mvnGroupId = "io.toolisticon.byoct.jpa",
mvnArtifactId = "byoct-jpa",
sourcePackageRoot = "javax.persistence",
relocationBasePackage = "javax.persistence",
targetPackageName = "io.toolisticon.byoct.jpa")
Make sure that both byoct jar and the annotation api jar are on classpath during compilation.
You can just use the example project to do that.
The Project will be located in the target/classes folder.
Copy the generated pom.xml and src folder.
# Contributing
We welcome any kind of suggestions and pull requests.
## Building and developing the BYOCT
The BYOCT is built using Maven (at least version 3.0.0).
A simple import of the pom in your IDE should get you up and running. To build the byoct on the commandline, just run `mvn` or `mvn clean install`
## Requirements
The likelihood of a pull request being used rises with the following properties:
- You have used a feature branch.
- You have included a test that demonstrates the functionality added or fixed.
- You adhered to the [code conventions](http://www.oracle.com/technetwork/java/javase/documentation/codeconvtoc-136057.html).
## Contributions
- (2018) Tobias Stamann (Holisticon AG)
# License
This project is released under the revised [MIT License](LICENSE).
This project includes and repackages the [Annotation-Processor-Toolkit](https://github.com/holisticon/annotation-processor-toolkit) released under the [MIT License](/3rdPartyLicenses/annotation-processor-toolkit/LICENSE.txt).