-
Notifications
You must be signed in to change notification settings - Fork 24
/
MvnCmds.java
executable file
·55 lines (50 loc) · 2.48 KB
/
MvnCmds.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package io.quarkus.ts.startstop.utils;
import java.util.stream.Stream;
import static io.quarkus.ts.startstop.utils.Commands.getQuarkusGroupId;
import static io.quarkus.ts.startstop.utils.Commands.getQuarkusNativeProperties;
import static io.quarkus.ts.startstop.utils.Commands.getLocalMavenRepoDir;
import static io.quarkus.ts.startstop.utils.Commands.getQuarkusVersion;
/**
* Maven commands
*/
public enum MvnCmds {
JVM(new String[][]{
new String[]{"mvn", "clean", "dependency:tree", "compile", "quarkus:build", "-Dquarkus.package.output-name=quarkus"},
new String[]{Commands.JAVA_BIN, "-jar", "target/quarkus-app/quarkus-run.jar"}
}),
DEV(new String[][]{
new String[]{"mvn", "clean", "quarkus:dev", "-Dmaven.repo.local=" + getLocalMavenRepoDir(), "-Dquarkus.analytics.disabled=true"}
}),
NATIVE(new String[][]{
Stream.concat(Stream.of("mvn", "clean", "compile", "package", "-Pnative"),
getQuarkusNativeProperties().stream()).toArray(String[]::new),
new String[]{Commands.isThisWindows ? "target\\quarkus-runner.exe" : "./target/quarkus-runner", "-Xmx96m"}
}),
GENERATOR(new String[][]{
new String[]{
"mvn",
getQuarkusGroupId() + ":quarkus-maven-plugin:" + getQuarkusVersion() + ":create",
"-DprojectGroupId=my-groupId",
"-DprojectArtifactId=" + Apps.GENERATED_SKELETON.dir,
"-DprojectVersion=1.0.0-SNAPSHOT",
"-DpackageName=org.my.group",
"-DquarkusRegistryClient=false"
}
}),
MVNW_DEV(new String[][]{
new String[]{Commands.mvnw(), "-e", "quarkus:dev", "-Dquarkus.analytics.disabled=true"}
}),
MVNW_JVM(new String[][]{
new String[]{Commands.mvnw(), "clean", "dependency:tree", "compile", "quarkus:build", "-Dquarkus.package.output-name=quarkus"},
new String[]{Commands.JAVA_BIN, "-jar", "target/quarkus-app/quarkus-run.jar"}
}),
MVNW_NATIVE(new String[][]{
Stream.concat(Stream.of(Commands.mvnw(), "clean", "dependency:tree", "compile", "package", "-Pnative", "-Dquarkus.package.output-name=quarkus"),
getQuarkusNativeProperties().stream()).toArray(String[]::new),
new String[]{Commands.isThisWindows ? "target\\quarkus-runner" : "./target/quarkus-runner"}
});
public final String[][] mvnCmds;
MvnCmds(String[][] mvnCmds) {
this.mvnCmds = mvnCmds;
}
}