Skip to content

Commit 33e69ec

Browse files
authored
Initial commit
0 parents  commit 33e69ec

File tree

8 files changed

+397
-0
lines changed

8 files changed

+397
-0
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: maven
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "22:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build & Check
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- name: Set up JDK 21
15+
uses: actions/setup-java@v5
16+
with:
17+
java-version: '21'
18+
distribution: 'temurin'
19+
cache: maven
20+
- name: Unshallow
21+
run: git fetch --unshallow --quiet
22+
- name: Build
23+
run: mvn clean package
24+
automerge:
25+
needs: build
26+
runs-on: ubuntu-latest
27+
permissions:
28+
pull-requests: write
29+
contents: write
30+
steps:
31+
- uses: fastify/github-action-merge-dependabot@v3
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
tags: [ "*" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- name: Generate changelog
16+
id: changelog
17+
uses: metcalfc/[email protected]
18+
with:
19+
myToken: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Set up JDK 21
22+
uses: actions/setup-java@v5
23+
with:
24+
java-version: '21'
25+
distribution: 'temurin'
26+
cache: maven
27+
server-id: central
28+
server-username: MAVEN_USERNAME
29+
server-password: MAVEN_PASSWORD
30+
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
31+
gpg-passphrase: GPG_PASSPHRASE
32+
33+
- name: Build with Maven
34+
run: mvn clean install
35+
36+
- name: Deploy to Central
37+
run: mvn deploy -P central
38+
env:
39+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
40+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
41+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
42+
- name: Generate Javadocs
43+
run: mvn javadoc:aggregate-no-fork
44+
- name: Deploy Javadocs
45+
uses: peaceiris/actions-gh-pages@v4
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./target/reports/apidocs
49+
50+
- name: "Release"
51+
uses: softprops/action-gh-release@v2
52+
with:
53+
body: ${{ steps.changelog.outputs.changelog }}
54+
draft: false
55+
prerelease: false
56+
files: "**/target/*.jar"

.gitignore

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
### Plugin template
2+
# User-specific stuff
3+
.idea/
4+
5+
*.iml
6+
*.ipr
7+
*.iws
8+
9+
# IntelliJ
10+
out/
11+
12+
# Compiled class file
13+
*.class
14+
15+
# Log file
16+
*.log
17+
18+
# BlueJ files
19+
*.ctxt
20+
21+
# Package Files #
22+
*.jar
23+
*.war
24+
*.nar
25+
*.ear
26+
*.zip
27+
*.tar.gz
28+
*.rar
29+
30+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
31+
hs_err_pid*
32+
33+
*~
34+
35+
# temporary files which can be created if a process still has a handle open of a deleted file
36+
.fuse_hidden*
37+
38+
# KDE directory preferences
39+
.directory
40+
41+
# Linux trash folder which might appear on any partition or disk
42+
.Trash-*
43+
44+
# .nfs files are created when an open file is removed but is still being accessed
45+
.nfs*
46+
47+
# General
48+
.DS_Store
49+
.AppleDouble
50+
.LSOverride
51+
52+
# Icon must end with two \r
53+
Icon
54+
55+
# Thumbnails
56+
._*
57+
58+
# Files that might appear in the root of a volume
59+
.DocumentRevisions-V100
60+
.fseventsd
61+
.Spotlight-V100
62+
.TemporaryItems
63+
.Trashes
64+
.VolumeIcon.icns
65+
.com.apple.timemachine.donotpresent
66+
67+
# Directories potentially created on remote AFP share
68+
.AppleDB
69+
.AppleDesktop
70+
Network Trash Folder
71+
Temporary Items
72+
.apdisk
73+
74+
# Windows thumbnail cache files
75+
Thumbs.db
76+
Thumbs.db:encryptable
77+
ehthumbs.db
78+
ehthumbs_vista.db
79+
80+
# Dump file
81+
*.stackdump
82+
83+
# Folder config file
84+
[Dd]esktop.ini
85+
86+
# Recycle Bin used on file shares
87+
$RECYCLE.BIN/
88+
89+
# Windows Installer files
90+
*.cab
91+
*.msi
92+
*.msix
93+
*.msm
94+
*.msp
95+
96+
# Windows shortcuts
97+
*.lnk
98+
99+
target/
100+
101+
pom.xml.tag
102+
pom.xml.releaseBackup
103+
pom.xml.versionsBackup
104+
pom.xml.next
105+
106+
release.properties
107+
dependency-reduced-pom.xml
108+
buildNumber.properties
109+
.mvn/timing.properties
110+
.mvn/wrapper/maven-wrapper.jar
111+
.flattened-pom.xml
112+
113+
# Common working directory
114+
run/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Project Unified
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pom.xml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>io.github.projectunified</groupId>
8+
<artifactId>MavenTemplate</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<name>MavenTemplate</name>
12+
<description>A template for ProjectUnified's projects</description>
13+
<url>https://github.com/ProjectUnified/${project.name}</url>
14+
15+
<licenses>
16+
<license>
17+
<name>MIT License</name>
18+
<url>https://github.com/ProjectUnified/${project.name}/blob/master/LICENSE</url>
19+
</license>
20+
</licenses>
21+
22+
<developers>
23+
<developer>
24+
<name>HSGamer</name>
25+
<email>[email protected]</email>
26+
<url>https://github.com/HSGamer</url>
27+
</developer>
28+
</developers>
29+
30+
<issueManagement>
31+
<system>github</system>
32+
<url>https://github.com/ProjectUnified/${project.name}/issues</url>
33+
</issueManagement>
34+
35+
<scm>
36+
<connection>scm:git:https://github.com/ProjectUnified/${project.name}.git</connection>
37+
<developerConnection>scm:git:[email protected]:ProjectUnified/${project.name}.git</developerConnection>
38+
<url>https://github.com/ProjectUnified/${project.name}</url>
39+
</scm>
40+
41+
<properties>
42+
<java.version>1.8</java.version>
43+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44+
</properties>
45+
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<artifactId>maven-compiler-plugin</artifactId>
50+
<configuration>
51+
<source>${java.version}</source>
52+
<target>${java.version}</target>
53+
</configuration>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<version>3.14.0</version>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-source-plugin</artifactId>
60+
<version>3.3.1</version>
61+
<executions>
62+
<execution>
63+
<goals>
64+
<goal>jar</goal>
65+
</goals>
66+
<id>attach-sources</id>
67+
</execution>
68+
</executions>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-javadoc-plugin</artifactId>
73+
<version>3.11.2</version>
74+
<executions>
75+
<execution>
76+
<goals>
77+
<goal>jar</goal>
78+
</goals>
79+
<id>attach-javadocs</id>
80+
</execution>
81+
</executions>
82+
<configuration>
83+
<outputDirectory>${project.build.directory}/reports</outputDirectory>
84+
</configuration>
85+
</plugin>
86+
</plugins>
87+
</build>
88+
89+
<profiles>
90+
<profile>
91+
<id>central</id>
92+
<build>
93+
<plugins>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-gpg-plugin</artifactId>
97+
<version>3.2.8</version>
98+
<executions>
99+
<execution>
100+
<id>sign-artifacts</id>
101+
<phase>verify</phase>
102+
<goals>
103+
<goal>sign</goal>
104+
</goals>
105+
<configuration>
106+
<!-- Prevent `gpg` from using pinentry programs -->
107+
<gpgArguments>
108+
<arg>--pinentry-mode</arg>
109+
<arg>loopback</arg>
110+
</gpgArguments>
111+
</configuration>
112+
</execution>
113+
</executions>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.sonatype.central</groupId>
117+
<artifactId>central-publishing-maven-plugin</artifactId>
118+
<version>0.8.0</version>
119+
<extensions>true</extensions>
120+
<configuration>
121+
<publishingServerId>central</publishingServerId>
122+
<autoPublish>true</autoPublish>
123+
<deploymentName>${project.name}</deploymentName>
124+
</configuration>
125+
</plugin>
126+
</plugins>
127+
</build>
128+
</profile>
129+
</profiles>
130+
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package io.github.projectunified.maventemplate;
2+
3+
public class Main {
4+
public static void main(String[] args) {
5+
System.out.println("Hello World!");
6+
}
7+
}

0 commit comments

Comments
 (0)