开发者

maven ear plugin not picking up application.xml

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

Here is the snippet of my maven EAR 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?


By default, your application.xml will not be picked even if you include it in src/main/application/META-INF/application.xml in your maven ear project that's because it will be autogenerated by the configuration specified at <configuration> of the maven-ear-plugin. If you want yours to be included you need to change generateApplicationXml to false (defaults to 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>


You can use <applicationXml>/your/location/</applicationXml> in <configuration> element to specify location of your custom application.xml file.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜