Good morning all.
Quick question: when I do a "maven update project" my application.xml file is updated.
I have abc-ear/META-INF/application.xml like this :
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
<description>Application abc construite avec le framework Sphinx.</description>
<display-name>def</display-name>
<module id="WebModule_1301067741013">
<web>
<web-uri>def-web.war</web-uri>
<context-root>def</context-root>
</web>
</module>
<module id="WebModule_1306335826653">
<web>
<web-uri>ghi-web.war</web-uri>
<context-root>jkl_bo</context-root>
</web>
</module>
<module id="WebModule_1330011848203">
<web>
<web-uri>mno-web.war</web-uri>
<context-root>mno_bp</context-root>
</web>
</module>
</application>
And my abc-ear/src/dev/application/META-INF/application.xml contains this after "maven update projects" :
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
<display-name>abc-ear</display-name>
</application>
I'm using maven-ear-plugin :
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<!-- <fileNameMapping>full</fileNameMapping> -->
<!-- <defaultLibBundleDir>.</defaultLibBundleDir> -->
<skinnyWars>true</skinnyWars>
<applicationXml>${basedir}/META-INF/application.xml</applicationXml>
<generateApplicationXml>false</generateApplicationXml>
<archive>
<manifestEntries>
<Date>${maven.build.timestamp}</Date>
<Version>${project.version}</Version>
<!-- <Baseline>${baseline.number}</Baseline> -->
</manifestEntries>
</archive>
<!-- On doit faire en sorte que le numero de version du war soit retiré
sinon, chaque sous version va demander de reconfigurer le serveur -->
<modules>
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>abc-web</artifactId>
<contextRoot>/abc</contextRoot> <!-- Voir application XML -->
<bundleFileName>abc-web.war</bundleFileName>
</webModule>
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>def-web</artifactId>
<contextRoot>/ghi_bo</contextRoot> <!-- Voir application XML -->
<bundleFileName>def-web.war</bundleFileName>
</webModule>
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>ghi-web</artifactId>
<contextRoot>/ghi_bp</contextRoot> <!-- Voir application XML -->
<bundleFileName>ghi-web.war</bundleFileName>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
Before mvn clean install, I need to git checkout application.xml If i don't do it, it doesn't work.
Can you tell me why ?
maven version : apache-maven-3.0.4
Thank you