Skip to content

Commit

Permalink
[WFMP-208]: dev mode deployment runtime name is not configurable.
Browse files Browse the repository at this point in the history
* Adding a new 'name' parameter with the same property as for the
  package mojo.

Jira: https://issues.redhat.com/browse/WFMP-208

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
  • Loading branch information
ehsavoie committed May 26, 2023
1 parent bbfb55c commit df26a70
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugin/src/main/java/org/wildfly/plugin/dev/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,14 @@ public class DevMojo extends AbstractServerStartMojo {
@Parameter(alias = "channels")
private List<ChannelConfiguration> channels;

/**
* Specifies the name used for the deployment.
*
* When the deployment is copied to the server, it is renamed with this name.
*/
@Parameter(property = PropertyNames.DEPLOYMENT_NAME)
private String name;

// Lazily loaded list of patterns based on the ignorePatterns
private final List<Pattern> ignoreUpdatePatterns = new ArrayList<>();
// Lazy loaded
Expand Down Expand Up @@ -837,7 +845,8 @@ private Deployment getDeploymentContent() {
if (remote) {
return Deployment.of(Path.of(project.getBuild().getDirectory()).resolve(filename));
} else {
return Deployment.of(resolveWarDir()).setRuntimeName(filename);
String runtimeName = this.name == null ? filename : this.name;
return Deployment.of(resolveWarDir()).setRuntimeName(runtimeName);
}
}

Expand Down

0 comments on commit df26a70

Please sign in to comment.