Add .mf & .xml files in META-INF directory inside a Maven built EAR

b-lieve picture b-lieve · Nov 24, 2010 · Viewed 12.1k times · Source

I have arbitrary .xml & .mf files that i have to add in the META-INF folder inside the ear itself. Build is done using maven2.2.1. Simply adding those files under ${basedir}/src/main/application/META-INF/ works fine, but it doesn't fit my needs. Is there another way to do such thing? I tried:

<build>
<resources>
        <resource>
            <directory>G:/WS/vermeg/ear2/XML's</directory>
            <targetPath>META-INF</targetPath>
        </resource>
    </resources>
</build>

but this doesn't add my xml files under the EAR itself.

I also tried:

<configuration>
            <earSourceDirectory>G:\WS\vermeg\ear2\XML's\</earSourceDirectory>
...
</configuration>

this commands add my files inside the ear, but NOT in the META-INF inside the EAR (myEar.ear/META-INF).

Any help is welcome, and would be great. Thnx.

nacef,

Answer

jgifford25 picture jgifford25 · Nov 24, 2010