{"id":19327057,"url":"https://github.com/nishkarshraj/maven-using-cmd","last_synced_at":"2025-10-13T19:09:52.870Z","repository":{"id":35176314,"uuid":"194483140","full_name":"NishkarshRaj/Maven-Using-CMD","owner":"NishkarshRaj","description":"Create a project in Java using Apache Maven Build tool via Command Line and use GitHub Actions to build it on remote Docker Engine.","archived":false,"fork":false,"pushed_at":"2023-12-16T06:18:34.000Z","size":654,"stargazers_count":18,"open_issues_count":14,"forks_count":36,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-04T20:30:06.295Z","etag":null,"topics":["apache","build-automation","cmd","command-line","command-line-tool","css","dependabot","devops","html","java","maven","maven-repository"],"latest_commit_sha":null,"homepage":"https://iq.opengenus.org/building-java-application-using-apache-maven-command-line/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NishkarshRaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-30T06:28:37.000Z","updated_at":"2025-06-18T05:13:27.000Z","dependencies_parsed_at":"2025-04-22T20:38:57.429Z","dependency_job_id":"e6f1b539-e355-4a59-a69b-f5f7a5f3075a","html_url":"https://github.com/NishkarshRaj/Maven-Using-CMD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NishkarshRaj/Maven-Using-CMD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishkarshRaj%2FMaven-Using-CMD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishkarshRaj%2FMaven-Using-CMD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishkarshRaj%2FMaven-Using-CMD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishkarshRaj%2FMaven-Using-CMD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NishkarshRaj","download_url":"https://codeload.github.com/NishkarshRaj/Maven-Using-CMD/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishkarshRaj%2FMaven-Using-CMD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016866,"owners_count":26085884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","build-automation","cmd","command-line","command-line-tool","css","dependabot","devops","html","java","maven","maven-repository"],"created_at":"2024-11-10T02:15:52.235Z","updated_at":"2025-10-13T19:09:52.839Z","avatar_url":"https://github.com/NishkarshRaj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Maven (Command Line)\n# Creating a Simple Java Project name: mvn-cmd :smile:\n\n## Step 1: Create the java project\n```\nSyntax: mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false\n\nExplanation: For beginners,\nOnly two things are of concern:\n1) Group ID: This will be our package name.\n2) Artifact ID: This is our project name (mvn-cmd)\n```\n![Image](img/Create%20Project.png)\n\n## Step 2: Check the Directory Structure of created project\n```\nAt the source folder of the project:\n1) src/ \nIt contains two folders:\n1.1) main/ \nIt is used to create codes in java\n1.2) test/\nIt is used to create JUnit Test cases\n2) pom.xml \nPom.xml is the mail build file of the maven!\n```\n![Image](img/Maven%20Directory%20Structure.png)\n\n## Step 3: Change the source code (and file name) as you want to make\n```\nGo to /src/main/java/pkg1\nNOTE: pkg1 is the package name we defined while creating the project.\nAlways include package name in the code.\nModify the app.java file \nRename to the file name you want.\n```\n![Image](img/Source%20Directory%20for%20coding.png)\n\n## Step 4: Clean the project area\n## Syntax: mvn clean\n```\nBefore start building a project, it is necessary to delete old configuration files.\nmvn clean command is used to delete the target/ folder.\n```\n![Image](img/mvn%20clean.png)\n\n## Step 5: Compile the Project source code\n## Syntax: mvn compile\n```\nThis command is used to check whether the source code we wrote in java file is correct syntactically or not.\n```\n![Image](img/mvn%20compile.png)\n\n## Step 6: Unit Testing\n## Syntax: mvn test\n```\nThis work is tricky. \nYou must know how to create JUnit Test cases.\nYou need to define the Unit Test cases in /src/test/pkg1\n```\n![Image](img/mvn%20test.png)\n\n## Step 7: Install (Build the Project)\n```\nChecks the Maven Configuration in pom.xml file\nCreates the project build.\nCreates jar file in target/ folder which can be deployed\n```\n![Image](img/mvn%20install.png)\n\n## Step 8: Site \n## Syntax: mvn site\n```\nMaven Site command is used to create GUI reports\nIt creates reports in format of web pages in HTML+CSS format.\nSite Reports are stored in /target/site\n```\n![Image](img/mvn%20site.png)\n\n## Here is one Web Page of Site Report\n\n![Image](img/mvn%20site%20results.png)\n\n## How To Contribute\n\n[Contribution Guidelines](CONTRIBUTING.md)\n\n## Contributors\n\n1. @NishkarshRaj\n\n2. @navyakanu [Special Thanks for setting up GitHub Actions]\n\n3. @acodebreaker\n\n4. @RiyaJohn\n\n5. @tuhinchakraborty\n\n## License\n\n[MIT Licence](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishkarshraj%2Fmaven-using-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishkarshraj%2Fmaven-using-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishkarshraj%2Fmaven-using-cmd/lists"}