How do I deploy a .jar file?
I currently run a Minecraft server using Arclight and I want to deploy the program on an azure server. I know how to do it in a VM but I was hoping to make it an App instead to make it easier to access the console. Thank you!
Azure App Service
-
SnehaAgrawal-MSFT 16,111 Reputation points • Microsoft Employee
2023-10-30T13:19:04.1333333+00:00 @Amit Reef Thanks for asking question! You may refer to this article shows you how to deploy your code as a ZIP, WAR, JAR, or EAR package to Azure App Service. It also shows how to deploy individual files to App Service, separate from your application package.
To deploy a .jar file to Azure App Service, you can use the Azure CLI, PowerShell, or the Kudu publish API. The deployment process places the package on the shared file drive correctly. For that reason, deploying JAR packages using FTP or WebDeploy is not recommended.
Deploy a JAR package by using the az webapp deploy command.
Also, refer to this Quickstart: Create a Java app on Azure App Service
Let us know if further query or issue remains.
-
SnehaAgrawal-MSFT 16,111 Reputation points • Microsoft Employee
2023-11-01T07:47:50.15+00:00 @Amit Reef Just checking if you have chance to see recent response.
Please let us know if further query or issue remains.
-
Amit Reef 0 Reputation points
2023-11-01T14:36:51.7166667+00:00 Hi, I've seen your comment just been struggling to apply it. I'm trying to deploy it though git but I keep getting an error in deployment
-
SnehaAgrawal-MSFT 16,111 Reputation points • Microsoft Employee
2023-11-03T05:58:22.8633333+00:00 Could you please share error you are receiving to help you better on this.
-
Amit Reef 0 Reputation points
2023-11-03T11:17:28.1433333+00:00 Ofcourse, here is the error from github
Run mvn clean install
8[INFO] Scanning for projects...
9[INFO] ------------------------------------------------------------------------
10[INFO] BUILD FAILURE
11[INFO] ------------------------------------------------------------------------
12[INFO] Total time: 1.047 s
13[INFO] Finished at: 2023-10-28T18:01:44Z
14[INFO] ------------------------------------------------------------------------
15Error: The goal you specified requires a project to execute but there is no POM in this directory (D:\a\LavenderMC\LavenderMC). Please verify you invoked Maven from the correct directory. -> [Help 1]
16Error:
17Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
18Error: Re-run Maven using the -X switch to enable full debug logging.
19Error:
20Error: For more information about the errors and possible solutions, please read the following articles:
21Error: [Help 1]
`http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException`22Error: Process completed with exit code 1.
Upload artifact for deployment job0s
Post Set up Java version0s
Post Run actions/checkout@v41s
Complete job0s
Add or update the Azure App Service build and deployment workflow config · Nephalem0/LavenderMC@1e8c6f4
-
Amit Reef 0 Reputation points
2023-11-03T11:18:15.5333333+00:00 Run mvn clean install
8[INFO] Scanning for projects...
9[INFO] ------------------------------------------------------------------------
10[INFO] BUILD FAILURE
11[INFO] ------------------------------------------------------------------------
12[INFO] Total time: 1.047 s
13[INFO] Finished at: 2023-10-28T18:01:44Z
14[INFO] ------------------------------------------------------------------------
15Error: The goal you specified requires a project to execute but there is no POM in this directory (D:\a\LavenderMC\LavenderMC). Please verify you invoked Maven from the correct directory. -> [Help 1]
16Error:
17Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
18Error: Re-run Maven using the -X switch to enable full debug logging.
19Error:
20Error: For more information about the errors and possible solutions, please read the following articles:
21Error: [Help 1]
`http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException`22Error: Process completed with exit code 1.
Upload artifact for deployment job0s
Post Set up Java version0s
Post Run actions/checkout@v41s
Complete job0s
Add or update the Azure App Service build and deployment workflow config · Nephalem0/LavenderMC@1e8c6f4
-
SnehaAgrawal-MSFT 16,111 Reputation points • Microsoft Employee
2023-11-08T17:40:52.3833333+00:00 @Amit Reef Could you please go to https://shell.azure.com, and select the Launch Cloud Shell button to open Cloud Shell in your browser > Select Bash > and then execute the Maven command using this QuickStart link- https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=java-maven-quarkus#2---create-a-java-app
Let us know if issue remains.
-
AirGordon 6,775 Reputation points
2023-11-08T18:16:45.35+00:00 It's worth considering other options for hosting your server.
For years, i've been running Minecraft in a container using the ACI then AKS and then back to ACI again 😏
I have a repository full of Infrastructure as Code assets to do all of this : https://gitlab.com/Gordonby/MinecraftOnAzure
There are container images for both Bedrock and Java which you can use from https://docker-minecraft-server.readthedocs.io/en/latest/
If you're new to Azure or containers, then this script is the easiest place to start... Check the variables at the top and then what services are created throughout the script.
https://github.com/Gordonby/Snippets/blob/master/MinecraftBedrockAzure.sh -
SnehaAgrawal-MSFT 16,111 Reputation points • Microsoft Employee
2023-11-15T04:49:25.11+00:00 @Amit Reef Just checking if you have chance to see recent response.
Please let us know if further query or issue remains.
Sign in to comment