Skip to content

Commit

Permalink
2025.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlasov committed Jan 28, 2025
1 parent 0f1e99b commit 79d38a7
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 27 deletions.
2 changes: 1 addition & 1 deletion capability-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>capability-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion capability/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>capability</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>cli</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions cli/src/main/java/org/nasdanika/cli/AbstractLauncherCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
Expand Down Expand Up @@ -95,6 +96,15 @@ public abstract class AbstractLauncherCommand extends CommandBase {
"Supports .* and .** patterns"
})
private String rootModules;

@Option(
names = {"--add-modules"},
description = {
"Comma-separated list of modules to add to",
"Java command --add-modules",
"Computed if not specified"
})
private String addModules;

@Option(
names = {"-M", "--modules"},
Expand Down Expand Up @@ -366,6 +376,9 @@ protected void buildClasspath(Map<String, File> moduleMap, Map<String, ModuleRef
}

protected void buildAddModules(Collection<String> modulesToAdd, StringBuilder builder) {
if (!Util.isBlank(addModules)) {
modulesToAdd = Collections.singleton(addModules);
}
if (!modulesToAdd.isEmpty()) {
boolean firstModuleEntry = true;
for (String m: modulesToAdd) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void generateLauncher() throws IOException {
"-b", "target/dist",
"-M", "target/dist/modules",
"-j", "#!/bin/bash\n\njava",
"--add-modules", "ALL-SYSTEM",
"-o", "nsd",
// "-r", "org.nasdanika.**",
"-p", ":",
Expand All @@ -65,6 +66,7 @@ public void generateLauncher() throws IOException {
"-M", "target/dist/modules",
"-o", "nsd-debug",
"-j", "#!/bin/bash\n\njava -Xdebug -Xrunjdwp:transport=dt_socket,address=8998,server=y",
"--add-modules", "ALL-SYSTEM",
// "-r", "org.nasdanika.**",
"-p", ":",
"-a", "$@");
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>common</artifactId>
Expand Down
22 changes: 16 additions & 6 deletions common/src/main/java/org/nasdanika/common/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.ToIntFunction;
Expand Down Expand Up @@ -1256,12 +1257,6 @@ public <T> T compute(Context context, String key, String path, Class<T> type) {

/**
* Walks the directory passing files and their paths to the listener.
* @param source
* @param target
* @param cleanTarget
* @param cleanPredicate
* @param listener
* @throws IOException
*/
public static void walk(String path, BiConsumer<File,String> listener, File... files) {
if (files != null) {
Expand All @@ -1276,6 +1271,21 @@ public static void walk(String path, BiConsumer<File,String> listener, File... f
}
}

/**
* Walks the directory passing files and their paths to the visitor.
* For directories visits children recursively if visitor returns true
*/
public static void walk(String path, BiPredicate<File,String> visitor, File... files) {
if (files != null) {
for (File file: files) {
String filePath = path == null ? file.getName() : path + "/" + file.getName();
if (visitor.test(file, filePath) && file.isDirectory()) {
walk(filePath, visitor, file.listFiles());
}
}
}
}

public static void copy(File source, File target, boolean cleanTarget, BiConsumer<File,File> listener) throws IOException {
if (cleanTarget && target.isDirectory()) {
delete(target.listFiles());
Expand Down
2 changes: 1 addition & 1 deletion diagram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>diagram</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion drawio.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>drawio-model</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion drawio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>drawio</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion emf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>emf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion exec.gen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>exec-gen</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion exec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>exec</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion graph.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>graph-model</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion graph/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>graph</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion groovy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>groovy</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>http</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>mapping</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion ncore.gen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>ncore-gen</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ncore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>ncore</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>persistence</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<name>Nasdanika Core Parent</name>
Expand Down
2 changes: 1 addition & 1 deletion resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.nasdanika.core</groupId>
<version>2024.12.0</version>
<version>2025.1.0</version>
<relativePath>..</relativePath>
</parent>
<artifactId>resources</artifactId>
Expand Down

0 comments on commit 79d38a7

Please sign in to comment.