Skip to content

Commit 914add8

Browse files
Utilized Jitpack and added dev container files.
1 parent 1aa55ee commit 914add8

File tree

4 files changed

+147
-80
lines changed

4 files changed

+147
-80
lines changed

.devcontainer/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/java/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
4+
ARG VARIANT="17-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
6+
7+
# [Option] Install Maven
8+
ARG INSTALL_MAVEN="false"
9+
ARG MAVEN_VERSION=""
10+
# [Option] Install Gradle
11+
ARG INSTALL_GRADLE="false"
12+
ARG GRADLE_VERSION=""
13+
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
14+
&& if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi
15+
16+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
17+
ARG NODE_VERSION="none"
18+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
19+
20+
# [Optional] Uncomment this section to install additional OS packages.
21+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
22+
# && apt-get -y install --no-install-recommends <your-package-list-here>
23+
24+
# [Optional] Uncomment this line to install global node packages.
25+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/java
3+
{
4+
"name": "Java",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update the VARIANT arg to pick a Java version: 11, 17
9+
// Append -bullseye or -buster to pin to an OS version.
10+
// Use the -bullseye variants on local arm64/Apple Silicon.
11+
"VARIANT": "11-bullseye",
12+
// Options
13+
"INSTALL_MAVEN": "true",
14+
"INSTALL_GRADLE": "false",
15+
"NODE_VERSION": "none"
16+
}
17+
},
18+
19+
// Set *default* container specific settings.json values on container create.
20+
"settings": {
21+
"java.home": "/docker-java-home"
22+
},
23+
24+
// Add the IDs of extensions you want installed when the container is created.
25+
"extensions": [
26+
"vscjava.vscode-java-pack"
27+
],
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
// "postCreateCommand": "java -version",
34+
35+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
36+
"remoteUser": "vscode"
37+
}

compile.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mvn clean package

pom.xml

Lines changed: 84 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,84 @@
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>KingdomProgrammers</groupId>
8-
<artifactId>More-Recipes</artifactId>
9-
<version>v1.5</version>
10-
<packaging>jar</packaging>
11-
12-
<name>More Recipes</name>
13-
14-
<properties>
15-
<java.version>1.8</java.version>
16-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17-
</properties>
18-
19-
<build>
20-
<plugins>
21-
<plugin>
22-
<groupId>org.apache.maven.plugins</groupId>
23-
<artifactId>maven-compiler-plugin</artifactId>
24-
<version>3.8.1</version>
25-
<configuration>
26-
<source>${java.version}</source>
27-
<target>${java.version}</target>
28-
</configuration>
29-
</plugin>
30-
<plugin>
31-
<groupId>org.apache.maven.plugins</groupId>
32-
<artifactId>maven-shade-plugin</artifactId>
33-
<version>3.2.2</version>
34-
<executions>
35-
<execution>
36-
<phase>package</phase>
37-
<goals>
38-
<goal>shade</goal>
39-
</goals>
40-
<configuration>
41-
<createDependencyReducedPom>false</createDependencyReducedPom>
42-
</configuration>
43-
</execution>
44-
</executions>
45-
</plugin>
46-
</plugins>
47-
<resources>
48-
<resource>
49-
<directory>src/main/resources</directory>
50-
<filtering>true</filtering>
51-
</resource>
52-
</resources>
53-
</build>
54-
55-
<repositories>
56-
<repository>
57-
<id>spigotmc-repo</id>
58-
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
59-
</repository>
60-
<repository>
61-
<id>sonatype</id>
62-
<url>https://oss.sonatype.org/content/groups/public/</url>
63-
</repository>
64-
</repositories>
65-
66-
<dependencies>
67-
<dependency>
68-
<groupId>org.spigotmc</groupId>
69-
<artifactId>spigot-api</artifactId>
70-
<version>1.13.1-R0.1-SNAPSHOT</version>
71-
<scope>provided</scope>
72-
</dependency>
73-
<dependency>
74-
<groupId>preponderous</groupId>
75-
<artifactId>ponder</artifactId>
76-
<version>v0.15-alpha-2</version>
77-
<scope>compile</scope>
78-
</dependency>
79-
</dependencies>
80-
</project>
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>KingdomProgrammers</groupId>
8+
<artifactId>More-Recipes</artifactId>
9+
<version>v1.5</version>
10+
<packaging>jar</packaging>
11+
12+
<name>More Recipes</name>
13+
14+
<properties>
15+
<java.version>1.8</java.version>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
</properties>
18+
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-compiler-plugin</artifactId>
24+
<version>3.8.1</version>
25+
<configuration>
26+
<source>${java.version}</source>
27+
<target>${java.version}</target>
28+
</configuration>
29+
</plugin>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-shade-plugin</artifactId>
33+
<version>3.2.2</version>
34+
<executions>
35+
<execution>
36+
<phase>package</phase>
37+
<goals>
38+
<goal>shade</goal>
39+
</goals>
40+
<configuration>
41+
<createDependencyReducedPom>false</createDependencyReducedPom>
42+
</configuration>
43+
</execution>
44+
</executions>
45+
</plugin>
46+
</plugins>
47+
<resources>
48+
<resource>
49+
<directory>src/main/resources</directory>
50+
<filtering>true</filtering>
51+
</resource>
52+
</resources>
53+
</build>
54+
55+
<repositories>
56+
<repository>
57+
<id>spigotmc-repo</id>
58+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
59+
</repository>
60+
<repository>
61+
<id>sonatype</id>
62+
<url>https://oss.sonatype.org/content/groups/public/</url>
63+
</repository>
64+
<repository>
65+
<id>jitpack.io</id>
66+
<url>https://jitpack.io</url>
67+
</repository>
68+
</repositories>
69+
70+
<dependencies>
71+
<dependency>
72+
<groupId>org.spigotmc</groupId>
73+
<artifactId>spigot-api</artifactId>
74+
<version>1.13.1-R0.1-SNAPSHOT</version>
75+
<scope>provided</scope>
76+
</dependency>
77+
<dependency>
78+
<groupId>com.github.Preponderous-Software</groupId>
79+
<artifactId>ponder</artifactId>
80+
<version>1.0</version>
81+
<scope>compile</scope>
82+
</dependency>
83+
</dependencies>
84+
</project>

0 commit comments

Comments
 (0)