Skip to content

Commit c979cd9

Browse files
committed
spring boot, spring shell versions, maven-git-versioning-extension
1 parent 3f46c57 commit c979cd9

File tree

9 files changed

+131
-121
lines changed

9 files changed

+131
-121
lines changed

.mvn/extensions.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
3-
<extension>
4-
<groupId>fr.brouillard.oss</groupId>
5-
<artifactId>jgitver-maven-plugin</artifactId>
6-
<version>1.9.0</version>
7-
</extension>
8-
<extension>
9-
<groupId>kr.motd.maven</groupId>
10-
<artifactId>os-maven-plugin</artifactId>
11-
<version>1.7.0</version>
12-
</extension>
13-
</extensions>
1+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
3+
<extension>
4+
<groupId>me.qoomon</groupId>
5+
<artifactId>maven-git-versioning-extension</artifactId>
6+
<version>9.11.0</version>
7+
</extension>
8+
<extension>
9+
<groupId>kr.motd.maven</groupId>
10+
<artifactId>os-maven-plugin</artifactId>
11+
<version>1.7.1</version>
12+
</extension>
13+
</extensions>

.mvn/jgitver.config.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.4.0.xsd">
4+
5+
<refs considerTagsOnBranches="true">
6+
<ref type="tag">
7+
<pattern><![CDATA[v(?<version>.*)]]></pattern>
8+
<version>${ref.version}</version>
9+
</ref>
10+
<ref type="branch">
11+
<pattern>(main|release.*)</pattern>
12+
<version>${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT</version>
13+
</ref>
14+
<ref type="branch">
15+
<pattern><![CDATA[feature/(?<feature>.+)]]></pattern>
16+
<version>${describe.tag.version}-${ref.feature}-SNAPSHOT</version>
17+
</ref>
18+
</refs>
19+
<rev>
20+
<version>${commit}</version>
21+
</rev>
22+
</configuration>

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=23.1.2.r21-nik
3+
java=25-graalce

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- This tool decreases the amount of time between `T-Initialize` and `T-Production`
1717
- This improves the `Fifth Metric` Mean Time To Dopamine (MTTD)
1818
- This tool provides commands via CLI and interactive shell
19-
- Add the `jgitver-maven-plugin` and `os-maven-plugin` as Maven Extensions
19+
- Add the `maven-git-versioning-extension` and `os-maven-plugin` as Maven Extensions
2020
- Update the `project-description`
2121
- Update the `project-name`
2222
- Update the `project-version`
@@ -52,6 +52,9 @@ Application Config Commands
5252
5353
Built-In Commands
5454
help: Display help about available commands
55+
stacktrace: Display the full stacktrace of the last error.
56+
clear: Clear the shell screen.
57+
quit, exit: Exit the shell.
5558
history: Display or save the history of previously run commands
5659
version: Show version info
5760
script: Read and execute commands from a file.
@@ -62,15 +65,23 @@ Cloud Function Example
6265
Maven Extension Commands
6366
extensions: add mvn extensions and config
6467
68+
Pipeline Commands
69+
multi-arch-manifests: pipelines to create multi-architecture manifests
70+
6571
Pom File Commands
6672
native-maven-plugin: Support for GraalVM native-image compiler.
6773
multi-arch-builder: Add multi-architecture builder support.
6874
project-name: Update the project name
69-
tiny-buildpack-profile: Create Native OCI Images with paketobuildpacks/builder:tiny
75+
spring-format: Add Spring Java Format Maven Plugin and validate goal.
76+
spring-rest-docs: Add Spring REST Docs
7077
project-version: Update the project version
7178
lambda-profile: Add AWS Lambda profile for Spring Cloud Functions
7279
webflux-profile: Add a 'webflux' profile for Spring Cloud Functions
80+
zulu-builder: Use Zulu JDK for spring-boot:build-image with JVM args
7381
project-description: Update the project description
82+
83+
Read Me Commands
84+
add-read-me: add ReadMe.md file
7485
```
7586

7687
## Built with:

pom.xml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.4.3</version>
8+
<version>3.5.6</version>
99
<relativePath></relativePath>
1010
</parent>
1111
<groupId>dev.dashaun.shell.initializr</groupId>
1212
<artifactId>plusplus</artifactId>
1313
<version>0</version>
1414
<name>${project.groupId}:${project.artifactId}</name>
1515
<properties>
16-
<spring-shell.version>3.4.0</spring-shell.version>
17-
<java.version>21</java.version>
16+
<spring-shell.version>3.4.1</spring-shell.version>
17+
<java.version>25</java.version>
1818
</properties>
1919
<dependencyManagement>
2020
<dependencies>
@@ -48,9 +48,6 @@
4848
<plugin>
4949
<groupId>org.graalvm.buildtools</groupId>
5050
<artifactId>native-maven-plugin</artifactId>
51-
<configuration>
52-
<imageName>initializr-plusplus-${os.detected.classifier}</imageName>
53-
</configuration>
5451
</plugin>
5552
<plugin>
5653
<groupId>org.springframework.boot</groupId>
@@ -64,18 +61,7 @@
6461
</execution>
6562
</executions>
6663
</plugin>
67-
<plugin>
68-
<groupId>io.spring.javaformat</groupId>
69-
<artifactId>spring-javaformat-maven-plugin</artifactId>
70-
<version>0.0.41</version>
71-
<executions>
72-
<execution>
73-
<goals>
74-
<goal>validate</goal>
75-
</goals>
76-
</execution>
77-
</executions>
78-
</plugin>
64+
7965
</plugins>
8066
</build>
8167
</project>

src/main/java/dev/dashaun/shell/initializr/plusplus/MavenExtensionCommands.java

Lines changed: 74 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -11,79 +11,84 @@
1111
@ShellComponent
1212
public class MavenExtensionCommands {
1313

14-
@ShellMethod("add mvn extensions and config")
15-
public String extensions() {
16-
try {
17-
mavenConfigDir();
18-
extensionsConfig();
19-
jgitverConfig();
20-
}
21-
catch (IOException ioException) {
22-
return "There was a problem adding jgitver extension and config";
23-
}
24-
return "Successfully added jgitver extension and config in ./.mvn";
25-
}
14+
@ShellMethod("add mvn extensions and config")
15+
public String extensions() {
16+
try {
17+
mavenConfigDir();
18+
extensionsConfig();
19+
mavenGitVersioningExtension();
20+
} catch (IOException ioException) {
21+
return "There was a problem adding extensions and config";
22+
}
23+
return "Successfully added extensions and config in ./.mvn";
24+
}
2625

27-
private void extensionsConfig() throws IOException {
28-
File file = new File("./.mvn/extensions.xml");
29-
if (!file.exists()) {
30-
writeStringToFile(extensionsFile(), file);
31-
}
32-
}
26+
private void extensionsConfig() throws IOException {
27+
File file = new File("./.mvn/extensions.xml");
28+
if (!file.exists()) {
29+
writeStringToFile(extensionsFile(), file);
30+
}
31+
}
3332

34-
private void jgitverConfig() throws IOException {
35-
File file = new File("./.mvn/jgitver.config.xml");
36-
if (!file.exists()) {
37-
writeStringToFile(jgitverConfigFile(), file);
38-
}
39-
}
33+
private void mavenGitVersioningExtension() throws IOException {
34+
File file = new File("./.mvn/maven-git-versioning-extension.xml");
35+
if (!file.exists()) {
36+
writeStringToFile(mavenGitVersioningExtensionConfig(), file);
37+
}
38+
}
4039

41-
private String extensionsFile() {
42-
return """
43-
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44-
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
45-
<extension>
46-
<groupId>fr.brouillard.oss</groupId>
47-
<artifactId>jgitver-maven-plugin</artifactId>
48-
<version>1.9.0</version>
49-
</extension>
50-
<extension>
51-
<groupId>kr.motd.maven</groupId>
52-
<artifactId>os-maven-plugin</artifactId>
53-
<version>1.7.1</version>
54-
</extension>
55-
</extensions>
56-
""";
57-
}
40+
private String extensionsFile() {
41+
return """
42+
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43+
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
44+
<extension>
45+
<groupId>me.qoomon</groupId>
46+
<artifactId>maven-git-versioning-extension</artifactId>
47+
<version>9.11.0</version>
48+
</extension>
49+
<extension>
50+
<groupId>kr.motd.maven</groupId>
51+
<artifactId>os-maven-plugin</artifactId>
52+
<version>1.7.1</version>
53+
</extension>
54+
</extensions>
55+
""";
56+
}
5857

59-
private String jgitverConfigFile() {
60-
return """
61-
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
62-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
63-
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
64-
<strategy>CONFIGURABLE</strategy>
65-
<policy>MAX</policy>
66-
<autoIncrementPatch>true</autoIncrementPatch>
67-
<useDirty>false</useDirty>
68-
<useGitCommitId>false</useGitCommitId>
69-
<useSnapshot>false</useSnapshot>
70-
<gitCommitIdLength>8</gitCommitIdLength>
71-
<nonQualifierBranches>main</nonQualifierBranches>
72-
<useDefaultBranchingPolicy>true</useDefaultBranchingPolicy>
73-
<exclusions> <!-- Optional list of directory path -->
74-
<exclusion>.m2</exclusion> <!-- relative path from project root directory -->
75-
</exclusions>
76-
</configuration>
77-
""";
78-
}
58+
private String mavenGitVersioningExtensionConfig() {
59+
return """
60+
<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
61+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
62+
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.4.0.xsd">
63+
64+
<refs considerTagsOnBranches="true">
65+
<ref type="tag">
66+
<pattern><![CDATA[v(?<version>.*)]]></pattern>
67+
<version>${ref.version}</version>
68+
</ref>
69+
<ref type="branch">
70+
<pattern>(main|release.*)</pattern>
71+
<version>${describe.tag.version.major}.${describe.tag.version.minor}.${describe.tag.version.patch.next}-SNAPSHOT</version>
72+
</ref>
73+
<ref type="branch">
74+
<pattern><![CDATA[feature/(?<feature>.+)]]></pattern>
75+
<version>${describe.tag.version}-${ref.feature}-SNAPSHOT</version>
76+
</ref>
77+
</refs>
78+
<rev>
79+
<version>${commit}</version>
80+
</rev>
81+
</configuration>
82+
""";
83+
}
7984

80-
private void mavenConfigDir() throws IOException {
81-
File file = new File("./.mvn");
82-
if (!file.exists()) {
83-
if (!file.mkdir()) {
84-
throw new IOException("Couldn't create directory");
85-
}
86-
}
87-
}
85+
private void mavenConfigDir() throws IOException {
86+
File file = new File("./.mvn");
87+
if (!file.exists()) {
88+
if (!file.mkdir()) {
89+
throw new IOException("Couldn't create directory");
90+
}
91+
}
92+
}
8893

8994
}

src/main/java/dev/dashaun/shell/initializr/plusplus/models/Plugins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public static Plugin springFormat() {
208208
Plugin p = new Plugin();
209209
p.setGroupId("io.spring.javaformat");
210210
p.setArtifactId("spring-javaformat-maven-plugin");
211-
p.setVersion("0.0.40");
211+
p.setVersion("0.0.47");
212212
p.getExecutions().add(validate());
213213
return p;
214214
}

src/main/resources/application.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ spring:
88
web-application-type: 'NONE'
99
shell:
1010
history:
11-
enabled: 'false'
11+
enabled: 'false'
12+
interactive:
13+
enabled: true

0 commit comments

Comments
 (0)