Home > AI > Backend > SpringBoot >

One pom.xml example to change resource directory

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.baeldung.blockchain</groupId>
    <artifactId>java-blockchain</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <name>java-blockchain</name>
    <packaging>jar</packaging>

    <parent>
        <groupId>com.baeldung</groupId>
        <artifactId>parent-java</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../parent-java</relativePath>
    </parent>

    <build>
        <finalName>java-blockchain</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

</project>

Leave a Reply