-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows users to set a desired name for the applications (using quarkus.application.name) or version. The idea came from: #1300 (comment) and this configuration is meant to be used by extensions that for some reason need this information (like the planned kubernetes extension)
- Loading branch information
Showing
10 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
core/deployment/src/main/java/io/quarkus/deployment/ApplicationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public class ApplicationConfig { | ||
|
||
/** | ||
* The name of the application. | ||
* If not set, defaults to the name of the project. | ||
*/ | ||
String name; | ||
|
||
/** | ||
* The version of the application. | ||
* If not set, defaults to the version of the project | ||
*/ | ||
String version; | ||
} |
32 changes: 32 additions & 0 deletions
32
core/deployment/src/main/java/io/quarkus/deployment/ApplicationInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.quarkus.deployment; | ||
|
||
public class ApplicationInfo { | ||
|
||
public static final ApplicationInfo UNSET = new ApplicationInfo(null, null, null); | ||
|
||
private final String group; | ||
private final String name; | ||
private final String version; | ||
|
||
public ApplicationInfo(String group, String name, String version) { | ||
this.group = group; | ||
this.name = name; | ||
this.version = version; | ||
} | ||
|
||
public String getGroup() { | ||
return group; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public boolean isUnset() { | ||
return this == UNSET; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/deployment/src/main/java/io/quarkus/deployment/builditem/ApplicationInfoBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import org.jboss.builder.item.SimpleBuildItem; | ||
|
||
import io.quarkus.deployment.ApplicationInfo; | ||
|
||
public final class ApplicationInfoBuildItem extends SimpleBuildItem { | ||
|
||
private final ApplicationInfo applicationInfo; | ||
|
||
public ApplicationInfoBuildItem(ApplicationInfo applicationInfo) { | ||
this.applicationInfo = applicationInfo; | ||
} | ||
|
||
public ApplicationInfo getApplicationInfo() { | ||
return applicationInfo; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters