CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-springframework-boot--spring-boot-starter-parent

Parent pom providing dependency and plugin management for applications built with Maven

Pending
Overview
Eval results
Files

plugins.mddocs/

Plugin Management

Comprehensive Maven plugin management with pre-configured settings for compilation, testing, packaging, and deployment of Spring Boot applications.

Capabilities

Java Compilation

Maven compiler plugin configuration with Spring Boot optimizations.

/**
 * Maven compiler plugin with parameter names preservation
 * Enables parameter names in compiled bytecode for Spring's reflection
 */
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <parameters>true</parameters>
    </configuration>
</plugin>

Usage Examples:

// Parameter names preserved in bytecode
@RestController
public class UserController {
    @PostMapping("/users")
    public User createUser(@RequestBody String name, @RequestParam int age) {
        // Spring can use actual parameter names instead of arg0, arg1
        return userService.create(name, age);
    }
}

Kotlin Compilation

Kotlin Maven plugin configuration for mixed Java/Kotlin projects.

/**
 * Kotlin Maven plugin for Kotlin compilation support
 * Configured for JVM target and Java parameter preservation
 */
<plugin>
    <groupId>org.jetbrains.kotlin</groupId>
    <artifactId>kotlin-maven-plugin</artifactId>
    <version>${kotlin.version}</version>
    <configuration>
        <jvmTarget>${java.version}</jvmTarget>
        <javaParameters>true</javaParameters>
    </configuration>
    <executions>
        <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
        <execution>
            <id>test-compile</id>
            <phase>test-compile</phase>
            <goals>
                <goal>test-compile</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Integration Testing

Maven Failsafe plugin for integration test execution.

/**
 * Maven Failsafe plugin for integration tests
 * Executes *IT.java test classes separately from unit tests
 */
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <classesDirectory>${project.build.outputDirectory}</classesDirectory>
    </configuration>
</plugin>

Usage Examples:

// Integration test example
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class UserControllerIT {
    
    @Autowired
    private TestRestTemplate restTemplate;
    
    @Test
    void shouldCreateUser() {
        // Integration test that starts full Spring context
    }
}

JAR Packaging

Maven JAR plugin configuration with manifest entries for executable JARs.

/**
 * Maven JAR plugin with Spring Boot manifest configuration
 * Creates JAR with main class and implementation entries
 */
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
        <archive>
            <manifest>
                <mainClass>${start-class}</mainClass>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
        </archive>
    </configuration>
</plugin>

WAR Packaging

Maven WAR plugin configuration for web application deployment.

/**
 * Maven WAR plugin with Spring Boot manifest configuration
 * Creates WAR with main class for embedded server deployment
 */
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <archive>
            <manifest>
                <mainClass>${start-class}</mainClass>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
        </archive>
    </configuration>
</plugin>

Spring Boot Maven Plugin

Core Spring Boot Maven plugin for executable JAR/WAR creation and application running.

/**
 * Spring Boot Maven plugin for executable artifact creation
 * Repackages JAR/WAR with embedded dependencies and launcher
 */
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>repackage</id>
            <goals>
                <goal>repackage</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <mainClass>${spring-boot.run.main-class}</mainClass>
    </configuration>
</plugin>

Usage Examples:

# Run application during development
mvn spring-boot:run

# Create executable JAR
mvn package
java -jar target/my-app-1.0.0.jar

# Run with profile
mvn spring-boot:run -Dspring-boot.run.profiles=dev

Git Information Plugin

Git commit ID plugin for embedding build information.

/**
 * Git commit ID plugin for build information
 * Generates git.properties with commit details
 */
<plugin>
    <groupId>io.github.git-commit-id</groupId>
    <artifactId>git-commit-id-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>revision</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <verbose>true</verbose>
        <generateGitPropertiesFile>true</generateGitPropertiesFile>
        <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
    </configuration>
</plugin>

SBOM Generation

CycloneDX plugin for Software Bill of Materials generation.

/**
 * CycloneDX plugin for SBOM generation
 * Creates software bill of materials in JSON format
 */
<plugin>
    <groupId>org.cyclonedx</groupId>
    <artifactId>cyclonedx-maven-plugin</artifactId>
    <executions>
        <execution>
            <phase>generate-resources</phase>
            <goals>
                <goal>makeAggregateBom</goal>
            </goals>
            <configuration>
                <projectType>application</projectType>
                <outputDirectory>${project.build.outputDirectory}/META-INF/sbom</outputDirectory>
                <outputFormat>json</outputFormat>
                <outputName>application.cdx</outputName>
            </configuration>
        </execution>
    </executions>
</plugin>

Uber JAR Creation

Maven Shade plugin for creating fat JARs with all dependencies.

/**
 * Maven Shade plugin for uber JAR creation
 * Alternative to Spring Boot plugin for specific deployment scenarios
 */
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <configuration>
        <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
        <createDependencyReducedPom>true</createDependencyReducedPom>
        <filters>
            <filter>
                <artifact>*:*</artifact>
                <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                </excludes>
            </filter>
        </filters>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.handlers</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.schemas</resource>
                    </transformer>
                    <transformer implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                        <resource>META-INF/spring.factories</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                        <mainClass>${start-class}</mainClass>
                        <manifestEntries>
                            <Multi-Release>true</Multi-Release>
                        </manifestEntries>
                    </transformer>
                </transformers>
            </configuration>
        </execution>
    </executions>
</plugin>

Plugin Execution Lifecycle

Standard Build Lifecycle

# Clean and compile
mvn clean compile

# Run tests (unit tests via Surefire, integration tests via Failsafe)
mvn test
mvn integration-test

# Package executable JAR/WAR
mvn package

# Install to local repository
mvn install

# Deploy to remote repository
mvn deploy

Development Lifecycle

# Run application with hot reload
mvn spring-boot:run

# Run with specific profile
mvn spring-boot:run -Dspring-boot.run.profiles=dev

# Debug mode
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

Install with Tessl CLI

npx tessl i tessl/maven-org-springframework-boot--spring-boot-starter-parent

docs

index.md

native.md

plugins.md

properties.md

resources.md

tile.json