Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Added a new optional parameter port to solve issue: #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Wiechmann committed Mar 28, 2019
1 parent cdb1cdc commit 80c0257
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/com/axway/apim/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public static int run(String args[]) {
option.setArgName("api-host");
options.addOption(option);

option = new Option("port", true, "The API-Manager port where the REST-API is exposed. Defaults to 8075.");
option.setArgName("8181");
options.addOption(option);

option = new Option("u", "username", true, "Username used to authenticate. Please note, that this user must have Admin-Role");
option.setRequired(true);
option.setArgName("apiadmin");
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/axway/apim/lib/CommandParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public String getHostname() {
}

public int getPort() {
return port;
if(!this.cmd.hasOption("port")) return port;
return Integer.parseInt(this.cmd.getOptionValue("port"));
}

public boolean isEnforceBreakingChange() {
Expand Down

0 comments on commit 80c0257

Please sign in to comment.