Initial commit
commit
2bff76cada
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
#################
|
||||||
|
## IDEA
|
||||||
|
#################
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/
|
||||||
|
.idea_modules/
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
target/
|
||||||
|
|
||||||
|
#################
|
||||||
|
## Eclipse
|
||||||
|
#################
|
||||||
|
|
||||||
|
*.pydevproject
|
||||||
|
.project
|
||||||
|
.metadata
|
||||||
|
bin/
|
||||||
|
tmp/
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*~.nib
|
||||||
|
local.properties
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
.loadpath
|
||||||
|
.apt_generated/
|
||||||
|
.apt_generated_tests/
|
||||||
|
|
||||||
|
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
|
||||||
|
!/.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
# External tool builders
|
||||||
|
.externalToolBuilders/
|
||||||
|
|
||||||
|
# Locally stored "Eclipse launch configurations"
|
||||||
|
*.launch
|
||||||
|
|
||||||
|
# CDT-specific
|
||||||
|
.cproject
|
||||||
|
|
||||||
|
# PDT-specific
|
||||||
|
.buildpath
|
||||||
|
|
||||||
|
#############
|
||||||
|
## Windows detritus
|
||||||
|
#############
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Mac crap
|
||||||
|
.DS_Store
|
||||||
|
REBASE.bat
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<p align="center">
|
||||||
|
Do you want to learn Java the fun way? I've made a training for you!
|
||||||
|
<a href="https://mineacademy.org/project-orion">
|
||||||
|
<img src="https://i.imgur.com/OJuN0qP.png" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# MavenProgram
|
||||||
|
A sample template for creating standalone Java programs.
|
||||||
|
|
||||||
|
By default we compile for Java 8, which can easily be changed in the sample pom.xml to any Java version, including the latest one.
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<!-- Change to your own main package name. -->
|
||||||
|
<groupId>org.mineacademy</groupId>
|
||||||
|
|
||||||
|
<!-- Change to your program's name, must be lower cased and match your end package name. No spaces. -->
|
||||||
|
<artifactId>maven-program</artifactId>
|
||||||
|
|
||||||
|
<!-- Change to your program's name. Can contain capital letters, but do NOT use spaces. -->
|
||||||
|
<name>MavenProgram</name>
|
||||||
|
|
||||||
|
<!-- Change to the appropriate programs's version, i.e. starting at 1.0.0. -->
|
||||||
|
<version>1.0.0</version>
|
||||||
|
|
||||||
|
<!-- DO NOT EDIT. -->
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
|
||||||
|
<!-- Change to your name or the main program author. -->
|
||||||
|
<author>kangarko</author>
|
||||||
|
|
||||||
|
<!-- Change to the full path where your main plugin class is located. -->
|
||||||
|
<main.class>org.mineacademy.mavenprogram.MavenProgram</main.class>
|
||||||
|
|
||||||
|
<!-- Change the Java version this program is compiled for.
|
||||||
|
|
||||||
|
IMPORTANT: For Java 8, version is "1.8", for Java 11+ it is only "11" or "17".
|
||||||
|
|
||||||
|
If you use 1.8 then your program will work on newer versions,
|
||||||
|
but if you use "11" or "17" then it will NOT load on servers
|
||||||
|
with previous Java versions. We recommend you stick with 1.8.
|
||||||
|
-->
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
|
||||||
|
<!-- DO NOT EDIT. -->
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<!-- DO NOT EDIT, used to pull Foundation from the JitPack site. -->
|
||||||
|
<repository>
|
||||||
|
<id>jitpack.io</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<!-- Do NOT edit. -->
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>maven-snapshots</id>
|
||||||
|
<url>https://repository.apache.org/content/repositories/snapshots/</url>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
|
||||||
|
<!-- DO NOT EDIT unless instructed to do so or you know what you're doing. -->
|
||||||
|
<build>
|
||||||
|
<finalName>${project.name}-${project.version}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
|
||||||
|
<!-- Change version to the latest one from
|
||||||
|
https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
|
||||||
|
<version>3.2.2</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<mainClass>${main.class}</mainClass>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
|
||||||
|
<!-- Change version to the latest one from
|
||||||
|
https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||||
|
<version>3.9.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
|
||||||
|
<!-- We use latest snapshot here for modern Java compatibility. Change version to the latest one from
|
||||||
|
https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-shade-plugin/ -->
|
||||||
|
<version>3.3.1-SNAPSHOT</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package org.mineacademy.mavenprogram;
|
||||||
|
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main program's class.
|
||||||
|
*/
|
||||||
|
public class MavenProgram {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main program's method. Every Java program has this method.
|
||||||
|
* Your entire program starts here.
|
||||||
|
*
|
||||||
|
* Example: When you start your Minecraft, it too uses this method
|
||||||
|
* to initialise everything and make sure the program then runs
|
||||||
|
* indefinitely until you close it.
|
||||||
|
*
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
// Simple method to show a closeable dialog
|
||||||
|
JOptionPane.showMessageDialog(null, "Java is fun");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue