Вопрос

I've created a properties file to externalize my JSF pages. Its location is a source package in the web application:

enter image description here

I've included it in the faces-config.xml file with the full path:

<application>
    <locale-config>
        <default-locale>en</default-locale>
    </locale-config>

    <resource-bundle>
        <base-name>com.daslernen.bundles.messages</base-name>
        <var>bundle</var>
    </resource-bundle>
</application>

But if I explore the contents of the war file inside the ear file as suggested in this answer to the same problem I don't find not the package neither the properties file.

How can I make Maven to include it in the build?

PS: If it helps I'm using Netbeans and a Maven project created with the wizard.

Это было полезно?

Решение

Despite the properties files being in the source directory, Maven was building it a different one called main.java.the_path_where_the_file_really_is. For the moment and while I try to figure out how to make Maven place the file in the correct place I have modified the faces-config.xml file to include the path Maven left the file:

main.java.com.daslernen.bundles.messages

And now works like a charm :)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top