Hi,

Shouldn't that be generated automaitcally by ear plugin?


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <displayName>Foo</displayName>
                    <description>Foo EAR</description>
                    <version>5</version>
                    <modules>
                        <webModule>
                            <groupId>your.group.id</groupId>
                            <artifactId>myco-web</artifactId>
                            <contextRoot>/myco</contextRoot>
                        </webModule>
                    </modules>
                </configuration>
            </plugin>
        </plugins>

application.xml will be generated accordingly.


--
Regards,
Adrian Shum
 

-----Original Message-----
From: laredotornado-3 [mailto:[email protected]] 
Sent: Thursday, May 26, 2011 4:39 AM
To: [email protected]
Subject: Can Maven dynamically change my application.xml file?

Hi,

I'm using Maven 3.0.3 with WebSphere 6.1.  In my 
src/main/webapp/META-INF/application.xml file, I have

<?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE application PUBLIC &quot;-//Sun Microsystems, Inc.//DTD J2EE 
Application 1.3//EN&quot; 
&quot;http://java.sun.com/dtd/application_1_3.dtd&quot;&gt;

   <application>
      <display-name>myco</display-name>
      <module>
         <web>
            <web-uri>myco-app-1.0-SNAPSHOT.war</web-uri>
            <context-root>myco</context-root>
         </web>
      </module>
   </application>

I had to change the "web-uri" component to match the WAR file generated by 
Maven, otherwise, my app doesn't deploy.  Problem is, with each incremental 
build, I have to change this file by hand.  Is there a way I can get Maven to 
auto-generate the file for me when it builds the EAR?  Here's my pom.xml ...

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.company.mycousa.myco</groupId>
        <artifactId>super-pom</artifactId>
        <packaging>pom</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>myco Super POM</name>
        <modules>
                <module>myco-app</module>
                <module>myco-app-ear</module>
                <module>myco-web</module>
        </modules>
</project>

Thanks, - Dave

--
View this message in context: 
http://maven.40175.n5.nabble.com/Can-Maven-dynamically-change-my-application-xml-file-tp4426525p4426525.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


This email is confidential. If you are not the intended recipient, please 
delete it from your system and notify the sender immediately. Any unauthorized 
use, disclosure, dissemination or copying of this email is prohibited. Haitong 
International Securities Group, its group companies and their content providers 
("Parties") shall not be responsible for the accuracy or completeness of this 
email or its attachment, if any, which could contain virus, be corrupted, 
destroyed, incomplete, intercepted, lost or arrive late. The Parties do not 
accept liability for any damage caused by this e-mail. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to