Skip to content

Commit 88ee040

Browse files
committed
Initial commit
0 parents  commit 88ee040

29 files changed

+1310
-0
lines changed

.github/CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## How to contribute to the maven-patch-plugin
2+
#### **Did you find a bug?**
3+
* Open a new GitHub issue if it's not already reported.
4+
5+
* Use the relevant bug report template to create the issue.
6+
7+
#### **Did you write some code that fixes a bug?**
8+
* Open a new GitHub pull-request if it has not already been proposed.
9+
10+
* Ensure the PR description clearly describes the problem and solution. If possible add the relevant issue number.
11+
12+
#### **Do you want to contribute to the documentation?**
13+
* Just make sure to conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification when editing the README.md.
14+
15+
## General Contribution Rules
16+
* By contributing to the project your code/contribution will be licensed under the [Apache 2.0](../LICENSE) license.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug report
3+
labels: Bug
4+
about: Use this to report unexpected behavior (bugs).
5+
---
6+
### What is the current behavior?
7+
8+
9+
### What is the expected behavior?
10+
11+
12+
### What steps will reproduce the problem?
13+
14+
15+
### What operating system and java version is being used?
16+
17+
18+
### If there is an exception, use pastebin (no expiry date) to send the stacktrace:
19+
20+
21+
### Additional information / Possible thoughts on why this bug is happening:
22+
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Feature Request
3+
labels: Enhancement
4+
about: Use this to request an addition (feature).
5+
---
6+
### What would you like added/changed?
7+
8+
9+
### Why do you think this is a good addition/alteration?
10+
11+
12+
### Why do you want this to be added?
13+
14+
15+
### Additional Information
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Question
3+
labels: Question
4+
about: Use this to ask a question.
5+
---
6+
### Your Question:
7+

.github/PULL_REQUEST_TEMPLATE.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Description
2+
Please include a summary of the change/addition.
3+
4+
Please also include relevant motivation, context and any requirements for this pull-request:
5+
6+
## Type of pull-request
7+
Please check the boxes that apply to your pull-request.
8+
9+
- [ ] Bug fix
10+
- [ ] Feature addition
11+
- [ ] Requires an update to the documentation
12+
13+
## Which tickets does this PR close?
14+
Please list the GitHub issues, if any, that this PR closes here.
15+
16+
## Testing environment
17+
Please describe the tests that you created to verify your changes.
18+
Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
19+
20+
**Test Configuration**:
21+
* Java Version:
22+
* OS:
23+
24+
# Checklist (* = required):
25+
- [ ] *I have read and agree to the [contribution guidelines](CONTRIBUTING.md).
26+
- [ ] I have performed a self-review of my own code
27+
- [ ] *I have commented my code, particularly in hard-to-understand areas
28+
- [ ] I have made corresponding changes to the documentation

.github/README.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Maven Patch Plugin
2+
3+
[![license](https://img.shields.io/github/license/LukasMansour/maven-patch-plugin.svg?style=for-the-badge)](../LICENSE)
4+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/LukasMansour/maven-patch-plugin?style=for-the-badge)](https://github.com/LukasMansour/maven-patch-plugin/releases)
5+
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=for-the-badge)](https://github.com/RichardLitt/standard-readme)
6+
7+
This new Maven Patch Plugin is a simple to use plugin for maven, that allows you to use patch files
8+
(e.g. created by git) in your building process. Importantly, this plugin does not use GNU Patch and
9+
therefore it can be used on Windows machines and does not require any container configurations in
10+
your builds.
11+
12+
This plugin was created by Lukas Mansour in 2024 primarily for
13+
the [dCache](https://github.com/dCache/dcache) project. It primarily uses a java native patching
14+
library called [java-diff-utils](https://github.com/java-diff-utils/java-diff-utils).
15+
16+
## Table of Contents
17+
18+
- [Install](#install)
19+
- [Usage](#usage)
20+
- [Maintainers](#maintainers)
21+
- [Acknowledgements](#acknowledgements)
22+
- [Contributing](#contributing)
23+
- [License](#license)
24+
25+
## Install
26+
27+
### Maven
28+
29+
This plugin is only available for Maven and can be installed with the following plugin snippet:
30+
31+
```xml
32+
33+
<plugin>
34+
<groupId>io.github.lukasmansour.patch</groupId>
35+
<artifactId>maven-patch-plugin</artifactId>
36+
<version>1.0-SNAPSHOT</version>
37+
<configuration>
38+
<targetDirectory>${project.basedir}</targetDirectory>
39+
<patchDirectory>${project.basedir}\src\main\patches</patchDirectory>
40+
</configuration>
41+
42+
<!-- And add the execution to the building phase-->
43+
<executions>
44+
<execution>
45+
<goals>
46+
<goal>apply</goal>
47+
</goals>
48+
</execution>
49+
</executions>
50+
</plugin>
51+
```
52+
53+
## Usage
54+
55+
In the plugin you can configure a ```targetDirectory``` and a ```patchDirectory```.
56+
the ```targetDirectory``` is the root in which patches will be applied. The ```patchDirectory``` is
57+
the location of the patches.
58+
59+
There is also an example in the repository [here](../test-project).
60+
61+
## Maintainers
62+
63+
[@Lukas Mansour](https://www.github.com/LukasMansour/)
64+
65+
## Acknowledgements
66+
67+
[Community project for Java Diff Utils](https://github.com/java-diff-utils/java-diff-utils).
68+
69+
## Contributing
70+
71+
See [the contributing file](CONTRIBUTING.md)!
72+
73+
## License
74+
75+
[Apache 2.0 © Lukas Mansour ](../LICENSE)

.github/workflows/publish.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy Plugin
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
env:
12+
SONATYPE_CENTRAL_USERTOKEN: ${{ secrets.SONATYPE_CENTRAL_USERTOKEN }}
13+
SONATYPE_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
14+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
15+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup JDK 11
20+
uses: actions/setup-java@v2
21+
with:
22+
java-version: '11'
23+
distribution: 'temurin'
24+
- name: Deploy
25+
run: ./gradlew publishMavenPublicationToCentralPortal

.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store

.idea/.gitignore

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)