Skip to content

Commit 33d913a

Browse files
add comments and configure maven publish
1 parent 1ab4ad1 commit 33d913a

File tree

5 files changed

+64
-4
lines changed

5 files changed

+64
-4
lines changed

build.gradle

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ plugins {
33
id 'org.springframework.boot' version '3.4.5'
44
id 'io.spring.dependency-management' version '1.1.7'
55
id 'maven-publish'
6+
id 'signing'
7+
id 'org.jreleaser' version '1.18.0'
68
}
79

810
group = 'io.github.open-source-lfernandes'
911
description = 'A Spring Boot starter for seamless integration with secret management services like AWS Secrets Manager, HashiCorp Vault, and more.'
10-
version = '1.0.5-SNAPSHOT'
12+
version = '1.0.0'
1113

1214
java {
1315
toolchain {
@@ -59,10 +61,44 @@ tasks.jar {
5961
enabled = true
6062
}
6163

64+
java {
65+
withJavadocJar()
66+
withSourcesJar()
67+
}
68+
6269
publishing {
70+
repositories {
71+
maven {
72+
url = layout.buildDirectory.dir('staging-deploy')
73+
}
74+
}
75+
6376
publications {
64-
maven(MavenPublication) {
77+
mavenJava(MavenPublication) {
6578
from components.java
79+
pom {
80+
name = 'Spring Secret Starter'
81+
description = 'A Spring Boot starter for seamless integration with secret management services like AWS Secrets Manager, HashiCorp Vault, and more.'
82+
url = 'https://github.com/open-source-lfernandes/spring-secret-starter'
83+
licenses {
84+
license {
85+
name = 'Apache License 2.0'
86+
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
87+
}
88+
}
89+
developers {
90+
developer {
91+
id = 'open-source-lfernandes'
92+
name = 'Lucas Fernandes'
93+
94+
}
95+
}
96+
scm {
97+
connection = 'scm:git:git://github.com/open-source-lfernandes/spring-secret-starter.git'
98+
developerConnection = 'scm:git:ssh://github.com:open-source-lfernandes/spring-secret-starter.git'
99+
url = 'https://github.com/open-source-lfernandes/spring-secret-starter/tree/main'
100+
}
101+
}
66102
}
67103
}
68-
}
104+
}

src/main/java/io/github/open_source_lfernandes/spring_secret_starter/enums/Origin.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,12 @@
55
* It can be either AWS or CUSTOM.
66
*/
77
public enum Origin {
8-
AWS, CUSTOM
8+
/**
9+
* AWS indicates that the secret is sourced from AWS Secrets Manager.
10+
*/
11+
AWS,
12+
/**
13+
* CUSTOM indicates that the secret is sourced from a custom provider.
14+
*/
15+
CUSTOM
916
}

src/main/java/io/github/open_source_lfernandes/spring_secret_starter/exceptions/NoneSecretProviderException.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
* It extends RuntimeException and provides a constructor to set the error message.
77
*/
88
public class NoneSecretProviderException extends RuntimeException {
9+
/**
10+
* Constructs a new NoneSecretProviderException with the specified detail message.
11+
*
12+
* @param message the detail message
13+
*/
914
public NoneSecretProviderException(String message) {
1015
super(message);
1116
}

src/main/java/io/github/open_source_lfernandes/spring_secret_starter/exceptions/SecretNotFoundException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
*/
99
public class SecretNotFoundException extends Exception {
1010

11+
/**
12+
* Constructs a new SecretNotFoundException with a message indicating
13+
* that the secret with the specified key was not found.
14+
*
15+
* @param key the key of the secret that was not found
16+
*/
1117
public SecretNotFoundException(
1218
String key
1319
) {

src/main/java/io/github/open_source_lfernandes/spring_secret_starter/messages/Messages.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
@Getter
1010
public enum Messages {
1111

12+
/**
13+
* Error messages used in the application.
14+
*/
1215
KEY_CANNOT_BE_NULL("Key cannot be null"),
16+
/**
17+
* Error message for when the secret value is null.
18+
*/
1319
ORIGIN_CANNOT_BE_BULL("Origin cannot be null");
1420

1521
private final String description;

0 commit comments

Comments
 (0)