Sample of Creating Java Maven Project

Creating Java Maven Project on a GitHub

Task:

  1. Create empty Maven project without any dependencies
  2. Create HelloWorld class with lambda to test that Java 8 was set up correctly.
  3. Setup Git. Create .gitignore.
  4. Create a GitHub repository for the project.

1. First we need to run the IDEA and start a new project

java maven project
2. Select Maven project from the list and click “next”

java maven project sample

3. Insert GroupId and Artifactd (e.g. Sobutylnik) and click “next”

java maven project example

4. Insert the project name Sobutylnik and click “Finish”

java maven project assignment
5. Go to src->main->java folder and create a package “com.sobutylnik.hello”

java maven project completed

java maven project analyzed
6. Create a Java class in this package with arbitrary name (e.g. “HelloWorld”) in order to check the lambda (if lambdas work, Java 8 is installed correctly)

7. Set Java 8 if asked and Enable Auto-Import

sample maven project github
8. Run the following code:

sample maven project github sample

sample maven project github example
If everything works fine, move to the next step.

9. Create Git Repository by uploading the project on Github:

sample maven project github

sample maven project github completed

Select the appropriate files for upload

sample maven project github in details

10. Create README and .gitignore files by clicking “Create new file”

sample maven project github

The code inside .gitignore file should be as follow:

The text inside README file can be arbitrary

Hence, the project is created and uploaded to GitHub.

sample maven project github

We hope that you have become more aware of the topic after reading through this sample of Java Maven project. This sample will help you if you wanted to deal with such an assignment faster. This sample of Maven project on GitHub is a great helper for those who study programming and need more explanation on the topic.

Today is the most magical day for you, because you have found the service that can help you with any assignment. We have a big team of experts who are knowledgeable in different disciplines. If you are actively looking for a service who will solve your homework problems, then AssignmentShark is what you need. Remember us when you face with academic problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Customer testimonials

Submit your instructions to the experts without charge.