DevOps Classroom Series – 24/Sept/2020

Maven Project Basics

  • Lets create the folder structure
  • Maven Directories & Their purpose
    • src/main/java: This folder will contain the java code. Generally you would see reverse domain named folders and then code
    • src/test/java: This folder will consist of unit testing code
    • src/main/resources
    • src/main/config
    • src/test/resources
    • src/main/webapp
    • src/main/scripts
    • src/site
  • When maven goals are executed we would see some generated directories target/* Preview
  • Clone the code from Here and execute mvn package Preview
  • The jar/war form most of the java packaging types and this will have a naming pattern of
<artifactId>-<version>.<packagingtype>
  • Lets assume we are going to use spring boot dependency Preview

  • Now lets execute mvn compile

  • Goals & Lifecycle phases:

    • validate
    • clean
    • compile
    • test
    • package
    • install: will Copy the artifacts and pom file into local repository
    • deploy: will copy the artifacts and the pom file into remote repository
  • To Create basic skeletons we have archetypes. To create a sample webapp

mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp

Next Steps

  • Lets Start using ci/cd engine Jenkins

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube