- Can follow this guide: https://stackoverflow.com/questions/2061094/importing-maven-project-into-eclipse
- Basics:
- File -> Import -> Maven -> Existing Maven Project
- Browse to and select the root folder of the Maven project (containing the pom.xml)
- Click Next then Finish
- Miscellaneous Links:
- To add a dependency:
- Open pom.xml in Eclipse
- Go to "Dependencies" tab at the bottom
- Click "Add..."
- Search for your desired dependency and select it
- Click "OK"
- Clean install of dependencies
- Follow same instructions as the "Deploying Locally" section below, except...
- Set "Goals" as
clean install
- Keep "Profiles" empty
- Run the configuration and you dependencies should be installed
- Right click on project in Eclipse
- Click "Run As" -> "Maven build..."
- Name it as something you'll remember/recognize
- Set Goals as "spring-boot:run"
- "Profiles" should be empty
- You should see some output in the console ending with something like "Started BehaviorEnrichmentJavaApplication in..."
- Application is now listening on port http://localhost:8080
- Right click on project in Eclipse
- Click "Run As" -> "Maven build..."
- Set Goals as "-Dmaven.test.skip=true package"
- Upload resulting .jar to deployment location.
- Run .jar using "java -jar JAR_NAME"
- Use "lsof -i :8080" to determine the PID of the process for future reference.
- Optionally, since a .jar cannot be run by PM2 or similar process managers for Linux, the .jar may be run as a service. How to: https://dzone.com/articles/run-your-java-application-as-a-service-on-ubuntu