Add generated assembly file to classpath

During build, I generate build.properties files through the maven properties plugin (properties-maven-plugin), which contains information about the assembly.

What is the best way to include this file in the created jar? I do not want to put it in the src / main / resources directory, as this would pollute my default resource directory.

Is there a directory of generated resources, as it is with the source?

+5
source share
5 answers

I thought there was a default directory generated-resources, but at the moment I can not find the documentation. You can always configure additional resource directories in your pom:

<build>
    <resources>
        <resource>
            <directory>${basedir}/src/main/resources</directory>
        </resource>
        <resource>
            <directory>${project.build.directory}/generated-resources</directory>
        </resource>
    </resources>
    ...
</build>
+8
source
+1

<resources> <build>

0

target/classes

( ), , , .

-3

All Articles