BMAD-METHOD/expansion-packs/bmad-java/tasks/java-web-project-setup.md

2.7 KiB

Java Web Project Setup Task

Purpose

Initialize a new Java web application project using Java 21, Spring Boot MVC, Maven, and AWS cloud platform. Creates the foundation for a modern web application with proper project structure, dependencies, and configuration.

When to Use

  • Starting a new Java web application project
  • Creating a web application with Spring Boot MVC
  • Setting up a project for AWS cloud deployment
  • Establishing a foundation for web development with modern Java

Input Requirements

  • Project name and description
  • Package structure preferences
  • Database requirements
  • Security requirements
  • AWS deployment preferences
  • Team development preferences

Process Steps

1. Project Structure Creation

  • Create Maven project structure
  • Set up source directories (src/main/java, src/main/resources)
  • Set up test directories (src/test/java, src/test/resources)
  • Create package structure following conventions
  • Initialize Git repository

2. Maven Configuration

  • Create pom.xml with Java 21 configuration
  • Add Spring Boot parent POM
  • Configure Maven compiler plugin
  • Add Spring Boot Maven plugin
  • Configure build profiles (dev, test, prod)
  • Set up Maven wrapper

3. Spring Boot Configuration

  • Add Spring Boot Web starter dependency
  • Add Spring Boot Data JPA starter dependency
  • Add Spring Boot Security starter dependency
  • Add Spring Boot Test starter dependency
  • Add Spring Boot Actuator starter dependency
  • Configure application.properties/yml

4. Development Environment Setup

  • Configure IDE for Java 21 and Spring Boot
  • Set up local development database
  • Configure application profiles
  • Set up development tools (Postman, etc.)
  • Configure debugging environment

5. Basic Web Configuration

  • Create main application class
  • Configure Spring MVC
  • Set up static resource handling
  • Configure Thymeleaf templates
  • Set up error handling
  • Configure logging

Output Deliverables

  • Complete Maven project structure
  • Configured pom.xml with all dependencies
  • Spring Boot application configuration
  • Development environment setup guide
  • Basic web application template
  • Git repository with initial commit

Success Criteria

  • Maven project builds successfully
  • Spring Boot application starts without errors
  • Basic web page accessible
  • Development environment fully functional
  • All dependencies resolved correctly
  • Project ready for development

Dependencies

  • Java 21 JDK installed
  • Maven 3.9+ installed
  • IDE configured for Java development
  • Git repository access
  • AWS account (for deployment)

Tools and Resources

  • Maven build tool
  • Spring Boot framework
  • Java 21 JDK
  • IDE (IntelliJ IDEA, Eclipse, VS Code)
  • Git version control
  • AWS CLI (for deployment)