You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "CONSULTANT Composants-Chaaba (93)" <co...@dgfip.finances.gouv.fr> on 2010/07/01 09:50:26 UTC

Re: WAR packaging question

Hye,
Did you define your resources in <build></build>.
Can we see your pom file.

-------- Message original --------
Sujet : WAR packaging question
De : CassUser CassUser <ca...@gmail.com>
Pour : users@maven.apache.org
Date : 30/06/2010 22:48
> When the maven war plugin packages the maven project, the war includes my
> xml resource in the root directory as well as in the WEB-INF/classes.
>
> Is there any way to not include the one in the root directory of the WAR?
>
> Thanks!
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: WAR packaging question

Posted by CassUser CassUser <ca...@gmail.com>.
Thanks for the response.  I was looking at the wrong pom file, sorry.

Here is what i have as the plugin:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <directory>src/main/resources</directory>
                            <excludes>
                                <exclude>resource2.xml</exclude>
                            </excludes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

When building with the above the resource1.xml is placed in the root, else
it doesn't. How can i exclude resource2.xml from classes without
resource1.xml being placed in root?


On Thu, Jul 1, 2010 at 9:29 AM, Wendy Smoak <ws...@gmail.com> wrote:

> On Thu, Jul 1, 2010 at 12:19 PM, CassUser CassUser <ca...@gmail.com>
> wrote:
>
> > resource1.xml is in src/main/resources.  The resulting WAR looks like
> this:
> ...
> > I don't want resource1.xml again at the top level.  Any way to remove
> that?
>
> Was that file ever somewhere else in the project?
>
> Have you run 'mvn clean' recently to make sure nothing in target is
> left over from a previous execution?
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: WAR packaging question

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Jul 1, 2010 at 12:19 PM, CassUser CassUser <ca...@gmail.com> wrote:

> resource1.xml is in src/main/resources.  The resulting WAR looks like this:
...
> I don't want resource1.xml again at the top level.  Any way to remove that?

Was that file ever somewhere else in the project?

Have you run 'mvn clean' recently to make sure nothing in target is
left over from a previous execution?

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: WAR packaging question

Posted by CassUser CassUser <ca...@gmail.com>.
Don't know if this message went through to users @ maven, sending again...


Nope.  I have no resources defined in <build>, it is using the standard
maven directory structure to find resources (src/main/resources).

Nothing really interesting in the POM, it is using the war plugin defaults:
            <plugin>
                <groupId>org.apache.maven.
plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
            </plugin>

resource1.xml is in src/main/resources.  The resulting WAR looks like this:

-META-INF
   - maven
   - services
   - MANIFEST.MF
-WEB-INF
   -lib
   -classes
     - resource1.xml
   -web.xml
   -etc
-resource1.xml


I don't want resource1.xml again at the top level.  Any way to remove that?


On Thu, Jul 1, 2010 at 12:50 AM, CONSULTANT Composants-Chaaba (93) <
composants-chaaba.consultant@dgfip.finances.gouv.fr> wrote:

> Hye,
> Did you define your resources in <build></build>.
> Can we see your pom file.
>
> -------- Message original --------
> Sujet : WAR packaging question
> De : CassUser CassUser <ca...@gmail.com>
> Pour : users@maven.apache.org
> Date : 30/06/2010 22:48
>
>  When the maven war plugin packages the maven project, the war includes my
>> xml resource in the root directory as well as in the WEB-INF/classes.
>>
>> Is there any way to not include the one in the root directory of the WAR?
>>
>> Thanks!
>>
>>
>>
>
>