Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasMansour committed Feb 24, 2024
0 parents commit ea16230
Show file tree
Hide file tree
Showing 21 changed files with 1,107 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
16 changes: 16 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## How to contribute to the patch-maven-plugin
#### **Did you find a bug?**
* Open a new GitHub issue if it's not already reported.

* Use the relevant bug report template to create the issue.

#### **Did you write some code that fixes a bug?**
* Open a new GitHub pull-request if it has not already been proposed.

* Ensure the PR description clearly describes the problem and solution. If possible add the relevant issue number.

#### **Do you want to contribute to the documentation?**
* Just make sure to conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification when editing the README.md.

## General Contribution Rules
* By contributing to the project your code/contribution will be licensed under the [Apache 2.0](../LICENSE) license.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
labels: Bug
about: Use this to report unexpected behavior (bugs).
---
### What is the current behavior?


### What is the expected behavior?


### What steps will reproduce the problem?


### What operating system and java version is being used?


### If there is an exception, use pastebin (no expiry date) to send the stacktrace:


### Additional information / Possible thoughts on why this bug is happening:

15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Request
labels: Enhancement
about: Use this to request an addition (feature).
---
### What would you like added/changed?


### Why do you think this is a good addition/alteration?


### Why do you want this to be added?


### Additional Information
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/QUESTION_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: Question
labels: Question
about: Use this to ask a question.
---
### Your Question:

28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Description
Please include a summary of the change/addition.

Please also include relevant motivation, context and any requirements for this pull-request:

## Type of pull-request
Please check the boxes that apply to your pull-request.

- [ ] Bug fix
- [ ] Feature addition
- [ ] Requires an update to the documentation

## Which tickets does this PR close?
Please list the GitHub issues, if any, that this PR closes here.

## Testing environment
Please describe the tests that you created to verify your changes.
Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

**Test Configuration**:
* Java Version:
* OS:

# Checklist (* = required):
- [ ] *I have read and agree to the [contribution guidelines](CONTRIBUTING.md).
- [ ] I have performed a self-review of my own code
- [ ] *I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
75 changes: 75 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Maven Patch Plugin

[![license](https://img.shields.io/github/license/LukasMansour/patch-maven-plugin.svg?style=for-the-badge)](../LICENSE)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/LukasMansour/patch-maven-plugin?style=for-the-badge)](https://github.com/LukasMansour/patch-maven-plugin/releases)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=for-the-badge)](https://github.com/RichardLitt/standard-readme)

This new Maven Patch Plugin is a simple to use plugin for maven, that allows you to use patch files
(e.g. created by git) in your building process. Importantly, this plugin does not use GNU Patch and
therefore it can be used on Windows machines and does not require any container configurations in
your builds.

This plugin was created by Lukas Mansour in 2024 primarily for
the [dCache](https://github.com/dCache/dcache) project. It primarily uses a java native patching
library called [java-diff-utils](https://github.com/java-diff-utils/java-diff-utils).

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Acknowledgements](#acknowledgements)
- [Contributing](#contributing)
- [License](#license)

## Install

### Maven

This plugin is only available for Maven and can be installed with the following plugin snippet:

```xml

<plugin>
<groupId>io.github.lukasmansour</groupId>
<artifactId>patch-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<targetDirectory>${project.basedir}</targetDirectory>
<patchDirectory>${project.basedir}\src\main\patches</patchDirectory>
</configuration>

<!-- And add the execution to the building phase-->
<executions>
<execution>
<goals>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
```

## Usage

In the plugin you can configure a ```targetDirectory``` and a ```patchDirectory```.
the ```targetDirectory``` is the root in which patches will be applied. The ```patchDirectory``` is
the location of the patches.

There is also an example in the repository [here](../test-project).

## Maintainers

[@Lukas Mansour](https://www.github.com/LukasMansour/)

## Acknowledgements

[Community project for Java Diff Utils](https://github.com/java-diff-utils/java-diff-utils).

## Contributing

See [the contributing file](CONTRIBUTING.md)!

## License

[Apache 2.0 © Lukas Mansour ](../LICENSE)
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
env:
SONATYPE_CENTRAL_USERTOKEN: ${{ secrets.SONATYPE_CENTRAL_USERTOKEN }}
SONATYPE_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

steps:
- uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Deploy
run: ./gradlew publishPatchPublicationToCentralPortal
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
**/target/
**/build/

### IntelliJ IDEA ###
.idea/
*.iml
*.iws
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
Loading

0 comments on commit ea16230

Please sign in to comment.