Skip to content

Commit

Permalink
version back to normal dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ezTxmMC committed Dec 30, 2024
1 parent 1fd8196 commit cab0d0c
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 56 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/chain-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>chain-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/manager-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>manager-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/modules-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>modules-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/node-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>node-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-api</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-api/worker-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>worker-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-chain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-chain</artifactId>

Expand Down
15 changes: 1 addition & 14 deletions smoothcloud-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>

<artifactId>smoothcloud-launcher</artifactId>
Expand Down Expand Up @@ -44,19 +44,6 @@
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.Base64;

public class Downloader {
Expand All @@ -15,37 +16,30 @@ public static void downloadJar(String username, String password, String fileUrl,
String checkDir = "dependencies/" + groupId.replace(".", "/") + "/" + artifactId;
File checkDirFile = new File(checkDir);
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/") + 1);
if (checkDirFile.exists()) {
if (checkDirFile.isDirectory()) {
if (checkDirFile.listFiles() != null && checkDirFile.listFiles().length > 0) {
boolean skip = false;
for (File file : checkDirFile.listFiles()) {
if (file.isDirectory()) {
if (file.getName().equalsIgnoreCase(version)) {
skip = true;
break;
}
}
}
if (skip) {
System.out.println("Skipped " + artifactId + ".");
return;
}
boolean update = false;
for (File file : checkDirFile.listFiles()) {
if (checkDirFile.exists() && checkDirFile.isDirectory()) {
File[] files = checkDirFile.listFiles();
if (files != null && files.length > 0) {
boolean skip = Arrays.stream(files)
.filter(File::isDirectory)
.anyMatch(file -> file.getName().equalsIgnoreCase(version));
if (skip) {
System.out.println("Skipped " + artifactId + ".");
return;
}
boolean versionExists = Arrays.stream(files)
.anyMatch(file -> file.isDirectory() && file.getName().equalsIgnoreCase(version));
if (!versionExists) {
Arrays.stream(files).forEach(file -> {
if (file.isDirectory()) {
if (file.delete()) {
update = true;
System.out.println("Updating... " + artifactId + ".");
}
deleteRecursively(file);
} else {
file.delete();
}
}
if (update) {
System.out.println("Updating " + artifactId + "...");
} else {
System.out.println("Downloading " + artifactId + "...");
}
});
}
System.out.println(versionExists
? "Updating " + artifactId + "..."
: "Downloading " + artifactId + "...");
}
}
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
Expand Down Expand Up @@ -88,4 +82,19 @@ public static void downloadJar(String username, String password, String fileUrl,
outputStream.close();
System.out.println("Downloaded " + artifactId + ".");
}

private static void deleteRecursively(File file) {
File[] subFiles = file.listFiles();
if (subFiles != null) {
for (File subFile : subFiles) {
if (subFile.isDirectory()) {
deleteRecursively(subFile);
} else {
subFile.delete();
}
}
}
file.delete(); // Lösche das Verzeichnis selbst
}

}
4 changes: 2 additions & 2 deletions smoothcloud-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-manager</artifactId>

Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>eu.smoothcloud</groupId>
<artifactId>manager-api</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-modules</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>

<artifactId>smoothcloud-node</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-util</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion smoothcloud-worker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.smoothcloud</groupId>
<artifactId>smoothcloud-parent</artifactId>
<version>1.0.0-dev.5194052</version>
<version>1.0.0-dev</version>
</parent>
<artifactId>smoothcloud-worker</artifactId>

Expand Down

0 comments on commit cab0d0c

Please sign in to comment.