ChrisGWarp wrote:
> 
> "Bernhard David" <[EMAIL PROTECTED]> wrote on 18/06/2008 16:21:06:
> 
>> Hello,
>> 
>> I think you just need to declare src/main/application as a resource
>> folder in your pom -
>> 
>> <resources>
>>    <resource>
>>       <directory>src/main/application</directory>
>>    </resource>
>> 
>> and it should work exactly as src/main/resources does.
> 
> Hi David.
> 
>         Thanks for following up.
> 
>         That leaves me with one final problem if I only have one 
> application.xml file (irrespective of it's location).
> 
>         Eclipse will put in the project names of the web and ejb projects 
> into application.xml, eg BlahWeb and BlahEJB.
> 
>         Maven when it creates application.xml, it will use the version 
> information as well, eg BlahWeb-1.0-SNAPSHOT etc (unless I use a final 
> name).
> 
>         The problem arises when maven will not generate application.xml 
> when it is already in \src\main\application.
> 
>         Is there a way to tell it to do so?
> 
>         Or, are you aware of any other way to do it?
> 
>         Thanks for your help.
> 
> -Chris
> 

To answer myself for future users:

The answer is to get it to generate the application.xml file, which will
generate one in the target directory, and then tell maven to use it, thus:

            <plugin>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <version>${ear.specification.version}</version>
                    <generateApplicationXml>true</generateApplicationXml>
                   
<applicationXml>${project.build.directory}/application.xml</applicationXml>
                    <!--
                        <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
                    -->
                    <modules>
                        <webModule>
                            <groupId>au.com.warpspeed.gpdb</groupId>
                            <artifactId>GPDBWeb</artifactId>
                            <contextRoot>gpdb</contextRoot>
                        </webModule>
                    </modules>
                </configuration>
            </plugin>

The two important lines are these:

                    <generateApplicationXml>true</generateApplicationXml>
                   
<applicationXml>${project.build.directory}/application.xml</applicationXml>


HTH,

-Chris

-- 
View this message in context: 
http://www.nabble.com/location-of-application.xml--tp17960243p19192724.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]

Reply via email to