This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
1,498 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ all/ | |
logs/ | ||
.idea/ | ||
*.iml | ||
out/ | ||
out/ | ||
/**/dependency-reduced-pom.xml |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
node { | ||
stage 'Checkout' | ||
git branch: env.BRANCH_NAME, url: 'https://github.com/Nincraft/ModPackDownloader.git' | ||
|
||
stage 'Build' | ||
bat 'mvnw.cmd clean install' | ||
|
||
stage 'Archive' | ||
archive excludes: '**/target/Mod*-sources.jar,**/target/Mod*-javadoc.jar', includes: '**/target/Mod*.jar, modpackdownloader-core/target/classes/latest.json' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>modpackdownloader</artifactId> | ||
<groupId>com.nincraft</groupId> | ||
<version>0.5</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>modpackdownloader-cli</artifactId> | ||
<name>Modpack Downloader CLI</name> | ||
<properties> | ||
<build.number>SNAPSHOT</build.number> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.nincraft</groupId> | ||
<artifactId>modpackdownloader-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.beust</groupId> | ||
<artifactId>jcommander</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<finalName>ModpackDownloader-cli-${short.project.version}+${build.number}</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>1.7</version> | ||
<executions> | ||
<execution> | ||
<id>regex-property</id> | ||
<phase>process-resources</phase> | ||
<goals> | ||
<goal>regex-property</goal> | ||
</goals> | ||
<configuration> | ||
<name>short.project.version</name> | ||
<value>${project.version}</value> | ||
<regex>^(\d\.\d(?>\.\d)?)(-SNAPSHOT)?</regex> | ||
<replacement>$1</replacement> | ||
<failIfNoMatch>true</failIfNoMatch> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.4.3</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<transformers> | ||
<transformer | ||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>com.nincraft.modpackdownloader.cli.ModpackDownloaderCLI</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
37 changes: 37 additions & 0 deletions
37
...downloader-cli/src/main/java/com/nincraft/modpackdownloader/cli/ModpackDownloaderCLI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.nincraft.modpackdownloader.cli; | ||
|
||
import com.nincraft.modpackdownloader.ModpackDownloaderManager; | ||
import com.nincraft.modpackdownloader.handler.ApplicationUpdateHandler; | ||
import com.nincraft.modpackdownloader.util.Arguments; | ||
import com.nincraft.modpackdownloader.util.FileSystemHelper; | ||
import lombok.extern.log4j.Log4j2; | ||
|
||
import java.util.Arrays; | ||
|
||
@Log4j2 | ||
public class ModpackDownloaderCLI { | ||
|
||
public static void main(final String[] args) throws InterruptedException { | ||
log.info("Starting ModpackDownloaderManager with arguments: {}", Arrays.toString(args)); | ||
ModpackDownloaderManager modpackDownloaderManager = new ModpackDownloaderManager(args); | ||
|
||
Arguments arguments = modpackDownloaderManager.getArguments(); | ||
|
||
if (arguments.isHelpEnabled()) { | ||
modpackDownloaderManager.getJCommander().usage(); | ||
return; | ||
} | ||
|
||
modpackDownloaderManager.init(); | ||
|
||
if (arguments.isClearCache()) { | ||
FileSystemHelper.clearCache(); | ||
return; | ||
} | ||
if (arguments.isUpdateApp()) { | ||
ApplicationUpdateHandler.update(); | ||
return; | ||
} | ||
modpackDownloaderManager.processManifests(); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.