Missing package properties files in war assembly

My project contains various property files located in packages that are not included when the package target is launched from the Maven assembly.

Using the 0.10.2 m2eclipse plugin and the default target for the package.

In project:

src->main->java->mypackage->MyProperties.java 
src->main->java->mypackage->MyProperties.properties 

In the extended war directory after launching the "package" target:

target->classes->mypackage->MyProperties.class 

- no properties file -

I am trying to get the group to accept Maven, and the solution to this problem will be the creator of the deal. Moving property files will not be practical. Any help is much appreciated.

+3
source share
2 answers

Pascal answer is the right way to do things.

(, ).

, :

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
        </resource>
        <resource>
            <directory>src/main/java</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
    </resources>
</build>
+1

, /, .. src/main/resources:

src/main/resources/mypackage/MyProperties.properties 

.

+3

Source: https://habr.com/ru/post/1756973/


All Articles