Maven ear plug-in does not pick up application.xml

I am using jbosscc-seam-archtype 1.2 and I put application.xml in the EAR project under /src/main/application/META-INF/, but maven-ear-plugindoes not pick it up. any suggestion?

Here is a snippet of my EAR Maven plugin:

<plugins>
    <plugin>
            <artifactId>maven-ear-plugin</artifactId>
            <configuration>
                <version>5</version>    
                <modules>
                    <webModule>
                        <groupId>com.***</groupId>
                        <artifactId>***-war</artifactId>
                        <contextRoot>***</contextRoot>
                        <unpack>${exploded.war.file}</unpack>
                    </webModule>

                    <jarModule>
                        <groupId>com.***</groupId>
                        <artifactId>***-datamodel</artifactId>
                        <includeInApplicationXml>true</includeInApplicationXml>
                    </jarModule>

                    <ejbModule>
                        <groupId>com.***</groupId>
                        <artifactId>***-bootstrap</artifactId>
                        <excluded>${exclude.bootstrap}</excluded>
                    </ejbModule>

                    <ejbModule>
                        <groupId>org.jboss.seam</groupId>
                        <artifactId>jboss-seam</artifactId>
                    </ejbModule>

                    <jarModule>
                        <groupId>org.jboss.el</groupId>
                        <artifactId>jboss-el</artifactId>
                        <bundleDir>lib</bundleDir>
                    </jarModule>

                </modules>

                <jboss>
                    <version>${version.jboss.app}</version>
                    <loader-repository>***:app=ejb3</loader-repository>
                </jboss>
            </configuration>
        </plugin>

What am I doing wrong?

+5
source share
2 answers

You can use <applicationXml>/ your / location / </applicationXml>in an element <configuration>to indicate the location of your user file application.xml.

Please check if you really need the file application.xml, otherwise use <generateApplicationXml>true</generateApplicationXml>.

+3
source

application.xml , src/main/application/META-INF/application.xml maven, , <configuration> maven-ear-plugin. , , generateApplicationXml false ( - true).

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.4.2</version>
    <configuration>
        <version>6</version>
        <displayName>MyEAR</displayName>
        <defaultLibBundleDir>lib</defaultLibBundleDir>
        <modules>
            <webModule>
                <groupId>com.test</groupId>
                <artifactId>my-web</artifactId>
                <bundleFileName>my-web.war</bundleFileName>
                <contextRoot>/MyWeb</contextRoot>
            </webModule>
        </modules>
        <generateApplicationXml>false</generateApplicationXml>            
    </configuration>
  </plugin>
+2

All Articles